Skip to content

fix(blocks): boolean variable block wrong shape for zelos#7335

Merged
BeksOmega merged 2 commits intoRaspberryPiFoundation:developfrom
zfangqijun:fix/var-block-wrong-shape
Jul 31, 2023
Merged

fix(blocks): boolean variable block wrong shape for zelos#7335
BeksOmega merged 2 commits intoRaspberryPiFoundation:developfrom
zfangqijun:fix/var-block-wrong-shape

Conversation

@zfangqijun
Copy link
Copy Markdown
Contributor

@zfangqijun zfangqijun commented Jul 31, 2023

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #7334

Proposed Changes

Behavior Before Change

image
image

Behavior After Change

image

Reason for Changes

I think it's a bug 🤔️

Test Coverage

Documentation

Additional Information

Is there a better way than rerender?

@zfangqijun zfangqijun requested a review from a team as a code owner July 31, 2023 09:55
@zfangqijun zfangqijun requested a review from BeksOmega July 31, 2023 09:55
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jul 31, 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.

@github-actions github-actions Bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Jul 31, 2023
@zfangqijun zfangqijun force-pushed the fix/var-block-wrong-shape branch from 43b4ed2 to 533230a Compare July 31, 2023 09:58
@zfangqijun zfangqijun force-pushed the fix/var-block-wrong-shape branch from 533230a to 9df7f9d Compare July 31, 2023 10:07
@github-actions github-actions Bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Jul 31, 2023
Copy link
Copy Markdown
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

Thank you for finding this bug and submitting a fix :D The change looks great, but I think there's actually a more general place we can put it!

Comment thread blocks/variables_dynamic.ts Outdated
Comment on lines +161 to +163
if (this.rendered) {
(this as BlockSvg).queueRender();
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of having this inside the individual block definition, you can override setCheck in the rendered connection class, and call queueRender there! This way whenever a connection check gets updated on any block, we'll be sure the shapes of the connections get updated =)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for taking the time to review my PR and providing your feedback. I appreciate your suggestions. updated

Copy link
Copy Markdown
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

Sweet, LGTM! I'll get this merged after CI Passes =) Thank you for your hard work on this!!

@BeksOmega BeksOmega merged commit f3899e2 into RaspberryPiFoundation:develop Jul 31, 2023
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.

Variable block wrong shape for zelos

2 participants