-
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
Cannot add Patterns to Page in Zoom Out when all Page Content is removed #67564
Comments
cc @richtabor who discovered this bug |
I believe it is because there is no insertion point in an empty editor. As mentioned in the two pre-required conditions for pattern insertion in zoom out mode. Reference -: gutenberg/packages/block-editor/src/components/block-list/zoom-out-separator.js Lines 81 to 83 in 88a3cef
|
Thanks for looking that out 👍 The goal should be to always show some kind of insertion point so we need to amend that code. |
We should also take a close look at this conditional which will stop the drop zone being rendered gutenberg/packages/block-editor/src/components/block-list/zoom-out-separator.js Lines 65 to 72 in f6c0334
|
Looked into this some more. It turns out the I tested by adding a I believe this is because in non-zoomed out, the in between inserter (i.e. the thin blue line that appears) acts as an indicator for the dropzone. |
A part fix is in #68026 which improves visual affordances when dragging over the unmodified default paragraph. |
Further to the above the solution will likely be as follows:
|
I am not sure this is a zoom out issue. One cannot drop blocks or patterns in the canvas if there is nowhere to drop them to. If the user managed to create a situation we should solve the problem globally and detect that situation, then decide on some heuristic (e.g. depending on the entity edited) to insert somewhere where it seems best. Or we should let the user know there is nowhere to insert via some notification. |
Description
When a Page is completely empty of all content (including any default placeholder paragraph block) then it is impossible to add Patterns to a Page in Zoom Out.
Step-by-step reproduction instructions
core/post-content
block left.Screenshots, screen recording, code snippet
Screen.Capture.on.2024-12-04.at.10-58-54.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: