Repository navigation
Conversation
|
Size Change: 0 B Total Size: 1.27 MB ℹ️ View Unchanged
|
Mamaduka
left a comment
There was a problem hiding this comment.
The fix works well in my tests.
✅ I can see a drop indicator before the first block and after the last block.
✅ Now, I can also drop files and blocks on those positions.
The drop indicators inside the gallery do not always show up for the first and the last block. But probably can be handled separately.
Screencast
CleanShot.2022-08-11.at.10.08.42.mp4
I am also seeing this, it seems that for horizontal layouts like the gallery the indicator does not appear before the first block (left of it). It is showing after the last block however. cc @talldan |
What?
Reported in #43127, Partial fix for #32880
Fixes the drag and drop insertion point indicator at the start and end of block lists, which had regressed again.
This time adds e2e tests to prevent future regressions.
I did try writing these tests in Playwright, but the drag and drop utilities there are not quite as fully-featured as puppeteer's.
How?
The fix is easy, just changes some boolean logic around how the in-between inserter renders.
I think the regression keeps happening because contributors are trying to optimize performance but don't realise they're introducing a bug. Hopefully the added comments and tests will prevent this in future.
Testing Instructions
Note - if you drag too far (outside the bounds of the block list) dropping a block won't work and the insertion point won't be visible. This is already captured as an issue in #32880. It's a more complicate issue to fix.
Also worth testing:
Screenshots or screencast
Before
Kapture.2022-08-11.at.12.53.43.mp4
After
Kapture.2022-08-11.at.12.51.41.mp4