-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Allow nested command loaders within the command center #49658
Conversation
Size Change: +463 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
Flaky tests detected in b7440a9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4639035887
|
@jasmussen it seems like what you're proposing is to not show anything on first load, just the input. That's very different from what the current PR is proposing and might make this PR obsolete (no need for nested pages). I'm fine with any, just let me know what I should be exploring. |
That's my instinct yes. I'm thinking of this from the angle that this can become your main "assistant" interface for WordPress, and thus it might be best not to suggest any content until you start searching, making the opportunities seem broader. But I'm happy to hear from @richtabor @SaxonF @jameskoster here. |
I think this is a good baseline, but there could be scenarios where suggestions are helpful. For example if you're editing a template, then we might display a list of recently edited templates as suggestions. This would streamline the flow of navigating between templates which is currently very tedious (as noted in #48443, #48481, and #37001). I suspect this logic could be extrapolated across post types. |
I lean the other direction: to show relevant command suggestions. I'd say it's more helpful to understand the most helpful (and relevant) commands you can execute, than having to type first to see those. The commands could be different for different areas of the Site Editor (and beyond). And perhaps have an element of recently used commands prioritized as well. |
closing this as it seems we don't want nesting for now. |
Related to #48457
What?
This explores the idea raised by @jameskoster here #49330 (comment)
Basically, at the root level and if you don't type anything, we don't show pages, templates... until you type. And if you don't type anything, there's an item "search pages" that you can click to go into a nested command search where you can only search for pages.
How?
In terms of APIs, the changes here is that "command loaders" have an isNested flag to define whether or not to enable that behavior and they have to define a custom "placeholder" in this case.
Testing Instructions
1- Enable the command center experiment
2- Open the site editor
3- Click cmd+k
4- See how it feels (related to pages searching)