Skip to content

Collapsed block incorrectly shows warnings from following sibling stack #9566

@goughjo02

Description

@goughjo02

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

When a block is collapsed, it incorrectly inherits warnings from its following sibling stack.
Repro: inside a repeat block, if the second child has a warning/error, collapsing the first child causes the first child to show a warning icon.
Expected: collapsed warnings should only reflect warnings inside the collapsed block (its inputs/children), not warnings from following siblings.
Actual: collapsing the first child shows a warning when only the second child has a warning.
I’m preparing a PR with a regression test and fix for this.

Reproduction steps

  1. Open Blockly playground playground.
  2. Create a repeat block and attach two child statement blocks inside it (first and second child in the stack).
  3. Put a warning/error on the second child (any block that triggers a warning).
  4. Collapse the first child.
  5. Observe the first child shows a warning icon even though only the second child has a warning.

Priority

Work effort: Likely a small fix; the warning propagation for collapsed blocks appears to include following siblings.
Impact: Visual warning indicator is incorrect, which can mislead users when collapsing stacks.
Workaround: Avoid collapsing the first child when the next sibling has warnings.

Stack trace

N/A

Screenshots

You can see when the first child is not collapsed, there is no warning on it. When the first child is collapsed, it shows a warning.

Image Image

Browsers

Chrome desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugDescribes why the code or behaviour is wrongissue: triageIssues awaiting triage by a Blockly team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions