-
Notifications
You must be signed in to change notification settings - Fork 815
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
Command palette command discovery #4154
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
While it would normally be the case that these things would be the same; for the purposes of this test have them different so we know if search ever leaks into discovery for some bizarre reason.
For the reader who has made it this far, highlight the point at which the crucial decision is made.
davep
changed the title
WiP: Command palette command discovery
Command palette command discovery
Feb 14, 2024
rodrigogiraoserrao
approved these changes
Feb 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of (subjective) docstring suggestions and a couple of other minor suggestions. None of them warranted I blocked the PR 🤷
Good job 🐍 🚀
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR to add a discovery API to the command palette, which allows command providers to offer up commands that should appear in the command palette's dropdown as soon as it's opened.
Implements #4111.
The request in #4111 was to show everything, but this could be problematic depending on the nature of the provider; so this approach adds a
discover
method, which can be omitted, and the discoverable commands will be taken from that; this gives providers the option to either offer up all their commands, or just a subset that make sense.This PR also implements
textual._system_commands.SystemCommands.discover
.