-
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
Fix don't show inserter in Zoom Out dropzone when the text is visible #68031
Fix don't show inserter in Zoom Out dropzone when the text is visible #68031
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: +51 B (0%) Total Size: 1.84 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.
This LGTM, tests ok and the code makes sense
const nextClientId = blockOrder[ insertionIndex ]; | ||
|
||
// if the block insertion point is visible, and the insertion | ||
// indicies match then we don't need to render the inserter. |
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.
// indicies match then we don't need to render the inserter. | |
// indices match then we don't need to render the inserter. |
Super nit
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.
Missed this one. Apologies
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.
@MaggieCabrera Please can you approve #68051
packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js
Outdated
Show resolved
Hide resolved
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.
Also LGTM!
Co-authored-by: Sarah Norris <[email protected]>
Flaky tests detected in d31f0df. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12372755704
|
…WordPress#68031) * Hide inserter * Comment case Co-authored-by: Sarah Norris <[email protected]> --------- Co-authored-by: getdave <[email protected]> Co-authored-by: MaggieCabrera <[email protected]> Co-authored-by: mikachan <[email protected]>
…WordPress#68031) * Hide inserter * Comment case Co-authored-by: Sarah Norris <[email protected]> --------- Co-authored-by: getdave <[email protected]> Co-authored-by: MaggieCabrera <[email protected]> Co-authored-by: mikachan <[email protected]>
What?
Hides the inserter
+
when the zoom out dropzone is renderedCloses #67568
Why?
Because otherwise - as per the Issue - we get the inserter rendered on top of the drop zone text in Zoom Out.
How?
Conditionally displayed the inserter only when the current insertion index doesn't match the targetted insertion index for the inserter being rendered.
Testing Instructions
+
inserter+
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Capture.on.2024-12-16.at.14-37-20.mp4