-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Bootstrap the dashboard layout #62409
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. |
|
||
const { RouterProvider } = unlock( routerPrivateApis ); | ||
const { GlobalStylesProvider } = unlock( editorPrivateApis ); | ||
|
||
function AppLayout() { |
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 basically extracted the site editor specific code from the "Layout" component using this wrapper. Now the Layout
component is agnostic from the site editor content.
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/experimental/posts/load.php |
preview: undefined, | ||
mobile: <Page>Welcome to Posts</Page>, | ||
}, | ||
}; |
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.
@jsnajdr I wish we can declare the routes of the site editor in a static way like this with an extra "path" or something.
For now, having a useLayoutArea hook for the site editor and another one for this new experimental page... works. But there's something to be done here.
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.
We'll need to have a hook similar to useLayoutAreas
here to get params from location later, right?
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.
Yes
Size Change: +10.9 kB (+0.62%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5b3503b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9415780208
|
5b3503b
to
8d85095
Compare
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.
That's exciting! Looks good, thank you!
Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]>
Related #62371
What?
This PR just reuses the "Layout" component from the site editor in the new posts dashboard. It doesn't do a lot aside setting things in order to be able to add "routes" and "pages" for the posts dataviews...
The results for the moment is as shown in the screenshot.
Testing Instructions
1- Check that the site editor continues to work as expected.
2- Check that the experimental "posts" page looks like the screenshot above (you can use the command palette if you want :P)