-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
It's also worth noting that this depends on the metadata changes introduced in atom/atom#15383 -- though I think this shouldn't be an issue with future releases of command-palette? This looks similar to #90, but rather than having the user configure their command palette, the package author can determine whether their commands should be shown using the new metadata API. Both should be able to co-exist. cc @jordwalke @t9md |
b1a06ca
to
ec966c5
Compare
This allows for commands to opt-into not appear in command palette. Frequently commands are an implementation detail, or even only a means of providing a keybinding, and do not benefit from being shown and selectable to the user from the command palette. Options like "Vim Mode Plus: Set Input Char M" can be confusing to the user and cloud high-signal commands from surfacing in command palette results. Additionally, showing so many commands can [bog down the command palette and make it slow to start](#80) -- though there are certainly other means of improving its performance. The name is the most concise I could come up with to convey what we want here. There might be other ways of surfacing commands in an interface that might not want to obey this (or those that might), but for now I'm erring on the side of being specific to command palette. Totally open to making this more generic if there's a good argument or I'm missing something.
ec966c5
to
d3fcf5b
Compare
I like this idea, but I want escape hatch. I'm maintaining over 30 packages including vim-mode-plus. I want hide most of vim-mode-plus command basically, but I want to keep the way to "force show all commands by ignoring hide flag" option. |
Perhaps it's a matter of naming |
I'm not completely opposed to adding an ability to hide commands, but I'm very concerned that it could create confusion and opacity about which commands exist. Do we have any more concrete examples of commands that most people would consider to be noise? For the example of What if we enhanced the commands system in the following way:
If we did this, then I'm not sure if this solution would apply to other examples of noisy commands. I'd love to hear some more you've experienced @wbinnssmith to confirm or deny this proposed solution. I can anticipate some potential enhancement ideas to this proposal, like specified some sort of typed schema for the What do people think? @wbinnssmith? @t9md? |
I think this is off-topic of original issue. In Summary: most of vmp's command is noise, I think it's good if pkg author can control visibility of command on cmd-palette, it also reduce delay of cmd-palette.
|
@t9md That seems reasonable. Basically my proposal doesn't really fix the noise problem in a general way. I'm sold that we want to add hidden commands. Is somebody willing to add @t9md's escape hatch of |
This ensures users can still access hidden commands for debugging purposes.
@t9md @wbinnssmith I've added the suggested |
This is published as 0.42.0 (the answer to life, the universe, everything) and upgraded in atom/atom@3d3042b. Thanks again for making this change. Sounds like it will make life much easier for vim-mode-plus users once @t9md leverages it. 📈 |
Thank you!! I'll try. |
After I hide all vmp commands. collect + render equals to total item population time. My summary is
Then how to solve palette's delay(my thought)?
|
Another approach could be to allow the user to hide certain commands. Something akin to the way the user can disable the keymaps of a package could be useful. I know there are only a handful of commands that I actually use so hiding the rest by default could save a lot of time in the render process. |
We need to just optimize the menu rendering. If anyone cc's me on a PR that does it I will prioritize working with that person and make a best effort to be timely. Otherwise it's something we'll need to put a full time engineer on at some point. |
@nathansobo There is a PR open to only render elements when needed on atom-select-list. atom/atom-select-list#21 I believe this is what you are asking for? |
Summary: Commands can now opt out of being shown in the palette. See atom/command-palette#92 Reviewed By: matthewwithanm Differential Revision: D6270212 fbshipit-source-id: d9439f3cf3db698fb8a4d8e01b6750b6a1a6f7de
Summary: Commands can now opt out of being shown in the palette. See atom/command-palette#92 Reviewed By: matthewwithanm Differential Revision: D6270212 fbshipit-source-id: d9439f3cf3db698fb8a4d8e01b6750b6a1a6f7de
This allows for commands to opt-into not appear in command palette.
Frequently commands are an implementation detail, or even only a means of providing a keybinding, and do not benefit from being shown and selectable to the user from the command palette.
Options like "Vim Mode Plus: Set Input Char M" can be confusing to the user and cloud high-signal commands from surfacing in command palette results.
Additionally, showing so many commands can bog down the command palette and make it slow to start -- though there are certainly other means of improving its performance.
The name (
hiddenInCommandPalette
) is the most concise I could come up with to convey what we want here. There might be other ways of surfacing commands in an interface that might not want to obey this (or those that might), but for now I'm erring on the side of being specific to command palette. Totally open to making this more generic if there's a good argument or I'm missing something.Released under CC0.