-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Chasing reporter block around in zelos #7426
Comments
Hi Rachel, Indeed I don't have the problem with small child blocks, or when switching to Geras. But I found that even when the connection is done directly (without "chasing"), when the insertion marker appears, it appears at a place that makes the child block to be moved below. child.block.moved.mov |
The fix would be to note the difference between the position of the connection when the value input is expanded vs the position of the connection when the value input is at its default size, and to shift the parent bock up and left by that difference. But this would cause a different problem: the dragged block would have to jump relative to the mouse. I think that would be worse. What do you think? |
We would first see the insertion marker of the block on its target position, right? And I think we already see this "jump" with insertion marker: insertion.marker.moved.mov |
You're correct. Okay, we'll look at getting the marker to position so that the connecting block doesn't have to move. |
@clementcontet If you want to fix this, take a look at the |
Hi @rachel-fenichel, I tried to implement what you described, but I was a bit lost and I'm not sure I did well.
I didn't find a way to get the expanded input in But if I only moved the insertion marker after the render, it didn't work either (I guess because the insertion marker would not be placed correctly next to the target connection and the renderer fails?). So my solution was to keep intact the current move before the render, and after the render, move it again according the displacement of the expanded input. Is it the right way to do it? |
Hi Clement, Sorry for the delay in responding. Yes, your solution looks reasonable (in this commit). Your analysis is correct: the blocks have to be connected before you can figure out the new location of the connection, which means that repositioning has to happen after connecting instead of before. Doing it that way is also more general than the existing To avoid flickering, you should also move the If you put those changes into a PR, we'll happily review and take them. |
fix: insertion marker position when connection is resized (#7426)
Check for duplicates
Description
This bug was originally reported in #7412 by @clementcontet
See the screenshot for the originally reported bug.
I think the mechanism is: Sometimes when the insertion marker appears it moves the valid connection far enough away from the target connection that it becomes invalid, which makes the target block disconnect and get bumped away from the dragging block.
This is more likely to happen when using zelos because it changes the height of the input and moves the connection location down, while geras and thrasos leave the connection in the same location relative to the top left of the dragging block.
To verify: try the same drag with taller and shorter value blocks. The problem should become more visible the taller the value block is.
Reproduction steps
Stack trace
No response
Screenshots
261792452-91c9a89e-e6e5-47e5-aa88-5ddaddaa3508.mov
Browsers
No response
The text was updated successfully, but these errors were encountered: