Repository navigation
[docs] Core: list the props ComplexSelector, Selector, Toast and ContextMenuItem take - #12541
josephfarina wants to merge 6 commits into
Conversation
…xtMenuItem take Each doc gains the props its component already takes and the doc left out; the prop-docs test's known list loses the ten lines this fixes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| ComplexSelector · Storybook | 78.7 kB (0) · 12.7 kB CSS (0) | 737 (0) |
| ContextMenu · Storybook | 103.4 kB (0) · 18.8 kB CSS (0) | 725 (0) |
| Selector | 114.8 kB (0) · 18.7 kB CSS (0) | — |
2 more components
| Component | Size | LoC |
|---|---|---|
| SelectorOption | 24.2 kB (0) · 6.7 kB CSS (0) | — |
| Toast · Storybook | 105.5 kB (0) · 11.1 kB CSS (0) | 1,734 (0) |
Package size: @astryxdesign/core 7.66 MB packed (+1.0 kB); no new dependencies.
Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Current run: CI concluded cancelled; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: two of the new prop descriptions say something the component does not do.
packages/core/src/Toast/Toast.doc.mjs:59:isExitingdoes not stop the auto-hide timer, since the timer code inToast.tsxnever reads it andonDismiss('auto')still fires afterautoHideDuration, so describe what it does instead (it plays the exit motion and stops responding to swipes).packages/core/src/Selector/Selector.doc.mjs:356: leavingplacementout puts the selected option over the trigger only when the selector has no search, so add that withhasSearchthe popup opens below the trigger.
Every other new entry matches its component's props type. The ContextMenuItem entries match DropdownMenuItem's docs exactly, and the prop-docs check passes with the ten drift lines removed.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the four docs now list the props the changeset names, which the components already take. Verified against each component's props type.
- Claim: ContextMenuItem takes those props as the DropdownMenuItem it re-exports. Verified at the ContextMenu entry point.
- Claim: the CLI's component output left these props out, including ContextMenuItem's
onClickandhref. Verified against the base branch's output. - Claim: each entry takes its type, default and meaning from the source declaration and JSDoc, or from DropdownMenuItem's docs. False for Toast
isExiting, which has no JSDoc and whose described timer behavior is wrong; true for the other entries. - Claim: the known-drift list loses the ten fixed lines, and ContextMenuItem is not compared because it has no same-stem source. Verified.
- Claim: the prop-docs test passes, so the entries agree with the code on name, required, default and type. Verified; 156 tests pass across the listed suites.
- Claim: documentation only, with no runtime, API, visual or policy change. Verified; the API comparison shows no change from this pull request.
- File
.changeset/core-docs-missing-props.md: clear. - File
packages/cli/test/core-prop-docs.known-drift.json: clear. - File
packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear. - File
packages/core/src/ContextMenu/ContextMenuItem.doc.mjs: clear. - File
packages/core/src/Selector/Selector.doc.mjs:placementdescription (finding above). - File
packages/core/src/Toast/Toast.doc.mjs:isExitingdescription (finding above).
…cement opens below with search
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because its run was refused while CI was full, so it needs a re-run.
Both earlier points are fixed: the isExiting entry now describes the exit motion and the swipe lock instead of the timer, and the placement entry now covers searchable selectors. Every new entry matches its component's props, and the ContextMenuItem entries match DropdownMenuItem's docs exactly.
Claims and files checked
Review mode: incremental; reason: none
- Claim: the four docs now list the props the changeset names, which the components already take. Verified against each component's props type.
- Claim: ContextMenuItem takes those props as the DropdownMenuItem it re-exports. Verified at the ContextMenu entry point.
- Claim: the CLI's component output left these props out, including ContextMenuItem's
onClickandhref. Verified against the base branch's output. - Claim: each entry takes its type, default and meaning from its source declaration and doc comment, or from DropdownMenuItem's docs. Verified;
isExitingandchangeActionhave no doc comment, and their text matches the code that reads them. - Claim: the known-drift list loses the ten fixed lines, and ContextMenuItem is not compared because it has no same-stem source. Verified.
- Claim: the prop-docs test passes with those lines removed, and the other listed suites pass with 155 tests. Verified at this head.
- Claim: documentation only, with no runtime, API, visual or policy change. Verified; the API comparison shows no change from this pull request.
- Claim: public text carries no internal context. Verified.
- File
.changeset/core-docs-missing-props.md: clear. - File
packages/cli/test/core-prop-docs.known-drift.json: clear. - File
packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear. - File
packages/core/src/ContextMenu/ContextMenuItem.doc.mjs: clear. - File
packages/core/src/Selector/Selector.doc.mjs: clear; theplacemententry is fixed. - File
packages/core/src/Toast/Toast.doc.mjs: clear; theisExitingentry is fixed.
…oast and ContextMenuItem take
The prop type is LayerPlacement; the doc names its four values, as docPropLiterals asks, so a reader without an IDE sees what to write.
|
/approve-spec 22b828e |
There was a problem hiding this comment.
Approved pending CI: CI is still running on this head.
The one change since the last review writes Selector's placement type as 'above' | 'below' | 'start' | 'end', exactly the values its props type allows, and the earlier isExiting and placement description fixes still hold. Every new entry matches its component's props, and the ContextMenuItem entries match DropdownMenuItem's docs.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: the four docs now list the props the changeset names, which the components already take. Verified against each component's props type.
- Claim: ContextMenuItem takes its new props as the DropdownMenuItem it re-exports. Verified at the ContextMenu entry point.
- Claim: the CLI's component output left these props out, including ContextMenuItem's
onClickandhref. Verified against the base branch's output. - Claim: each entry takes its type, default and meaning from its source declaration and doc comment, or from DropdownMenuItem's docs. Verified;
placementnow spells out its props type's four values. - Claim: the known-drift list loses the ten fixed lines, and ContextMenuItem is not compared because it has no same-stem source. Verified.
- Claim: the prop-docs test passes with those lines removed. Verified at this head.
- Claim: the other listed suites pass with 155 tests. Verified at this head.
- Claim: documentation only, with no runtime, API, visual or policy change. Verified; the API comparison shows no change from this pull request.
- Claim: public text carries no internal context. Verified.
- File
.changeset/core-docs-missing-props.md: clear. - File
packages/cli/test/core-prop-docs.known-drift.json: clear. - File
packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear. - File
packages/core/src/ContextMenu/ContextMenuItem.doc.mjs: clear. - File
packages/core/src/Selector/Selector.doc.mjs: clear; theplacementtype now lists its values. - File
packages/core/src/Toast/Toast.doc.mjs: clear.
There was a problem hiding this comment.
Not approved yet: approval waits on an engineering owner's decision about the native Selector contract, and the description needs one correction.
Regenerating the Swift binding puts Selector's placement and isDefaultOpen into the native Selector core contract, and no current spec says native Selectors honor them, which the native-first surfaces spec requires of every core prop (the native package already keeps presentation web-only for that reason). Approval needs an engineering owner, the author included, to settle whether both stay in the native core, recorded with an /approve-spec comment that names this head's full SHA (the earlier one names the previous head), or else to declare them web-only in packages/native/src/components/Selector.ts and regenerate the binding. CI did not run its tests on this head because admission found CI full, so it needs a re-run.
- The description's Scope checklist says the pull request is documentation only and that API changes were removed or split, but it regenerates
packages/native/apple/Sources/AstryxNative/Generated/Selector.swift, which adds the publicSelectorPlacementenum and three Selector props, so please name that regeneration and the native contract change in the description.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: the four docs list the props the changeset names, which the components already take. Verified against each props type and the prop-docs test.
- Claim: ContextMenuItem takes its new props as the DropdownMenuItem it re-exports. Verified at the ContextMenu entry point; the eight entries match DropdownMenuItem's docs.
- Claim: the component command's output left these props out. Verified against the base branch's output.
- Claim: each entry takes its type, default and meaning from its source or from DropdownMenuItem's docs. Verified.
- Claim: the known-drift list loses the ten fixed lines, and ContextMenuItem is not compared there. Verified.
- Claim: the prop-docs test passes with those lines removed. Verified at this head.
- Claim: the other listed suites pass with 155 tests. Verified at this head.
- Claim: documentation only, or every necessary generated artifact named. False: the regenerated Swift Selector binding is not named.
- Claim: runtime, API, visual and policy changes were removed or split. False: the Swift binding adds public Selector API to the native package.
- Claim: public text carries no internal context. Verified.
- Claim: the components in scope are ComplexSelector, Selector, Toast and ContextMenuItem. Verified for the core docs; the native Selector binding also changes.
- File
.changeset/core-docs-missing-props.md: clear. - File
packages/cli/test/core-prop-docs.known-drift.json: clear. - File
packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear. - File
packages/core/src/ContextMenu/ContextMenuItem.doc.mjs: clear. - File
packages/core/src/Selector/Selector.doc.mjs: clear. - File
packages/core/src/Toast/Toast.doc.mjs: clear. - File
packages/native/apple/Sources/AstryxNative/Generated/Selector.swift: matches the generator; itsplacementandisDefaultOpenwait on the owner decision.
…e Selector Native platforms place and open their own control, as they choose their own presentation. So the regenerated Swift binding gains only labelTooltip, which the native Switch and TextInput bindings already take. [skip ci]
|
/approve-spec 91c330f |
There was a problem hiding this comment.
Changes requested: one line of the description needs correcting; the docs and the native Selector contract look right.
- The Testing section says 168
packages/nativetests pass aftergenerate:apple, but at this head that suite runs 146 tests (145 pass, 1 skipped), so please correct the count or name the command that runs 168.
Declaring placement and isDefaultOpen web-only settles the earlier native contract question: the regenerated binding now gains only labelTooltip, and regenerating it at this head reproduces the committed file. CI has not run its test and typecheck jobs on this head yet.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: the four docs list the props the changeset names, which the components already take. Verified against each props type, the prop-docs test and the component command's output.
- Claim: ContextMenuItem takes its new props as the DropdownMenuItem it re-exports. Verified at the ContextMenu entry point; the eight entries equal DropdownMenuItem's.
- Claim: the component command left these props out. Verified against the base branch's output.
- Claim: each entry takes its type, default and meaning from its source or from DropdownMenuItem's docs. Verified.
- Claim: the known-drift list loses the ten fixed lines, and ContextMenuItem is not compared there. Verified.
- Claim: the native Swift Selector binding gains labelTooltip, which native Switch and TextInput already take. Verified.
- Claim: placement and isDefaultOpen are web-only in the native Selector additions, beside presentation. Verified.
- Claim: the native contract gains nothing else. Verified in every built native platform type.
- Claim: the prop-docs test passes with the ten lines removed. Verified at this head.
- Claim: the component suites and the doc quality, type and golden-read tests pass with 155 tests. Verified at this head.
- Claim: the doc literal and reference tests pass, and Selector's placement lists its four values. Verified at this head.
- Claim: the native tests pass with 168 tests after regenerating the binding. False: 146 tests, 145 pass and 1 skipped.
- Claim: documentation only, or every necessary generated artifact named. Verified: the Swift binding is the one generated file, and it is named.
- Claim: runtime, visual and policy changes were removed, and the one API change is the native labelTooltip. Verified.
- Claim: public text carries no internal context. Verified.
- Claim: the components in scope are ComplexSelector, Selector, Toast, ContextMenuItem and the native Selector binding. Verified.
- Claim: the touched packages' tests ran locally. Consistent: they pass here.
- File
.changeset/core-docs-missing-props.md: clear. - File
packages/cli/test/core-prop-docs.known-drift.json: clear. - File
packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear. - File
packages/core/src/ContextMenu/ContextMenuItem.doc.mjs: clear. - File
packages/core/src/Selector/Selector.doc.mjs: clear. - File
packages/core/src/Toast/Toast.doc.mjs: clear. - File
packages/native/apple/Sources/AstryxNative/Generated/Selector.swift: clear; it matches the generator. - File
packages/native/src/components/Selector.ts: clear.
|
/approve-spec 6813bb7 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because its commit message skips CI, so the test and build checks still need to run and pass before merge.
The one open point from the last review is fixed: the description's native test line now matches what this head runs (145 pass, 1 skipped). The new doc entries match each component's props, and the native Selector binding gains only labelTooltip.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: the four docs list the props the changeset names, which the components already take. Verified against each props type, the prop-docs test and the component command's output.
- Claim: ContextMenuItem takes its new props as the DropdownMenuItem it re-exports. Verified at the ContextMenu entry point; the eight entries equal DropdownMenuItem's.
- Claim: the component command left these props out, and ContextMenuItem's docs did not say how an item acts. Verified against the base branch's output.
- Claim: each entry takes its type, default and meaning from its source or from DropdownMenuItem's docs. Verified.
- Claim: the known-drift list loses the ten fixed lines, and ContextMenuItem is not compared there. Verified.
- Claim: the native Swift Selector binding gains labelTooltip, which native Switch and TextInput already take. Verified.
- Claim: placement and isDefaultOpen are web-only in the native Selector additions, beside presentation. Verified.
- Claim: the native contract gains nothing else. Verified in every built native platform type.
- Claim: the prop-docs test passes with the ten lines removed. Verified at this head.
- Claim: the components in scope are ComplexSelector, Selector, Toast, ContextMenuItem and the native Selector binding. Verified.
- Claim: documentation only, or every necessary generated artifact named. Verified: the Swift binding is the one generated file, and it is named.
- Claim: runtime, visual and policy changes were removed, and the one API change is the native labelTooltip. Verified.
- Claim: public text carries no internal context. Verified.
- Claim: the prop-docs test passes with its fixed lines deleted from the known list. Verified at this head.
- Claim: the component suites and the doc quality, type and golden-read tests pass with 155 tests. Verified at this head.
- Claim: the doc literal and reference tests and the prop-docs test pass with 23 tests, and Selector's placement lists its four values. Verified at this head.
- Claim: the native tests, run with the named command after regenerating the binding, pass 145 with 1 skipped of 146, the binding sync test included. Verified at this head.
- Claim: the touched packages' tests ran locally. Consistent: they pass here.
- File
.changeset/core-docs-missing-props.md: clear. - File
packages/cli/test/core-prop-docs.known-drift.json: clear. - File
packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear. - File
packages/core/src/ContextMenu/ContextMenuItem.doc.mjs: clear. - File
packages/core/src/Selector/Selector.doc.mjs: clear. - File
packages/core/src/Toast/Toast.doc.mjs: clear. - File
packages/native/apple/Sources/AstryxNative/Generated/Selector.swift: clear; it matches the generator. - File
packages/native/src/components/Selector.ts: clear.
- #12635 fix(cli): export loads and gives back a page whose modules import TypeScript files by .js names Author: @josephfarina - #12727 fix(cli): export loads a served package's subpath exported only to imports Author: @josephfarina - #12224 fix(cli): a {@link} in a template description resolves as astryx docs resolves it Author: @josephfarina - #12278 fix(core): a Theme given a value that is not a theme keeps the page running Author: @josephfarina - #12751 feat(Layout): LayoutContent names its container, so a theme styles a dialog's body apart from its header and footer Author: @josephfarina - #12168 fix(templates): header, footer and toolbar rows wrap for longer translated labels Author: @josephfarina - #12399 [experimental] export: the dropped-text warning checks Core's docs, and text not drawn yet inside Core components that take children no longer warns Author: @josephfarina - #12541 [docs] Core: list the props ComplexSelector, Selector, Toast and ContextMenuItem take Author: @josephfarina - #12676 docs(cli): a short form keeps its own 640 column inside a wide template frame Author: @josephfarina - #12458 fix(core): Field labels use the primary text colour Author: @josephfarina - #12373 [experimental] export: a link to a place in the page stays in the file in a srcdoc viewer frame Author: @josephfarina
|
Landed in #12827. |
Reader impact
astryx component <Name>is how an agent or a person learns what props a component takes. For four components, it left out props the component takes, so a reader could not find them, and a check that compares a page's props with the docs could not trust the docs for these components:isLabelHidden,description,labelTooltip,isOptional,isRequired.changeAction,labelTooltip,placement,isDefaultOpen.isExiting.onClick,href,target,rel,isDisabled,hasCloseOnSelect,variant,ref. WithoutonClickandhref, its docs did not say how an item acts.Source of truth
The components' own props types:
ComplexSelectorPropsandSelectorProps,ToastProps, andDropdownMenuItem's props (whose own docs already list these props). Each new entry takes its type, default and meaning from the source's declaration and JSDoc, or, for ContextMenuItem, from DropdownMenuItem's doc entries.Correction
Each doc gains an entry for each prop above.
core-prop-docs.known-drift.jsonloses the tennot_in_doclines these entries fix (ContextMenuItem is not compared there, since its doc has no same-stem source).The native Selector contract reads core's Selector doc, so its generated Swift binding (
packages/native/apple/Sources/AstryxNative/Generated/Selector.swift) changes with it: it gainslabelTooltip, which the native Switch and TextInput bindings already take.placementandisDefaultOpenare declared web-only inpackages/native/src/components/Selector.ts, besidepresentation, because native platforms place and open their own control. The native contract gains nothing else.Evidence
core-prop-docs.test.mjscompares each Core doc's props with the TypeScript props of the export it describes. It passes with the ten lines removed, so each new entry agrees with the code (name, required, default, and type where the comparison reads it).Scope
Components: ComplexSelector, Selector, Toast, ContextMenuItem, and the generated native Selector binding
labelTooltip, named above.Testing
packages/cli/test/core-prop-docs.test.mjs: passes, with the fixed lines deleted from its known list.core-doc-quality,core-doc-types,golden-readsand theapi/componentsuites: 155 tests pass.docPropLiterals,docPropReferencesandcore-prop-docs: 23 tests pass (Selector'splacementlists its four values).packages/nativetests (pnpm exec vitest run packages/native): 145 pass and 1 is skipped (146), afterpnpm -F @astryxdesign/native generate:apple, includingcontracts.test.ts"keeps the committed Swift binding in sync with the contracts".preflight: pass 91c330f (review half; the touched packages' tests ran locally)