fix(admin): use field-generic wording for details/error prop docs - #4662
Conversation
|
This PR targets a stable release branch ( When you open the forward-port PR, include a line like this in its body so the Accepted formats (comma-separated for multiple):
If a forward-port isn't needed (e.g., the change is stable-only), you can remove the |
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>
fe157df to
fa539a4
Compare
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>
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>
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>
|
We detected some changes in |
`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>
What
The shared
FieldDetailsProps.detailsandFieldErrorProps.errorJSDoc insrc/surfaces/admin/components.d.tswas written forcheckbox: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 theFieldProps/BaseTextFieldProps/RequiredMoneyFieldPropsinterfaces.Contrary to the issue's description,
checkboxhad 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.jsonupdated foradmin_extensions/2026-07-rc,app_home, andapp_home_ui_extension/2026-07-rc— 40 replacements each across four distinct literals (20 flattenederror, 18 flatteneddetails, 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 undersrc/ordocs/.Follow-up (not in this PR)
This file is a vendored copy of
@shopify/admin-ui-components, bulk-replaced bybump admin-ui-componentscommits. The durable fix lives in World atlibraries/javascript/polaris/admin-ui-components/lib/publicDocsMemberDescriptions.js, which hand-overrides the (already-correct)ui-api-designJSDoc and duplicates the bad string per component — 36 strings across 19 entries, includingDropZone. Without that change this regresses on the next vendor bump. Tracked in shop/issues-learn#2959.🤖 Generated with Claude Code