-
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 "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
|
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 this is working nicely and makes a lot of sense to have
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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 [email protected]
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