-
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
Hide Zoom Out Inserters when dragging into canvas #65789
Conversation
@@ -34,7 +34,8 @@ function selector( select ) { | |||
getSettings, | |||
__unstableGetEditorMode, | |||
isTyping, | |||
} = select( blockEditorStore ); | |||
isDragging, |
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.
Private selector.
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: +21 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
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.
Looks good, nice improvement.
There's one small thing that I noticed that could still be improved. If you cancel the drag by dragging back to the inserter and releasing, the blue inserter button reappears and the gray insertion zone doesn't hide until hovering over the canvas:
Kapture.2024-10-01.at.16.24.04.mp4
Could be a follow up as it's more of an edge case.
Thanks @talldan!
Ah yes. I think I know why. I will try and fix that in a followup as it's likely to be fairly complex. |
Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org>
This reverts commit 9a16053.
Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org>
What?
Hides the Zoom Out inserters when dragging blocks into the canvas in Zoom Out mode.
Closes #65748
Why?
See #65748. It looks messy and overlaps occur.
How?
Conditionally render the inserters when
isDragging
state istrue
.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Capture.on.2024-10-01.at.14-35-09.mp4