-
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 PluginHeaderToolbar SlotFill to edit-post package. #52261
base: trunk
Are you sure you want to change the base?
Conversation
For historical reference on this feature - #17198 |
Size Change: +377 B (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
Flaky tests detected in a8ce626. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5448241783
|
@ryanwelcher, I think when we can land this depends on how stable is the header toolbar component. Introducing a new SlotFill could restrict future refactoring. Example: Now, the slot should account for the new design of the top toolbar, which takes the remaining real estate in the header toolbar when a block is selected. @mtias, any thoughts on when would be "good" time to commit to header extensibility? |
Ensuring that also @jasmussen is in the loop and it all fits with the planned iterations on the top toolbar. In case, we all agree we should proceed, the SlotFill will have to get moved to the |
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @[email protected]. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
I'm happy to defer to Matías and others, but it's not clear to me that it would be a good time to commit and support this at the moment, since there are a lot of problems across mobile, explorations around zoom out, and improvements to select mode, that all require some consideration here. I'd still suggest that the pinned sidebar slot is the way to extend the header toolbar for the moment. |
I'll need to update the PR to address merge conflicts and move the slot to the |
Sorry missed the ping before @Mamaduka. The key here is to come up with an API that is a bit more agnostic about where it renders and instead expresses a more semantic role. For example, the plugins API on the header is not explicitly about the header toolbar, so there is flexibility to modify the UI. @ryanwelcher I know a lot of plugins are using the header area to render their functionality, but it'd be good to classify a bit:
If we don't narrow down the intent a bit the result won't be much more elegant than just hijacking the DOM. |
What?
This PR is an updated version of #17198 and is meant to address #16988.
I moved it to the main repo and updated to latest trunk as my fork was very outdated and this seemed to be the best way to move this forward.
Why?
There are many plugins that have been inserting elements into the header via workaround and hacks. This would allow us to provide an elegant solution and to an extent place some guardrails on the UX
How?
This PR introduces a new SlotFill location to the end of the toolbar that is only displayed when the view port is large (similar to the tools selector ).
Testing Instructions
Sample Code:
Screenshots or screencast