Add select-parent button to block toolbar "More options" menu.#40105
Merged
ZebulanStanphill merged 2 commits intotrunkfrom Apr 7, 2022
Merged
Conversation
|
Size Change: +242 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
alexstine
requested changes
Apr 7, 2022
Contributor
alexstine
left a comment
There was a problem hiding this comment.
@ZebulanStanphill This is working well for me. One small label change that would make this perfect. Context is everything for screen reader users.
packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js
Outdated
Show resolved
Hide resolved
…-settings-dropdown.js Co-authored-by: Alex Stine <alex.stine@yourtechadvisors.com>
6 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Split out and updated from the obsolete #23800, this PR adds a "Select parent" button to the block toolbar's ellipsis menu.
Why?
In a brief discussion at the end of #23800, it was suggested that a select-parent option in the block toolbar ellipsis menu might still be useful, even after the improvements to the one on the left of the block toolbar.
Specifically, the thin-viewport/mobile version of the UI does not show the standard select-parent button, so this ellipsis menu option can serve as a substitute in that context.
How?
This PR just adds a button to the block toolbar ellipsis menu that behaves pretty much identically to the one visible on the left of the standard desktop viewport block toolbar.
Testing Instructions
Notes
I've noticed that merely focusing the ellipsis menu option does not make the parent block outline show, which is different from the behavior of the icon-button on the left of the block toolbar. I can't find a reason for this, thought I suspect it has something to do with a quirk of how
useShowMoversGesturesworks. (Speaking of which, that hook really needs a refactor, since even its name no longer makes sense after all the changes that have been made to the block toolbar since the hook's creation. I'll probably do that as a separate PR at some point.)Screenshot