Repository navigation
docs(Grid): align and justify leave the browser default when unset - #9347
Conversation
|
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 | Visual · A11y · RTL |
|---|---|---|---|
| Grid | 4.4 kB (0) · 3.8 kB CSS (0) | — | ✓ · ✓ · ✓ |
| GridSpan | 3.5 kB (0) · 3.4 kB CSS (0) | — | ✓ · ✓ · ✓ |
| TopNavMegaMenu | 57.7 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: core +0 · ~2 · −0
Committed API report behind this build: core 1 row; run pnpm api:report.
2 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| ~ | core |
. · Components · component Grid |
prop align?: GridAlignment = 'stretch' → prop align?: GridAlignment |
<Grid align={…} /> |
| ~ | core |
. · Components · component Grid |
prop justify?: GridAlignment = 'stretch' → prop justify?: GridAlignment |
<Grid justify={…} /> |
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Requesting changes for one small gap: the Grid.doc.mjs edits match Grid's record (FR5), but packages/core/src/Grid/Grid.tsx still documents @default 'stretch' on align and justify (lines 133 and 139). That JSDoc ships in the package's type declarations and feeds packages/core/api-report.md (lines 1213 and 1219), so editor hover keeps the old default while the changeset says the claim is gone. Deleting those two tags and running pnpm api:report would make every shipped doc agree.
[Automated review]
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [docs] Grid's `align` and `justify` docs no longer claim a `'stretch'` default. Unset, they leave the browser default, `normal`, which stretches items that have no natural size or aspect ratio. Rendering is unchanged. |
There was a problem hiding this comment.
This stays untrue for the type declarations: packages/core/src/Grid/Grid.tsx lines 133 and 139 still carry @default 'stretch', which editors show on hover and pnpm api:report reads into packages/core/api-report.md (lines 1213 and 1219). Dropping those two tags and regenerating the report makes this sentence hold.
There was a problem hiding this comment.
Approving: Grid's align and justify docs, their JSDoc and the API report rows now all match Grid's record (FR5), and the earlier JSDoc default gap is fixed, so nothing more is needed from you. The red build-storybook, build and pr-interaction checks come from a quoting error in the CI workflow on main (an apostrophe inside a single-quoted script), not from this change.
[Automated review]
Maintainer impact
Grid's component docs, which ship in the package and feed
astryx component Grid, saidalignandjustifydefault to'stretch'. Grid's record (FR5) and the code say unset leaves the browser default:Grid.tsxapplies noalign-itemsorjustify-itemsstyle when a prop is unset. Someone reading the docs could expect an image or other naturally sized item to stretch, when the browser'snormalkeeps its natural size. The docs now say what happens.CI impact: none (docs text only; no runner, job or time-to-green change).
Change
packages/core/src/Grid/Grid.doc.mjs: drop the'stretch'default onalignandjustify, and describe the unset behavior from FR5.packages/core/src/Grid/Grid.tsx: the same change to the JSDoc onalignandjustify, which ships in the type declarations and drives editor hover.packages/core/api-report.md:prop align?: GridAlignmentandprop justify?: GridAlignment, without= 'stretch'..changeset/grid-align-justify-default-docs.md:[docs]patch, since the doc ships in the package.Evidence
docs/specs/components/Grid/Grid.spec.mdFR5: "unset leaves the browser default (normal, which stretches items without a natural size or aspect ratio)."Grid.tsx:align != null && alignStyles[align]andjustify != null && justifyStyles[justify], so no style applies when unset.Scope