Skip to content

fix(admin): use field-generic wording for details/error prop docs - #4662

Merged
sordaz00 merged 1 commit into
2026-07from
so/fix-field-wording-2026-07
Sep 2, 2026
Merged

fix(admin): use field-generic wording for details/error prop docs#4662
sordaz00 merged 1 commit into
2026-07from
so/fix-field-wording-2026-07

Conversation

@sordaz00

@sordaz00 sordaz00 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What

The shared FieldDetailsProps.details and FieldErrorProps.error JSDoc in src/surfaces/admin/components.d.ts was written for checkbox:

Supplementary text displayed below the checkbox to provide additional context, instructions, or help. Use this to explain what checking the box means or provide guidance to users.

Both interfaces are inherited by every Admin and App Home form component, so this checkbox-specific copy renders on ~18 non-checkbox reference pages, where it reads incorrectly. Reported via shopify.dev CSAT feedback on the App Home text field page.

How

Two JSDoc blocks changed. The docs generator expands inherited members, so those two blocks produce all 40 occurrences per generated file — the fix corrects every inheriting component in one change:

text-field, text-area, select, color-field, date-field, email-field, money-field, number-field, password-field, search-field, url-field, choice-list, switch, plus the FieldProps / BaseTextFieldProps / RequiredMoneyFieldProps interfaces.

Contrary to the issue's description, checkbox had no override — it inherited the same string, so no component had correct wording. The new generic phrasing reads correctly for checkbox too, so no override was added.

Generated docs

generated_docs_data_v2.json updated for admin_extensions/2026-07-rc, app_home, and app_home_ui_extension/2026-07-rc — 40 replacements each across four distinct literals (20 flattened error, 18 flattened details, and the two interface source blocks).

These were patched textually rather than by running yarn docs:admin, because the generator copies these strings verbatim and the branch is cut from the freshly-regenerated files in c44c777. The diff arithmetic closes exactly (40 × 3 + 4 = 124), all three files re-parse as valid JSON, and no residual checkbox wording remains under src/ or docs/.

Follow-up (not in this PR)

This file is a vendored copy of @shopify/admin-ui-components, bulk-replaced by bump admin-ui-components commits. The durable fix lives in World at libraries/javascript/polaris/admin-ui-components/lib/publicDocsMemberDescriptions.js, which hand-overrides the (already-correct) ui-api-design JSDoc and duplicates the bad string per component — 36 strings across 19 entries, including DropZone. Without that change this regresses on the next vendor bump. Tracked in shop/issues-learn#2959.

🤖 Generated with Claude Code

@sordaz00
sordaz00 requested a review from a team as a code owner September 1, 2026 13:07
@github-actions github-actions Bot added the needs-rc-port PR against a stable branch awaiting forward-port to the current RC label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This PR targets a stable release branch (2026-07). Once merged, the change typically also needs to be forward-ported to 2026-10-rc so it ships in the next release.

When you open the forward-port PR, include a line like this in its body so the needs-rc-port label gets removed automatically when that PR merges:

Forward-port of #4662

Accepted formats (comma-separated for multiple):

  • #4662
  • GH-4662
  • 4662
  • https://github.com/Shopify/ui-extensions/pull/4662

If a forward-port isn't needed (e.g., the change is stable-only), you can remove the needs-rc-port label manually.

The shared `FieldDetailsProps.details` and `FieldErrorProps.error` JSDoc
was written for `checkbox` ("displayed below the checkbox", "what
checking the box means") and is inherited by every Admin and App Home
form component, where it reads incorrectly.

Replace it with field-generic wording. Because the docs generator
expands inherited members, these two JSDoc blocks produce all 40
occurrences per generated file, so the fix corrects text-field,
text-area, select, color-field, date-field, email-field, money-field,
number-field, password-field, search-field, url-field, choice-list and
switch in one change. The generic wording also reads correctly for
checkbox itself, which had no override.

Generated docs data is updated to match.

Fixes shop/issues-learn#2959

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sordaz00
sordaz00 force-pushed the so/fix-field-wording-2026-07 branch from fe157df to fa539a4 Compare September 1, 2026 13:27
sordaz00 added a commit that referenced this pull request Sep 1, 2026
Backport of fe157df (#4662) to 2026-04.

The shared `FieldDetailsProps.details` and `FieldErrorProps.error` JSDoc
was written for `checkbox` and is inherited by every Admin and App Home
form component, where it reads incorrectly. Replace it with
field-generic wording and update the generated docs data to match.

Fixes shop/issues-learn#2959

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sordaz00 added a commit that referenced this pull request Sep 1, 2026
Backport of fe157df (#4662) to 2026-01.

The shared `FieldDetailsProps.details` and `FieldErrorProps.error` JSDoc
was written for `checkbox` and is inherited by every Admin and App Home
form component, where it reads incorrectly. Replace it with
field-generic wording and update the generated docs data to match.

Fixes shop/issues-learn#2959

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sordaz00 added a commit that referenced this pull request Sep 1, 2026
Backport of fe157df (#4662) to 2025-10.

The shared `FieldDetailsProps.details` and `FieldErrorProps.error` JSDoc
was written for `checkbox` and is inherited by every Admin and App Home
form component, where it reads incorrectly. Replace it with
field-generic wording and update the generated docs data to match.

Fixes 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.

@sordaz00 sordaz00 self-assigned this Sep 1, 2026
sordaz00 added a commit that referenced this pull request Sep 1, 2026
`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" throughout. State verbs follow each
interface's own family vocabulary: `BaseSelectableProps` is the shared
parent of both families and uses "selected", matching its name and the
Option/Choice wording; `BaseCheckableProps` covers only Checkbox and
Switch and keeps "checked", matching the existing `checked` and
`defaultChecked` descriptions on that interface.

Completes the checkbox-terminology cleanup started in #4662 - every
remaining "checkbox" mention in components.d.ts is now genuinely
checkbox-specific.

Refs shop/issues-learn#2959

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sordaz00
sordaz00 merged commit 3e78d56 into 2026-07 Sep 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rc-port PR against a stable branch awaiting forward-port to the current RC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants