-
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
fix: removed X & Y from toolbox.ts and replaced movBy to moveTo #7333
fix: removed X & Y from toolbox.ts and replaced movBy to moveTo #7333
Conversation
@BeksOmega can you help me with the changes which I made are correct or not? |
Hello :D Currently the review for this is assigned to @maribethb ! I'll ask her if she wants me take it =) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM =) Could you update the PR description to describe how you tested this? Once we have info about that and CI passes I'll merge this!
I will do this in the morning, tho. I did try doing the original steps earlier and found no changes. Furthermore, I will do it in the morning with a fresh perspective. |
Hi @BeksOmega , I tested it now and the newly modified proposed changes are working as they were expected. I am attaching the SS for both the modified code and the unchanged code with different value in playground.html and change
|
Sweet looks great! Thank you for the fix and the testing @varshneydevansh :D |
The basics
npm run format
andnpm run lint
The details
Resolves
Proposed Changes
The BlockInfo type should be updated to not include X and Y.
Blockly has two kinds of flyouts built-in, horizontal and vertical. You should update the layout logic in both of them.
The flyouts should be changed to use moveTo instead of moveBy
Behavior Before Change
The
BlockInfo type
was picking up the values ofx
andy
henceforth the position of the Toolbox Element was getting changed.Behavior After Change
After removing the
X
andY
from theBlockInfo type
the Toolbox Element is now ignoring the value and introducing the chnage to the code in filesto use
moveTo
instead ofmoveBy
Ignoring the x and y properties on blocks would allow them to position correctly.
Reason for Changes
Because, the blocks were using the
relative coordinates
instead of theabsolute coordinates
Test Coverage
Browser which I used is MS Edge Version 115.0.1901.188 (Official build) (64-bit)
Documentation
Additional Information
It's my first PR on this project, so I might make mistakes.