-
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
Nav offcanvas restore click to edit #47608
Conversation
Size Change: -120 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Flaky tests detected in d52b91d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4055108896
|
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've tested this and now with the animation and the back button all my initial concerns are solved. The UI in the inspector predictably gets replaced with the details of the selected block, there is a small delay that does not flash the new UI in. All good.
The drag and drop functionality works perfectly unaffected by this change. And the code removes a lot of cruft for that edit button.
Thanks @draganescu! I'll wait to hear from @SaxonF and @talldan just in case there are any UX or other issues they foresaw (as the originators of the two approaches). Then we can merge. |
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 looks great. My only concern is that focus should stay in the inspector, but that's nothing to do with this PR. 🚢
@MaggieCabrera this is known. There used to be a check removed in 421f7ca as hardcoding that block name to avoid this behavior is likely not the way to go about it. At the same time, the normal left hand list view also has this problem. In a page list selecting page list items in the canvas does not work, but it works using the list view. So I think we should treat this as a bug of how locked blocks are handled by list view not a problem of this PR. What do you think? |
yeah, I don't think that should block this PR |
@getdave could this PR get rid of the |
0414eb6
to
d40e93e
Compare
d40e93e
to
d52b91d
Compare
Looks good, let's bring this in. |
What?
Removes the "edit" button for each node and allows clicking on a node to trigger "edit mode" for that block.
Why?
See rationale in #47023 (comment).
Kudos to @talldan who suggested this originally and received push back 🙇♂️
How?
Ensure only valid blocks are editableWe decided it's better to allow all blocks to be editable and simply imply/hint that certain blocks are not editable via UI affordances. Ultimately if a user wants to check controls on Page List Items they should be able to. It's also better for a11y as it's more consistent to retain same behaviour across all nodes.Testing Instructions
Test not possible to edit Page List Item blocks.No longer needed. See above.Testing Instructions for Keyboard
Screenshots or screencast
Screen.Capture.on.2023-01-31.at.11-38-38.mp4