-
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
Zoom out: drag and drop zones behave strangely (disappear, bounce, etc) #65927
Comments
|
What behavior were you expecting? |
Since RC1 is occurring later today and there is no active PR, I think we should punt this to 6.8. Thoughts @colorful-tones @getdave @kevin940726? |
Agree 👍 |
This bug was introduced during this cycle. Therefore I see no reason to punt it at this stage. Can we reassess as we move through RC? |
@getdave Wouldn't this make it a regression if it was introduced into the WordPress 6.7 release cycle and it was not in the WordPress 6.6 release? 🤔 |
The Zoom Out feature was introduced during this 6.7 cycle. At some point the experience referenced in this Issue changed and provided a suboptimal experience. Happy to label it however you'd prefer, but ultimately it would be better to fix it 👍 |
Sounds good, let's reassess as we move further through the release cycle. |
I expect #66110 may have slightly alleviated some of this because it makes for less displacement. Still, I’d suggest that the displacement while dragging is maybe more harmful than helpful for two reasons:
My feeling is that a drop indicator without displacement while dragging would be better. This version with displacement could be saved for when an inserter button was clicked to basically serve as a help message. |
I gave this another test and some issues are still present but they are less pronounced. The most obvious issue is when dragging near the edge of a drop zone. Screen.Capture.on.2024-10-21.at.13-44-53.mp4I will try and see if it's possible to narrow down the causes for this. That said if anyone else would like to jump in I'd be very grateful. |
From debugging (adding logpoints) I could see gutenberg/packages/block-editor/src/components/use-block-drop-zone/index.js Lines 545 to 559 in 013b490
When I logged the elements that were triggering My theory is that the animation of the insertion point causes momentary gaps between the insertion point and neighbouring block, and sometimes the mouse is inadvertently over those gaps causing There might be a few different ways to fix. I have one or two ideas in the works, but don't let that prevent anyone else putting a fix together. I think there's also a secondary issue. Sometimes when you move you mouse over the insertion point it hides and reappears (only once, not repeatedly). I think the same happens for the regular drop zones, and that's more of a longstanding issue. I seem to recall trying to fix it once, will see if I can dig anything up. |
I'm revising this. I think it's more related to layout gaps between sections. For example if you add a huge amount of margin above a section, enter zoom out, and then try dragging above that block, whenever the mouse crosses from the block itself into the margin and back again, the drop zone is retriggered (I think because Kapture.2024-10-21.at.18.54.34.mp4I think the animation can cause this to go into a bit of a loop at times, causing the |
That will be it. I wonder how we resolve that? Maybe ignore events that move from a block into the |
Possibly something like that. I tried one approach, but I think it resulted in some other issues with the insertion points not hiding when they should. I'll continue exploring options. |
Put together a fix here - #66399 It turns out that during Zoom Out, there can be too many drop zones active, and that's what's causing the extra |
When playing around with drag and drop, I noticed that the zones behave a bit strangely:
drag.and.drop.inserter.zoom.out.mov
This was found using WordPress 6.7 nightly.
The text was updated successfully, but these errors were encountered: