Add "Edit" button to Zoom Out mode toolbar#64571
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. |
|
Size Change: +29 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
47b2512 to
3014415
Compare
|
Flaky tests detected in 3014415. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10418097600
|
MaggieCabrera
left a comment
There was a problem hiding this comment.
I think this is working nicely and makes a lot of sense to have
jeryj
left a comment
There was a problem hiding this comment.
I think a way to return to editing mode is necessary. I'm not sure what else, if anything, should happen after this button is pressed. For example, does the pattern inserter sidebar close too? Do we open the settings sidebar to give them more pattern editing options?
Agreed. I had similar questions. We don't have answers to those questions yet and I think we need to subject this to real world user testing to get those answer. I think we can address them in a follow up. |
| icon={ edit } | ||
| label={ __( 'Edit' ) } | ||
| onClick={ () => { | ||
| __unstableSetEditorMode( 'edit' ); |
There was a problem hiding this comment.
This will cause a focus loss as we are not moving focus after the click and the toolbar disappears. Focus should be placed on the selected block. I believe if we send focus to the canvas it will focus the selected block for us. I can look into that today. If it isn't solvable quickly, we may need to revert this as to not introduce a known focus loss.
There was a problem hiding this comment.
Great spot. Strange as I thought that was happening when I tested it. Maybe there's an edge case I missed.
Ping me for a review on your PR.
There was a problem hiding this comment.
It does visually look like focus is moved. It's just bailing to the body of the frame since it doesn't know where to go, and your next Tab press moves focus into the canvas, which is the right spot. So, it's an easy one to miss.
What?
Adds an "Edit" button to the Zoom Out mode toolbar. When clicked will exit Zoom Out mode and allow fine grain editing.
Co-authored-by: getdave get_dave@git.wordpress.org
Related PR #64573
Why?
There has to be a keyboard accessible means for users to exit Zoom Out mode whilst browsing in the Zoom Out canvas. This is to allow users to choose when they'd like to be able to edit the full content of a pattern.
How?
Suggested improvements
Testing Instructions
Testing Instructions for Keyboard
Do the same but ensure it's possible via the keyboard
Screenshots or screencast