-
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
Block Gap for the inserter is getting ignored on last elements #55433
Comments
Confirmed this in testing with WP 6.3.2 and TT3 |
Just to confirm, is the expectation that the inbetween inserter line will reflect the block gap value that will take effect after dropping? If so, it's a tricky one. The inbetween inserter popup is rendered above the block list (under I had a quick look to see if we could apply some bottom margin to the last-child of a container that has block gap applied when the inserter is being dragged, but couldn't get it to work. The inbetween inserter has been explicitly given a zero margin:
So the idea is that, if a block container with layout knows that the block inserter is positioned after the last-child we add the relevant blockGap value to the inserter's margin. But in practice it's not straight forward. |
Not sure if I got this. I see how this is becoming tricky, especially when considering horizontal blocks. |
Thanks for the clarification. It's what I understood, but I phrased it poorly, sorry! 👍🏻 I agree with your sentiments in relation to getting the preview state right while dragging, I'm just not sure about the best way to reflect this yet. 🤔 |
Description
When I am having a column block and some groups within, I'd like to move the groups around. The column has a block gap, which isn't displayed on the last element when drag & dropping the groups. The inserter should have a padding (= half the block gap).
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Screen.Recording.2023-10-18.at.08.12.20.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
No
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: