Skip to content
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: insertion marker position when connection is resized (#7426) #7482

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

clementcontet
Copy link
Contributor

The basics

The details

Resolves

Fixes #7426

Proposed Changes

When positioning the insertion marker, take into account that its connection may have been resized.

Reason for Changes

With these changes, when positioning the insertion marker, we ensure that the target connection will not move.

Test Coverage

I tested in the playground with Zelos and Geras that insertion markers don't move target connections anymore, even if their connection have been resized.

Documentation

N/A

@clementcontet clementcontet requested a review from a team as a code owner September 12, 2023 09:28
@google-cla
Copy link

google-cla bot commented Sep 12, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@clementcontet clementcontet changed the title Fix 7426 fix: insertion marker position when connection is resized (#7426) Sep 12, 2023
@github-actions github-actions bot added the PR: fix Fixes a bug label Sep 12, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome! It looks like this is your first pull request in Blockly, so here are a couple of tips:

  • You can find tips about contributing to Blockly and how to
    validate your changes on our
    developer site.

  • All contributors must sign the Google Contributor License
    Agreement (CLA). If the google-cla bot leaves a comment on this
    PR, make sure you follow the instructions.

  • We use conventional commits
    to make versioning the package easier. Make sure your commit
    message is in the proper format
    or learn how to fix it.

  • If any of the other checks on this PR fail, you can click on
    them to learn why. It might be that your change caused a test
    failure, or that you need to double-check the
    style guide.

Thank you for opening this PR! A member of the Blockly team will review it soon.

y: closest.y - imConn.y,
};
const originalOffsetInBlock = imConn.getOffsetInBlock().clone();
const imConnConst = imConn;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: You don't need to assign this to another variable. You can just pass it directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, no.
These values are modified during the render.
That's why I get their "original" value in constants before the render.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see.

Copy link
Collaborator

@rachel-fenichel rachel-fenichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks good. There's one nit to fix, and then I'll merge it.

@rachel-fenichel rachel-fenichel merged commit fc76981 into google:develop Sep 13, 2023
@clementcontet clementcontet deleted the fix-7426 branch September 14, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chasing reporter block around in zelos
2 participants