Repository navigation
fix(core): Calendar weekday names widen their column instead of overlapping - #12180
josephfarina wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 4f143cc |
|
/approve-spec a938a0a |
There was a problem hiding this comment.
Changes requested. Larger weekday names now widen their columns when the Calendar has room, but at large text sizes on phone-width screens they still run together, and the release note overstates the change. The record edit itself has an engineering owner's approval for this head.
- When the Calendar is narrower than its natural width, as with large text on a phone-width screen, the seven
1frcolumns still split the space evenly, so the header's newmin-width(packages/core/src/Calendar/styles.ts:85) does not stop long names colliding, and CI's interaction job fails the new check "at twice the text size the calendar fits a 390px container"; making the name the track minimum, for examplegrid-template-columns: repeat(7, minmax(min-content, 1fr))(withautofirst when week numbers show), clears both cases and keeps the default 32px columns. - The changeset says the default look does not change, but in a Calendar wider than its natural width (the two-month narrow-container story) each weekday name now moves to the centre of its day column, so the release note should say that.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset, weekday names no longer run into each other with larger text or smaller element sizes: false at phone widths (CI interaction failure; 24px names at a 360px width still overlap).
- Changeset, each weekday column widens to fit its name: false when the Calendar is narrower than its natural width (columns stay equal shares).
- Changeset, the default look does not change: false for a stretched Calendar (two-month narrow-container story); true at the natural width (default and week-number frames are identical).
- Description, the header width becomes a minimum of the same size: verified (
styles.ts:85). - Description, header and day rows share one seven-column grid of equal
1frcolumns: verified (styles.ts:100-103,Calendar.tsx:1193). - Description, a wider name widens every column together: true only when the Calendar can reach its natural width.
- Description, the defect reached the DateInput, DateRangeInput and DateTimeInput pickers: verified for their popovers, which render Calendar; the touch sheets keep their own weekday row.
- Description, the record now covers the weekday header and its verification row names the new checks: verified.
- Description, the browser checks prove names stay inside their headers at twice the text size in 390px: false, CI fails that check.
packages/core/src/Calendar/styles.ts: blocking finding above.packages/core/src/Calendar/__tests__/CalendarTextSize.interaction.browser.spec.ts: the 390px check fails in CI.docs/specs/components/Calendar/Calendar.spec.md: clear..changeset/calendar-weekday-header-grows.md: blocking finding above.
PR Analysis Report🔎 Preview ·
|
… the centred names in a wide Calendar
|
/approve-spec 81b2d5a |
There was a problem hiding this comment.
Approved pending CI: the CI run for this head was cancelled because CI was full, so it needs a re-run before merge.
Both earlier findings are fixed: the day columns now take each weekday name as their minimum, so names no longer collide at phone widths, and the release note now says the names centre in a Calendar wider than its natural width. The new browser checks all pass in Chromium against this head's Storybook build, and the default grid is pixel-identical to main.
- Optional: the new comment above
daysGridinpackages/core/src/Calendar/styles.tsis one 29-word sentence; two short sentences would meet the repository's comment style (suggestion inline).
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Release note, weekday names no longer run into each other with a larger text size or smaller element sizes: verified (24px names at 360px wide and twice the text size at 390px show no overlap; the new browser checks pass).
- Release note, each weekday column is at least as wide as its name: verified (
styles.ts:105,styles.ts:108; measured columns are never narrower than their names). - Release note, in a Calendar wider than its natural width each name sits at the centre of its day column: verified (two-month narrow-container story).
- Release note, at its natural width the Calendar looks the same: verified (default and week-number stories are pixel-identical).
- Description, the defect reached Calendar and the date-field popovers that render it, because each header was a fixed medium width: verified (
styles.ts:83onmain). - Description, the header width becomes a minimum and each of the seven columns becomes
minmax(min-content, 1fr), afterautowith week numbers: verified (styles.ts:85,:105,:108). - Description, header and day rows share one grid, so a wider name widens its column and the days stay aligned: verified (
Calendar.tsx:1193; measured). - Description, below its natural width the columns never go below their widest cell: verified (twice the text size at 390px).
- Description, the Calendar record now covers the weekday header and its verification row names the new checks: verified (record diff).
- Description, the four browser checks (default header width, 24px names, twice the text size at 390px, default geometry): verified (all seven checks in the file pass in Chromium on this head).
- Description, unit suites, type check, strict lint, formatting, knowledge and changeset checks pass: verified (Calendar unit suites 323/323, core build with its type check, strict lint on the changed files, formatting, knowledge and changeset checks).
- Description, the browser checks run in CI: true of the workflow, but they have not run on this head yet (run cancelled, CI full).
packages/core/src/Calendar/styles.ts: non-blocking comment-style suggestion.packages/core/src/Calendar/__tests__/CalendarTextSize.interaction.browser.spec.ts: clear.docs/specs/components/Calendar/Calendar.spec.md: clear..changeset/calendar-weekday-header-grows.md: clear.
| // A column is never narrower than its widest cell, the weekday name | ||
| // included, so columns that share too little width overflow instead of | ||
| // running one name into the next. |
There was a problem hiding this comment.
Non-blocking: this is one 29-word sentence with two topics, over the 25-word limit the repository's comment style sets for a description. A shorter form that keeps only the reason:
// The widest cell sets each column's minimum, so a long weekday name never
// overlaps the next. When the width runs out, the grid overflows.|
/approve-spec 81b2d5a |
- #12680 perf(cli): a template's component line resolves its names in one pass, not one full lookup per name Author: Joey <[email protected]> - #12180 fix(core): Calendar weekday names widen their column instead of overlapping Author: Joey <[email protected]> - #12159 feat(cli): make an icon set inside your own app Author: Joey Farina <[email protected]> - #12383 fix(Grid): a responsive column shrinks to a container narrower than minWidth Author: Joey Farina <[email protected]> - #12374 [fix] Icon: a glyph given as name renders and warns, instead of crashing Author: Joey Farina <[email protected]> - #12453 fix(charts): line, area and band default to straight segments Author: josephfarina <[email protected]> - #12296 fix(core): a neutral Badge in a primary or destructive Button meets 4.5:1 on its fill Author: Joey Farina <[email protected]> - #12395 fix(CodeBlock): without a code string, CodeBlock names the prop and the fix in development Author: Joey Farina <[email protected]> - #12260 fix(cli): `astryx component Flex` names Stack first Author: Joey Farina <[email protected]> - #12391 fix(core): a two-lane Toolbar wraps instead of squeezing its start lane Author: Joey Farina <[email protected]> - #12427 fix(core): checkbox and radio marks keep their share of the box a theme sizes Author: josephfarina <[email protected]> - #12725 [experimental] cli: with no icon set, experimental icon names the discover search where it lists packs Author: Joey Farina <[email protected]>
|
Landed in #12738. |
User impact
In a theme with a larger text size and tighter spacing (for example text size 20 with spacing "less"), the weekday names above every calendar (Calendar, and the DateInput, DateRangeInput and DateTimeInput pickers) ran into each other: "SunMonTueWedThu". Each weekday header was a fixed width, the medium element size, which tighter spacing shrinks to 28px, while its name grows with the theme's text size.
Problem and solution fit
The weekday header's
widthbecomes amin-widthof the same size, and each of the seven grid columns becomesminmax(min-content, 1fr)(after anautoweek-number column when week numbers show). The header row and the day rows share that grid, so a name wider than the minimum widens its column, the days stay aligned under their names, and when the Calendar is narrower than its natural width the columns still never go below their widest cell. At its natural width the Calendar looks the same. In a Calendar wider than its natural width, each weekday name now sits at the centre of its day column, where before it sat at the column's start; the release note says so.Expected behavior and authority
component:CalendarFR2 already makes each day button a minimum size that grows with a set text size (spec:AST-102FR4). The record now says the same for each weekday header, and its verification row names the new browser checks.Evidence
CalendarTextSize.interaction.browser.spec.ts, against the built Calendar story:Scope
Components: Calendar
Testing
tsc --noEmit, strict ESLint, Prettier,pnpm check:knowledgeand the changeset check pass.Writing rubric results
Run over the
component:CalendarFR2 edit and its verification row.R1 narration: none.
R2 research: none.
R3 evidence: the verification cell names the test file and what it proves, including the 390px container check.
R4 rejected alternatives: none recorded.
R5 change references: none.
R6 open questions: none touched.
R7 project status: none.