-
Notifications
You must be signed in to change notification settings - Fork 4.6k
contentOnly: Add the "Done editing pattern" button to the document toolbar #73088
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
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
I think we should get input from @WordPress/gutenberg-design for this one. I'm not opposed to it, but I'm also sold on the approach. With the click outside to exit and that you have to click the button from the inspector to access it (which means you'll know it's there), think it's OK. Also, since it appears at the top of the inspector for any selected block while in that state, it helps make it prominent. |
|
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. |
|
Size Change: +141 B (+0.01%) Total Size: 2.47 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in efb0509. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19173485317
|
|
When you "focus" on a template part of a template or a synced pattern, the "document" tab becomes about the thing you just focused on. I wonder what it means here when we're focusing on just one block, does it mean the first tab should also be about that block that we're focusing on. |
|
Thanks for the PR. Other behavioural aspects aside, there are a couple of details worth massaging:
The third item I can see Jerry noting specifically, so in case there's a semantic reason for that to have to be there, we can keep it, but it does feel a bit duplicative for me. |
I like using the document bar to show you where you're at instead of introducing a new button.
I don't think we should fade out the header items. They are all still useful in the context of editing the focused design. I'd expect to still be able to access the list view and inserter, use undo/redo, change preview sizes, etc.
Sorry if my response was confusing. I like the "lock" button staying in the sidebar inspector because:
My vote is to use the document bar to display the Back button and current pattern name, and also preserve the button in the sidebar for exiting. |
tyxla
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.
I think removing the document bar is unexpected, and integrating the button in it as others suggested already would make more sense.
| <DocumentBar /> | ||
| { editedContentOnlySection ? ( | ||
| <Button | ||
| className="editor-header__done-editing-button" |
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.
This classname seems to be unnecessary
| className="editor-header__done-editing-button" |
|
It seems the general consensus is that this exploration went in the wrong direction. I'm inclined to agree! I'll close this and look into different changes to the document toolbar. |
I shared a slightly tweak of the document toolbar that taps into the back action in #73126 @jameskoster |



What?
Adds the "Done editing pattern" button to the document toolbar.
Why?
This makes the "Done" action more prominent.
There was a suggestion that this button should replace the one in the inspector controls. However I believe that users will expect to find the "Done" action in the same place as the "Edit pattern" button.
How?
Testing Instructions
Screenshots or screencast