Skip to content

fix(admin): use control-generic wording for selectable prop docs [2026-04] - #4668

Open
sordaz00 wants to merge 1 commit into
2026-04from
so/fix-control-wording-2026-04
Open

fix(admin): use control-generic wording for selectable prop docs [2026-04]#4668
sordaz00 wants to merge 1 commit into
2026-04from
so/fix-control-wording-2026-04

Conversation

@sordaz00

@sordaz00 sordaz00 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Backport of #4667 to 2026-04.

What

Four shared declarations describe themselves as a checkbox, and all of them are inherited by components that aren't checkboxes:

  • BaseSelectableProps (disabled, value) → BaseOptionPropsChoice, Option
  • BaseCheckableProps (label, name) → Switch
  • PreactCheckboxProps / PreactCheckboxElement (value) → Switch (SwitchProps extends PreactCheckboxProps, class Switch extends PreactCheckboxElement)

Wording

"checkbox" → "control". State verbs follow each interface's own family vocabulary: BaseSelectableProps uses selected (matching its name and the Option/Choice wording), the checkable declarations keep checked. "control" matches ui-api-design, the upstream source of truth.

Change

Same 8 sentence-level replacements as #4667, applied to this branch's components.d.ts and generated docs. Each is asserted to appear an exact expected number of times before writing, so version drift fails loudly rather than silently no-op'ing. Generated JSON was patched textually rather than regenerated; all files re-parse as valid JSON and the diff is symmetric (3 files changed, 45 insertions(+), 45 deletions(-)).

Refs shop/issues-learn#2959

🤖 Generated with Claude Code

Backport of #4667 to 2026-04.

`BaseSelectableProps` (`disabled`, `value`) and `BaseCheckableProps`
(`label`, `name`) described themselves as a checkbox. Both are shared
base interfaces, so the copy is inherited by Choice and Option (via
`BaseOptionProps`) and by Switch, where it reads incorrectly.

Replace "checkbox" with "control". State verbs follow each interface's
own family vocabulary: `BaseSelectableProps` uses "selected", matching
its name and the Option/Choice wording; `BaseCheckableProps` covers only
Checkbox and Switch and keeps "checked".

Refs shop/issues-learn#2959

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset directory. If the changes are user-facing and should cause a version bump, run yarn changeset to track your changes and include them in the next release CHANGELOG. If you are making simple updates to repo configuration, examples, or documentation, you do not need to add a changeset.

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.

2 participants