Skip to content

fix: Redo move templates#9822

Merged
mikeharv merged 5 commits intoRaspberryPiFoundation:v13from
mikeharv:redo-move-templates
May 7, 2026
Merged

fix: Redo move templates#9822
mikeharv merged 5 commits intoRaspberryPiFoundation:v13from
mikeharv:redo-move-templates

Conversation

@mikeharv
Copy link
Copy Markdown
Contributor

@mikeharv mikeharv commented May 6, 2026

The basics

The details

Resolves

Fixes #9801 and #9803

Proposed Changes

This adds punctation and capital letters where needed to Toast text and ARIA live region announcement messages. This makes things more readable, especially when multiple messages are coalesced.

image

This also changes the basic structure of block move announcement templates in the following ways:

  • Connection labels (for disambiguation) will now be read before block labels. A new "%1 of %2" message helper was defined to facilitate this.
  • Existing template messages were simplified to just 2 placeholders. (Either can be replaced by the intermediate helper mentioned above, if needed for disambiguation).
  • Moves involving value input connections and output connections will now always use the preposition "to" (formerly "inside" or "around" depending on the direction of connection).

Block and input labels in move announcements are now more terse; omitting the "type" part of each field's label.

The heavy function computeMoveLabel was refactored to use a couple of newly introduced helpers.

Reason for Changes

The aria-live region now coalesces messages together when required, however, the messages lack punctuation, and when they are concatenated, the screen outputs one long sentence with varying levels of sense.

Example: "moving on workspace" is appended to the move mode hint but no full stop separates these two distinct sentences so they are no longer distinct.

(Without changes...)
Image

Feedback also suggests it's confusing to use the same "inside"/"around" terminology for both statement inputs (when moving inside a container block or wrapping a container block around other blocks) and value inputs. Those labels are now reserved for the former case with the more general "to" being used for all horizontal connections.

Test Coverage

Existing tests were updated to reflect the new expected strings.

Additional Information

Note that this doesn't fully resolve #9803 as there is still open question about handling disambiguation of inputs with identical labels.

This branch is based on #9817. That PR can be closed without merging if this one is accepted first.

@mikeharv mikeharv requested a review from a team as a code owner May 6, 2026 19:00
@mikeharv mikeharv requested a review from maribethb May 6, 2026 19:00
@mikeharv mikeharv changed the title Redo move templates fix: Redo move templates May 6, 2026
@github-actions github-actions Bot added the PR: fix Fixes a bug label May 6, 2026
@mikeharv mikeharv merged commit 23fcf16 into RaspberryPiFoundation:v13 May 7, 2026
4 checks passed
@mikeharv mikeharv deleted the redo-move-templates branch May 7, 2026 20:15
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