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
|
MaggieCabrera
left a comment
There was a problem hiding this comment.
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.
| // 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.
Missed this one. Apologies
There was a problem hiding this comment.
@MaggieCabrera Please can you approve #68051
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
|
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 <1645628+mikachan@users.noreply.github.com> --------- Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org>
…WordPress#68031) * Hide inserter * Comment case Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com> --------- Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org>
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