Skip to content

feat: mark names, values and buttons in part descriptions, and say how parts work on many bits - #113

Merged
Rn86222 merged 3 commits into
mainfrom
feat/part-descriptions
Nov 20, 2026
Merged

Rn86222 merged 3 commits into
mainfrom
feat/part-descriptions

Conversation

@Rn86222

@Rn86222 Rn86222 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The part descriptions (the ⓘ in the parts list and "Available parts" on a stage page) were plain text, described And, Or, Not, Xor, True and False only on one-bit values, and told how to set a pin's bit width as if it had one field.

  • Marks: the descriptions and pin notes draw names in bold, values as the tables do, and "Apply", "Add" and "Remove" as the real buttons, with the same markup as the stage texts. StageText is renamed to MarkedText, as it is no longer only for stages. The look of "Add" and "Remove" is shared with the pin editor through controlLooks.ts.
  • Values of two or more bits:
    • And, Or, Xor and Not say what they do bit by bit.
    • True and False say that every bit of a wider output is 1 or 0.
    • FlipFlop starts at OFF, or at all 0 bits, instead of "0" for any width.
    • In Japanese, 「何ビットもの」 is now 「2ビット以上の」, in the descriptions and in stage 8. The English texts say "two or more bits" to match.
  • Pin notes: a pin that can be split has a field for each pin, from the top. The note now says so, and tells that "Add" adds a field at the bottom and "Remove" removes the bottom one, before "Apply".

Not in this PR

  • The descriptions use "bit" in stages 1 to 3 too, before the word is taught in stage 4. They are help the player opens, so they describe the parts fully.
  • A pin of 100 bits or more shows "99+", which the note does not mention. Only a width typed by the player reaches it, and no stage does.

Testing

  • npx vitest run (308 tests), npx tsc -p . and npx biome check src pass. New tests cover, for every part description in English and Japanese:
    • the same values and buttons being marked in both languages
    • names being the part's own name or its pins
    • pin notes pointing at "Apply", and at "Add" and "Remove" only where a pin can be split
  • In the browser, in English and Japanese: the ⓘ of And in stage 1 and of FlipFlop and Broadcast in stage 8, the "Available parts" of stage 6, and the pin editor's buttons.

🤖 Generated with Claude Code

Rn86222 and others added 3 commits November 21, 2026 01:56
…se it too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w parts work on many bits

The descriptions of parts and their pins now draw names, values and the
"Apply", "Add" and "Remove" buttons as the stage texts do.

And, Or, Not, Xor, True and False described only one-bit values, and
FlipFlop wrote its first output as 0 whatever its width. The pin note
spoke of one field, while a split pin has a field for each pin and a
"Remove" button too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…part notes by what they mark

True and False take no input, so "in a value of two or more bits" had
nothing to refer to; they now speak of their output, as FlipFlop does.
The tests check that each pin note points at the right buttons in every
language, and that a description names only its own part and pins.

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

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

Copy link
Copy Markdown

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

Latest commit: 920ffe2
Status: ✅  Deploy successful!
Preview URL: https://afc57ee6.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev
Branch Preview URL: https://feat-part-descriptions.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev

View logs

@Rn86222
Rn86222 merged commit 89df8a7 into main Nov 20, 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