티스토리 수익 글 보기
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Command Palette: add pages to initial view for page editor #73631
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
base: trunk
Are you sure you want to change the base?
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you’re merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project’s expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| } | ||
| return a.menu_order – b.menu_order; | ||
| } ); | ||
| }, [ pages ] ); |
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.
Same as https://github.com/WordPress/gutenberg/pull/73628/files#r2569644194. This could potentially make it hard to maintain/keep in sync with the Navigation block. There’s probably a lot left to do like handling Navigation block with more than just Page List.
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.
Thanks for being aware of this 👍
|
Size Change: +382 B (+0.01%) Total Size: 2.57 MB
ℹ️ View Unchanged
|
| 'postType', | ||
| 'page', | ||
| query | ||
| ) ?? [], |
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.
Oh no 😆
|
I wonder if grouping items would make this more intuitive… |
andrewserong
left a comment
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.
Nice, I love the UX of showing pages as well as the command palette, feels like the best of both worlds to me.
I wonder if we should (somehow) include showing pages when editing the home template, as it’s quite common to drop into the site editor and edit the home template as the root of the site, and then to progress on to going to edit other pages? I don’t want to muddy the waters too much here (and not a blocker of course), but I’d expect to be able to go from Home > Sample Page, and then when on Sample Page, easily go back to Home.
|
|
||
| const query = { | ||
| per_page: -1, | ||
| status: 'publish', |
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 know this is vibe-coded so apologies if you haven’t already done a pass through, but I imagine this should likely include all pages, not just published ones? Or is the goal for users to just be looking at what’s published on their site?
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.
It could, yes. This was based on the other prototype where it shows only navigation menu pages in the Zoom out carousel (#73628)
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.
Also this is about which pages to display be default without search, not the searchable pages
I don’t see any queries here for I appreciate this might just be a nomenclature thing and what we mean is “the most recently created pages” or something or that kind. However, just in case we are attempting to mirror Navigation… In block based WordPress, we have historically had an issue of how to identify the “Primary” Navigation. We did experiment with Navigation Areas but this was reverted and abandoned after direction from project leadership. As a result we have no mechanism such as was available in Classic WP for find the primary menu. We’ve discussed relying on a rough heuristic which is basing this on the slug of the template part where the Nav block appears. However, to do this we either need to:
Neither of the above are currently something that’s been implemented. |
This might be worth unpacking… is it definitely the most useful set of pages to display here? Recently published or edited pages might be worth considering as an alternative. Especially considering the Navigation challenges outlined by Dave. |
What?
Related: #73628.
🚨 Vibe code alert: 100% Claude 🚨
Adds the pages that appear in the Navigation block to the initial command palette list.
Test in the Site Editor. Perhaps we should also add this to templates? I’m not sure.
Why?
It’s hard to discover how to navigate between pages, so this simple addition could help a little.
How?
Testing Instructions
Open the Site Editor. Go to a page. Make sure you have multiple pages in the Navigation block. Click the document toolbar to open the command palette.
Testing Instructions for Keyboard
Screenshots or screencast