-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Adjust block selection button #60348
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. |
It's a known issue that the toolbar is missing some separators. But that stems also from the fact that it's historically implemented as a flex group not as a navigable toolbar. To make it a toolbar some refactoring is required and I'd like that in a specific PR. |
Size Change: -297 B (0%) Total Size: 1.73 MB
ℹ️ View Unchanged
|
ea50e31
to
b202116
Compare
b202116
to
20fcf0f
Compare
const showBlockDraggable = | ||
( canMove && editorMode === 'navigation' ) || | ||
( editorMode === 'zoom-out' && canMove && ! isBlockTemplatePart ); |
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.
Maybe this is easier to read?
const showBlockDraggable = | |
( canMove && editorMode === 'navigation' ) || | |
( editorMode === 'zoom-out' && canMove && ! isBlockTemplatePart ); | |
const showBlockDraggable = canMove && | |
( editorMode === 'navigation' || ( editorMode === 'zoom-out' && ! isBlockTemplatePart ) ); |
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.
Debatable? 😁
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.
const showBlockDraggable = | |
( canMove && editorMode === 'navigation' ) || | |
( editorMode === 'zoom-out' && canMove && ! isBlockTemplatePart ); | |
const showBlockDraggable = | |
( canMove && editorMode === 'navigation' ) || | |
( canMove && editorMode === 'zoom-out' && ! isBlockTemplatePart ); |
Changing the order also makes it more readable.
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.
In general, I think all the inline conditions below could be brought up here to make things more readable too.
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 is working great, and the code looks good.
* adds drag button to zoom out, rearranges buttons, removes block name in zoom out * remove double block mover
What?
Advances #60124
Why?
To improve the toolbar available in zoom out mode.
How?
Testing Instructions
Testing Instructions for Keyboard
N/A
Screenshots or screencast