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: allow splicing into shadow block stacks #6939

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

maribethb
Copy link
Contributor

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 #6938

Proposed Changes

Fixes a bug in #6800 where you couldn't splice into shadow block stacks. Adds a test case for this behavior.

Behavior Before Change

Couldn't replace a shadow block in a statement input.

Behavior After Change

Can replace shadow blocks in a statement input.

Reason for Changes

Test Coverage

Adds test case for shadow block.

Documentation

Additional Information

@maribethb maribethb requested a review from a team as a code owner March 30, 2023 19:32
@github-actions github-actions bot added the PR: fix Fixes a bug label Mar 30, 2023
Copy link
Collaborator

@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.

LGTM!

Two things I noticed that don't need to be fixed:

  1. Both conditionals for next statements have extra checks for shadows. Theoretically we could just return true for shadows?
  2. For the tests, you should be able to use JSON now, since we're serializing the disabled interaction properties in core.

@maribethb
Copy link
Contributor Author

I am hesitant to refactor the logic now since this one has now had much additional scrutiny, but something we could follow up on after a patch release.

@maribethb maribethb merged commit 69afe5b into google:develop Mar 30, 2023
BeksOmega pushed a commit that referenced this pull request Mar 30, 2023
* fix: allow splicing into shadow block stacks

* chore: format

(cherry picked from commit 69afe5b)
maribethb added a commit to maribethb/blockly that referenced this pull request Apr 13, 2023
* fix: allow splicing into shadow block stacks

* chore: format
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.

Can't replace shadow blocks in statement inputs
2 participants