Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add a Sidebar tab with buttons #9

Closed
chrisgrieser opened this issue Oct 24, 2021 · 13 comments
Closed

FR: Add a Sidebar tab with buttons #9

chrisgrieser opened this issue Oct 24, 2021 · 13 comments

Comments

@chrisgrieser
Copy link

This is a very unusual request, coming from a theme dev who pretty much eliminates all the buttons he can find, but I think this plugin is one of the rare cases where buttons really make sense from a UI perspective. Here is why:

  • you call this plugin via command or hotkey. in most cases, you will want to use hotkeys, since you will want to use the commands repeatedly, for which the command palette isn't really good for.
  • for the standard commands, you simply assign a hotkey, that's fine.
  • if you define a bunch of saved queries, things get messy.
    • You can use the command palette, but that is too slow for commands you want to use repeatedly (which most saved queries likely are).
    • However, hotkeys do not help here either, since you would save a bunch of queries, e.g. for headings, footnotes, links, etc. – and while remembering one hotkey is pretty easy (e.g. for the expand selection command), it's a bit much to learn all seven hotkeys you would need for a bunch of queries by heart.

This means, one would need an alternative method of quickly and repeatedly calling a command while also having an overview of what commands there are created by this plugin. The only thing that came to my mind is basically a bunch of buttons, in a sidebar, which you can click repeatedly.

@SkepticMystic
Copy link
Owner

I think that makes sense, and I'm certainly not opposed to sidebars and buttons.
I'll work on this :)

@chrisgrieser
Copy link
Author

🥳

@chrisgrieser
Copy link
Author

@chrisgrieser
Copy link
Author

also, clicking the buttons triggers the run command, while I think for navigation purposes, the next command would make more sense. (Maybe have a toggle in the settings?)

@SkepticMystic
Copy link
Owner

@chrisgrieser checkout 0.0.30 and let me know what you think!

  1. I've added an icon from the Feather Icons library
  2. Removed query regex, it now shows up as a label instead
  3. Removed numbering
  4. Left click a query to run All, right click to run Next

@SkepticMystic SkepticMystic reopened this Oct 25, 2021
@chrisgrieser
Copy link
Author

I would avoid any functionality with repeated right clicks, since some mice aren't well suited to do that. (e.g. mine :P )

Since the select-all-command is something only used once anyway, you would mostly use the the sidebar for select next-commands, for which you want to run the command repeatedly. So I would suggest to solve the right-click-issue by simply assigning select-next to the left click, I think?

@SkepticMystic
Copy link
Owner

Haha sure, I can swap those around

@SkepticMystic
Copy link
Owner

Otherwise? I think the side view is looking fine

@chrisgrieser
Copy link
Author

yep looks great, and showing the regex as tooltip is a good idea!

Also just finished styling the sidebar for my theme with a couple of lines of css :)

Screenshot 2021-10-25 16 26 50

@SkepticMystic
Copy link
Owner

Haha I prefer what you've done there! So unset the background color, and only show it on hover, right?

@SkepticMystic
Copy link
Owner

@chrisgrieser I've swapped around right and left click functionality. Also changed styling to similar to what you've got

@chrisgrieser
Copy link
Author

<3

@SkepticMystic
Copy link
Owner

Gonna consider this closed then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants