Skip to content

feat: tell which input pin is free when the pale play button is pressed, and bring the outlined component into view - #118

Merged
Rn86222 merged 5 commits into
mainfrom
feat/explain-play-blocked
Nov 21, 2026
Merged

Rn86222 merged 5 commits into
mainfrom
feat/explain-play-blocked

Conversation

@Rn86222

@Rn86222 Rn86222 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

At the exhibition, a visitor's stage 3 circuit had an Or whose A pin was free, out of view. The play button was simply disabled, and "Check" named a pin nobody could find.

  • Play button: while an input pin of the edited component is free, the button stays pale, so it still tells when every pin is connected, but it can now be pressed. Pressing it tries to play, and the simulation goes back to editing with the free pin named and its component outlined, as it already did for a pin free inside a placed component. The button is named "Play" / "Back to editing" for screen readers. Stage 1's step says the button turns green once every pin is connected, and that pressing it before tells which pin is free.
  • Bringing the outlined component into view: when a failed check or an error on playing outlines a component that is out of view, the view fits every component, as the tutorial does on opening, with room at the bottom for the error message. If the outlined components are already in view, the view is left as it is.

Not in this PR

  • Drawing outlined components in front of the others. A component hidden under another one is still hidden.
  • Telling apart several errors at once: a bit width conflict is still reported before a free pin.

Testing

  • npx vitest run (317 tests), npx tsc -p . and npx biome check src pass. New tests cover:
    • pressing play with a free pin going back to editing with the pin named and its component outlined
    • whether a rectangle is in view, and that a fitted view shows every rectangle
    • the view moving only when an outlined component of the edited component is out of view or under the error message, and only once the editor has a size
  • In the browser: the pale play button and pressing it in stage 1, a failed check with the outlined Or out of view in stage 3, and the button turning green once every pin is connected.

🤖 Generated with Claude Code

Rn86222 and others added 4 commits November 21, 2026 13:09
… free

The play button could not be pressed while an input pin was free, and
said nothing of which. It now stays pale then, so that it still tells
when every pin is connected, but pressing it tries to play, and the
simulation goes back to editing with the free pin named and its
component outlined, as it already did for a pin free inside a component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outlines it

A component outlined out of view, e.g. dropped far off, left the player
with a message about a pin they could not find. When an error or a
failed check outlines one out of view, the view now fits every
component, as when the editor opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the play button

- The view fitted for an error leaves room at the bottom for the message
  about it, which could otherwise cover the component it names.
- Stage to canvas is worked out in one place for the view and for the
  check of what is in view, and showNodes is tested.
- The play button is named for screen readers, and stage 1 says it
  turns green rather than dark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Deploying create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0005a96
Status: ✅  Deploy successful!
Preview URL: https://aabfe78f.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev
Branch Preview URL: https://feat-explain-play-blocked.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev

View logs

…sage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rn86222
Rn86222 merged commit 36b847b into main Nov 21, 2026
2 checks passed
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.

1 participant