-
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
Add the pages menu to the site editor #50463
Conversation
Size Change: +462 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
Flaky tests detected in 250d3a6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4925725437
|
This feels strange to me, and is not what I'd expect as a user. But perhaps it's a detail to work out in #50396. I don't know if this is intentional, but I noticed that drilling up no longer updates the frame to show the site homepage – instead it retains the last viewed page. It probably makes sense to retain the old behavior for now. As I see it the main detail to work out here is the treatment of the 'page' that displays latest posts (either the frontpage or the posts page, according to settings). The PR currently works as suggested in the design, and it works well when a static homepage is set, but a drawback I now see is that when the homepage is configured to display latest posts, that latest posts page does not appear in the Pages list, and there's no way to access the details panel for it. This is consistent with the pages list in wp-admin, but seems a shame in the site editor context since it is possible to edit the latest posts page there. It would be nice to connect this 'page' with the associated template somehow. This is perhaps something to discuss at a higher level, but here are some potential approaches:
Clearly this second approach would involve quite a bit more work, and would make this PR blocked by #48651. What other options are there? |
No, not intentional, I'll check
I'm happy to try any option you think is best. I'm not entirely sure of the implication at this point but would prefer to explore these separately and keep the current PR about adding the static pages sidebar. |
The bug to return to home page is fixed now. |
Yes that's fair. Apologies for bringing it up here, there are just so many tangled threads :) I don't suppose it needs to hold up this PR. I've seen it suggested elsewhere not to include the "Recent" heading. But without it I worry folks will think pages are missing when they have more than 10. What do you think @jasmussen @SaxonF? |
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.
LGTM, thank you! I've left just some small nitpicks.
We could land if there is a consensus about:
Side effect of this change is that when you load a page in the site editor, either from the "pages" menu or from the "navigation" menu, clicking "back" always returns to the "pages" menu item.
This feels strange to me, and is not what I'd expect as a user. But perhaps it's a detail to work out in #50396.
Partially implements the "pages" menu of the site editor from #44461 (comment)
What?
To add content editing to the site editor, we need a way to access pages from the site editor, this PR bootstraps the "pages" menu item of the site editor. The current PR focuses essentially on the navigation behavior and less on the design:
/page
in the sidebar navigator)/page/id
in the sidebar navigator): Side effect of this change is that when you load a page in the site editor, either from the "pages" menu or from the "navigation" menu, clicking "back" always returns to the "pages" menu item.The pages render the latest 10 pages with a link to the wp admin page list at the bottom.
Things I chose to not include in this initial PR:
Each one of these items should be implemented and discussed in its own PR.
Testing Instructions
1- Open the site editor
2- Click "pages"
3- See the sidebar and use it.