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

add upgrade rules for legacy animations and setter for z #6668

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Feb 4, 2025

fixes #6616

this adds two upgrade rules for very old projects and fixes an exception in another. the new rules are explained in the comments

this has actually been broken for a long time, but new blockly has surfaced the errors. old blockly used to be looser with field validation so it wouldn't overwrite invalid field values when the workspace loads, even though it wouldn't render correctly. for example, if you open the project in the linked issue in live you'll see that all of the blocks setting the Sprite.z property actually say x, but they still compile to z because the invalid value isn't overwritten.

new blockly doesn't allow invalid field values in dropdowns, and instead defaults to choosing the first available item in the list of options and overwriting the invalid value with it. the project ends up looking the same in beta but the properties compile to the displayed value x instead of z. same with the animation dropdowns

@riknoll riknoll requested a review from a team February 4, 2025 23:52
Copy link
Contributor

@srietkerk srietkerk left a comment

Choose a reason for hiding this comment

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

LGTM

@riknoll riknoll merged commit be618a4 into master Feb 6, 2025
3 checks passed
@riknoll riknoll deleted the dev/riknoll/old-upgrade-rules branch February 6, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Raptor Run]: The tutorial can't work properly
3 participants