Open zadjii-msft opened 4 years ago
Alright, so lets get some teaser images of what's in progress:
This is including the spec changes in review over in #6532.
There's also a shadow on the dialog that the snipping tool is conveniently leaving out.
@zadjii-msft - is there a plan to add a lazy loading for command palette. From my startup profiling, the load adds more than 0.5 sec on startup?
Not at the moment, but .5s is pretty bad 😬 Maybe we should be! Presumably, we don't need to expand iterable commands before displaying the UI, so that could be done on a background thread, and if the user does super quickly open the cmdpal, then we could wait for that background job to complete. Iterable commands won't have a keybinding set on them, so I'm not worried about that so much.
Out of curiosity, how are you profiling the startup? Are there any other hot paths in our startup that stand out? (Might be best to start a new thread for that discussion though)
Not at the moment, but .5s is pretty bad 😬 Maybe we should be! Presumably, we don't need to expand iterable commands before displaying the UI, so that could be done on a background thread, and if the user does super quickly open the cmdpal, then we could wait for that background job to complete. Iterable commands won't have a keybinding set on them, so I'm not worried about that so much.
Out of curiosity, how are you profiling the startup? Are there any other hot paths in our startup that stand out? (Might be best to start a new thread for that discussion though)
I am using intel's vtune profiler both in usual and kernel events modes.
[Original issue: #2046] [Original Spec: #2193] [v2 Spec: #5674] [Spec Addendum 1: #6532]
TODO for initial PR
* [x] The list view items should be clickable * [x] The list should be sorted by weight, then _alphabetically_ * [x] There should be stronger weighting for consecutive chars. Case in point: the `sett` example below * [x] If you click on a list view item, focus enters the list view item, and then you can't hit enter to select it. * [x] tests tests tests tests. * [x] The auto gen names should probably only have the first letter capitalized - I bet if I do that I'll have to revert it during the PR... hmm...v2.0 Follow-up work
Tasks
commandPalette
keybinding should close the palette when it's open #6679toggleCommandPalette
to go straight to the commandline mode)Bugs
_compareCommandNames
should use locale-aware string comparisons #6953~ This is going to be done by #7039 actually.Related, but indirectly
Backlog work
Opening
andOpen
eventsCommandPalette::_lostFocusHandler
) can be generalized by checking if the focused element is a descendant of palette