Skip to content

fix: labels for multi-statement blocks#9868

Merged
mikeharv merged 3 commits into
RaspberryPiFoundation:v13from
mikeharv:multi-branch-labels
May 14, 2026
Merged

fix: labels for multi-statement blocks#9868
mikeharv merged 3 commits into
RaspberryPiFoundation:v13from
mikeharv:multi-branch-labels

Conversation

@mikeharv
Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #9617

Proposed Changes

When focusing a block with multiple statement inputs (or moving to one), the block label will now:

  • Only include labels from inputs up to the first statement, inclusive.
  • Include a has %1 branches label indicating the number of statement inputs.
  • No longer include has inputs as it's redundant and confusing.
image

Move announcements will similarly use the new shorter label, but will continue to not add an input/branch count label:

image

Reason for Changes

From the linked issue:

The label for the block should only include the text of the first branch, plus the number of branches. e.g. "if, has 3 branches"

Test Coverage

Tests were added to ensure that block labels are computed as expected for multi-statement blocks.

@mikeharv mikeharv requested a review from a team as a code owner May 13, 2026 20:31
@mikeharv mikeharv requested a review from maribethb May 13, 2026 20:31
@github-actions github-actions Bot added the PR: fix Fixes a bug label May 13, 2026
@mikeharv mikeharv merged commit 463f95e into RaspberryPiFoundation:v13 May 14, 2026
4 checks passed
@mikeharv mikeharv deleted the multi-branch-labels branch May 14, 2026 13:11
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.

2 participants