feat: Added command palette for quick actions and switching between items#2933
Conversation
amanharwara
commented
Sep 2, 2025
antsgar
left a comment
There was a problem hiding this comment.
@amanharwara this is such great work! I absolutely love it and I'm sure users will too, thank you for implementing it (and having such a great idea) ❤️
A few quirks I noticed:
- This is a weird one, for some reason the "Archive note" option doesn't seem to be moved to the "Recents" section once used.
- The command palette doesn't overlay all the dropdowns/modals it opens. E.g. if you open the command palette, choose "Change editor width", this opens up a modal. If you then trigger the command palette again without closing the modal, the palette will show up underneath it.
- Kinda related to the above. Since the command palette is triggered by the keyboard, the modals/dropdowns that get open by commands don't get closed if you trigger the palette again. This means if you for example click "Open account menu", the dropdown shows up, you don't close it and you trigger the palette again and choose "Open quick settings menu" you get both dropdowns open at the same time. Could we somehow resemble the "click outside" scenario when triggering the palette or would this be complex to do?
This is totally subjective and not important but I was wondering about the reason behind choosing "Cmd+Shift+;" as the shortcut for the command palette. Did you consider "Cmd+Shift+P"? I find that one more intuitive just because it's what VSCode uses, but don't know if that's actually common on other apps as well.
Just realized that that seems to be an issue with any of the "_ current note" reasons since we store recent commands' uuids and not objects. Basically, we dispose and re-add the "_ current note" commands when the selected note(s) changes and so the uuid of the command that is stored in the recents state returns undefined when the command palette tries to get the actual command object since the re-added commands will have a newly-generated uuid.
Different apps seem to have different ones. Github and Discord for e.g. use |
|
@amanharwara oooh super interesting to know why the Archive (and other) options weren't showing up in Recents properly! Yeah perhaps we could just use regular strings as IDs for the commands as opposed to UUIDs, since they're limited in nature and we define the exhaustive list of commands available? As for the shortcut I don't think it's a huge deal either way, was just wondering! In my case Cmd+Shift+P does seem to be working properly to pin the note. Perhaps it's best that we keep the existing commands unchanged as you mentioned just in case users are already used to them. |