Skip to content

docs(Grid): align and justify leave the browser default when unset - #9347

Merged
cixzhang merged 5 commits into
mainfrom
docs/grid-align-default-is-browser
Nov 1, 2026
Merged

cixzhang merged 5 commits into
mainfrom
docs/grid-align-default-is-browser

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

Grid's component docs, which ship in the package and feed astryx component Grid, said align and justify default to 'stretch'. Grid's record (FR5) and the code say unset leaves the browser default: Grid.tsx applies no align-items or justify-items style when a prop is unset. Someone reading the docs could expect an image or other naturally sized item to stretch, when the browser's normal keeps 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 on align and justify, and describe the unset behavior from FR5.
  • packages/core/src/Grid/Grid.tsx: the same change to the JSDoc on align and justify, which ships in the type declarations and drives editor hover.
  • packages/core/api-report.md: prop align?: GridAlignment and prop 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.md FR5: "unset leaves the browser default (normal, which stretches items without a natural size or aspect ratio)."
  • Grid.tsx: align != null && alignStyles[align] and justify != null && justifyStyles[justify], so no style applies when unset.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 1, 2026 7:28pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 1, 2026
@astracat-bot

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 1, 2026, 7:31 PM UTC
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · be6c7e3

Storybook · Sandbox · built from this PR's head

Modified components

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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cixzhang
cixzhang marked this pull request as ready for review November 1, 2026 16:01

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: Grid's align and justify docs, their JSDoc and the API report rows match Grid's record (FR5), and merging main left this patch unchanged, so nothing more is needed from you.

[Automated review]

@cixzhang
cixzhang merged commit 7c4e5fa into main Nov 1, 2026
60 checks passed

This branch was successfully deployed

1 active deployment
Preview — be6c7e38 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

1 participant