Repository navigation
feat(templates): dashboard-scorecard shows two headline numbers per row on a phone when they fit - #13456
feat(templates): dashboard-scorecard shows two headline numbers per row on a phone when they fit#13456josephfarina wants to merge 4 commits into
Conversation
…ow on a phone when they fit [skip ci]
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 662a000 |
There was a problem hiding this comment.
Changes requested: on a phone set to a larger text size, the new two-per-row layout overflows, though the release note says larger text is handled.
page.tsx:196sets the tile floor inrem, which iOS Dynamic Type and Android's font scale do not grow (they scale Astryx's type sizes and leave the root at 16px), so at 320px the grid stays two per row at XXXL and the accessibility sizes,$4.82Mruns up to 62px past its tile's content box and labels break mid-word, wheremainkeeps one tile per row with everything whole; a floor built from the value's own size, such ascalc(4 * var(--text-heading-2-size) + 2 * var(--spacing-5)), falls back to one per row at every larger size and keeps two per row at the default size.- The release note's "larger text keeps every number whole" and the description's "Larger text falls back to one per row until two fit" hold only for a larger browser font size, so fix the floor or narrow the wording.
The layout direction is recorded by an engineering owner's /approve-spec for this head, and 768px and up is unchanged. CI has not run on this head, because its commit message carries [skip ci].
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: only the page template and a release note change, with no record, component or package code: verified (the two changed files).
- Claim: below 768px the current page stacks one tile per row at every width: verified (the base track is
1fr; captures at 320 to 767px). - Claim: two tiles per row when two fit with at least 5.5rem of content inside the tile padding, otherwise one: verified at the default text size (track formula; captures).
- Claim: the track is Grid's capped auto-fit track, Grid's
minWidthtakes pixels only, and the viewport tiers replace Grid's track throughxstyle: verified in Grid's source. - Claim: below 768px only, the change figure moves under the value when the two do not fit: verified (
page.tsx:205-209,:499; captures). - Claim: 768px and up is unchanged: verified (code; the 1024px and 1440px frames are pixel-identical).
- Claim: tiles keep
padding={5}and values stayHeadinglevel 2: verified. - Claim: no headline number is clipped or pushed into the padding and no label or value word breaks where main has none: false at a phone's larger text sizes (first finding); holds at 100% and 150% browser font size.
- Claim: two per row from 320px in neutral and from 390px in matcha and y2k at the default size: verified for those three themes; gothic not captured.
- Claim: larger text falls back to one per row until two fit: holds for browser font size, false for phone text size (first finding).
- Claim: at 150% text and 320px, matcha and y2k push
$4.82M9px into the padding as main does: not checked. - Claim: full-page desktop screenshots at 768 to 1440px in four themes match main: partly checked (neutral scorecard section at 1024px and 1440px).
- Claim: agent-built report results: not checked (the author's own runs).
- Claim: Prettier and the changeset check pass: verified.
- Release note: two to a row under 768px when two fit, otherwise one: verified; the narrow-phone and wide-inset cases keep every number whole: verified; larger text keeps every number whole: false (second finding); the change figure moves under the value under 768px: verified; 768px and up unchanged: verified.
- File
packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: first finding (line 196). - File
.changeset/scorecard-two-up-phone.md: second finding (line 5).
…o a phone's text size also falls back to one per row [skip ci]
|
/approve-spec d883cb7 |
There was a problem hiding this comment.
Changes requested: in the matcha theme the new two-per-row layout starts before its widest headline number fits, so the value runs into its tile's padding on common phone widths and is cut off at the card edge at larger text sizes.
page.tsx:197reserves four times the type size, but matcha's heading face (Playwrite US Trad) sets$4.82Mat about 4.8 times its size, so where the grid has just gone two-up the value overflows its tile (15px into the 30px padding at 412px at the default size, and cut off 6px past the card edge at 610px with Android's 2x text) wheremainkeeps one tile per row with every value whole; a factor of at least 4.8 fixes it in all four themes (5 *leaves margin and puts neutral two-up from 356px).- The release note's "a theme with a wide tile inset or a larger text size … keeps every number whole" and the description's "no headline number … pushed into its tile's padding" do not hold in matcha until the floor covers its heading face.
The earlier text-size problem is fixed: the floor now follows the value's type size, and neutral, gothic and y2k keep every value whole at every width and text size checked. The factor of four came from the earlier review's suggestion, which was measured without matcha's own heading face loaded. CI has not run on this head, because its commit messages carry [skip ci].
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): the review configuration is unchanged since the last review.
- Claim: only the page template and a release note change, with no record, component or package code: verified (the two changed files).
- Claim: below 768px the current page stacks one tile per row at every width: verified (the base track is
1fr; base captures from 320 to 610px). - Claim: two tiles per row when two fit with room for four times the value's type size inside the tile padding, otherwise one, with the stated track: verified (
page.tsx:197; a probe of the floor equals four times the rendered heading size plus both insets in every capture). - Claim: the floor grows with a larger browser font size, with a phone's text size setting and with a theme's tile inset: verified (root font size 125% and 150%, iOS text-size categories and uniform phone scales, and each theme's own inset).
- Claim: this is Grid's capped auto-fit track, written in the template because Grid's
minWidthtakes pixels only and the viewport tiers replace Grid's track throughxstyle: verified in Grid's source. - Claim: below 768px only, the change figure moves under the value when the two do not fit: verified (
page.tsx:204-211,:500; captures). - Claim: from 768px up the grid and value row are unchanged; tiles keep
padding={5}and values stayHeadinglevel 2: verified (the 768px and 1200px tiers override the changed default track; the wrap is scoped below 768px). - Claim: no headline number is clipped, ellipsized or pushed into its tile's padding, and no word breaks across lines, wherever main has none: false in matcha (first finding); holds in neutral, gothic and y2k; no label or value word breaks in any capture.
- Claim: where main already runs a value into the padding in one-per-row, the change matches it: verified for the tile count (both one per row at those sizes and widths).
- Claim: the tiles-per-row table for four themes, five text sizes and eight widths: verified (every cell matches the thresholds measured at this head; spot captures agree).
- Claim: full-page screenshots at 768 to 1440px match main: not reproduced at this head; the change cannot reach those widths (code).
- Claim: agent-built report results: not checked (the author's own runs).
- Claim: Prettier and the changeset check pass: verified.
- Release note: two to a row below 768px when four times the type size fits, otherwise one: verified; a narrow phone, a wide-inset theme or a larger text size keeps every number whole: false in matcha (second finding); the change figure moves under the value below 768px: verified; 768px and up unchanged: verified.
- File
packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: first finding (line 197). - File
.changeset/scorecard-two-up-phone.md: second finding (line 5).
…alue's type size [skip ci]
|
/approve-spec f084ee3 |
There was a problem hiding this comment.
Changes requested: the two-per-row layout now keeps every headline number whole in all four themes, and two sentences still describe it wrongly.
page.tsx:181-182and the description name$58.1Mas the widest sample value, the one matcha's heading face draws at about 4.8 times its size, but$4.82Mis the widest in every theme (in matcha 119px against 113px at a 25px heading, about 4.8 against 4.5 times), so the comment and description should name$4.82M.- Miss: the release note's "…otherwise it keeps one to a row, so a narrow phone, a theme with a wide tile inset or a larger text size … keeps every number whole" does not hold where one tile per row is itself too narrow (in matcha at 320px the card cuts
$4.82Moff with a 2x phone text size or 150% browser text, onmainand this head alike), so it should claim only what the change does, for example "never gets two numbers to a row that do not fit"; the earlier review missed these cases.
The earlier matcha overflow is fixed: with the factor at five, every two-up tile keeps its widest value clear of the tile's padding across four themes, ten text sizes and widths from 320 to 767px, and the description's tiles-per-row table matches every cell. CI has not run on this head, because its commit messages carry [skip ci].
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): the review configuration is unchanged since the last review.
- Claim: only the page template and a release note change, with no record, component or package code: verified (the two changed files).
- Claim: below 768px the current page stacks one tile per row at every width: verified (the base track is
1fr; one per row in every base measurement from 320 to 767px). - Claim: two tiles per row when two fit with room for five times the value's type size inside the tile padding, otherwise one, with the stated track: verified (
page.tsx:199; the floor measures five times the rendered heading size plus both insets). - Claim: five covers the widest sample value, named as
$58.1Mand drawn at about 4.8 times its size in matcha: false (first finding); five does cover the widest value,$4.82M. - Claim: the floor grows with a larger browser font size, a phone's text size setting and a theme's tile inset: verified (measured at 125% and 150% root size, uniform phone scales, iOS text sizes and each theme's inset).
- Claim: this is Grid's capped auto-fit track, written in the template because Grid's
minWidthtakes pixels only and the viewport tiers replace Grid's track throughxstyle: verified in Grid's source. - Claim: below 768px only, the change figure moves under the value when the two do not fit: verified (
page.tsx:209-214,:503; frames). - Claim: from 768px up the grid and value row are unchanged; tiles keep
padding={5}and values stayHeadinglevel 2: verified (16 of 16 light full-page frames at 768, 1024, 1200 and 1440px matchmain; dark not captured, and the changed styles apply only below 768px). - Claim: no headline number is clipped, ellipsized or pushed into its padding, and no word breaks, wherever
mainhas none: verified (400 measurements on each side). - Claim: where
mainalready runs a value into the padding at one per row, the change is identical: verified; the listed cases leave out matcha at a 2x phone text size. - Claim: the tiles-per-row table for four themes, five text sizes and ten widths: verified (200 of 200 cells).
- Claim: agent-built report results: not checked (the author's own runs).
- Claim: Prettier and the changeset check pass: verified.
- Release note: two to a row below 768px when five times the type size fits, otherwise one: verified; a narrow phone, a wide-inset theme or a larger text size keeps every number whole: false (second finding); the change figure moves under the value below 768px: verified; 768px and up unchanged: verified.
- File
packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: first finding (lines 181-182). - File
.changeset/scorecard-two-up-phone.md: second finding (line 5).
…ow on a phone when they fit [skip ci]
|
/approve-spec 2f8835f |
There was a problem hiding this comment.
Approved pending CI: no build or test CI has run on this head yet, because its commit messages carry [skip ci].
Both earlier findings are fixed: the source comment and the description now name $4.82M as the widest sample value, and the release note claims only what the change does. Across all seven published themes, six text sizes and widths from 320 to 767px, two tiles share a row only where the widest value fits, with at least 19px to spare, and 768px and up renders exactly as on main.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): the review configuration is unchanged since the last review.
- Claim: only the page template and a release note change, with no record, component or package code: verified (the two changed files).
- Claim: on
main, below 768px the six headline numbers stack one per row at every width: verified (the base track is1fr; one per row in every base measurement from 320 to 767px). - Claim: two tiles per row when two fit with room for five times the value's type size inside the tile padding, otherwise one, with the stated track: verified (
page.tsx:199; the floor measures five times the rendered heading size plus both insets in every theme and text size). - Claim: five covers the widest sample value,
$4.82M, because headings use proportional figures, in the widest heading face, which draws it at about 4.8 times its size: verified (4.76 to 4.80 times in matcha;$4.82Mis the widest value in all seven themes; the next widest face draws it at 3.79 times; headings set no tabular figures). - Claim: the floor grows with a larger browser font size, a phone's text size and a theme's tile inset: verified (browser 125% and 150%, phone 1.35x, 2x and 3x, and the 20px and 30px insets).
- Claim: this is Grid's capped auto-fit track, written in the template because Grid's
minWidthtakes pixels only and the viewport tiers replace Grid's track throughxstyle: verified in Grid's source. - Claim: below 768px only, the change figure moves under the value when the two do not fit: verified (
page.tsx:209-214,:503; frames). - Claim: from 768px up the grid and value row are unchanged; tiles keep
padding={5}and values stayHeadinglevel 2: verified (page.tsx:498,:504; 28 of 28 full-page frames at 768, 1024, 1200 and 1440px matchmainin seven themes, light). - Claim: no headline number is clipped, ellipsized or pushed into its padding, and no word breaks, wherever
mainhas none: verified (0 of 420 measurements on each side). - Claim: where one tile per row is itself too narrow,
maincuts or pads the number too and the change renders those cases identically: verified for the number (identical overflow on both sides); of the listed cases, y2k at a 2x phone text size fits at 320px with 3px to spare. - Claim: 768 to 1440px full-page screenshots identical to
main: verified in light (28 of 28); dark not captured. - Claim: the tiles-per-row table for four themes, five text sizes and ten widths: verified (200 of 200 cells).
- Claim: agent-built report results: not checked (the author's own runs).
- Claim: Prettier and the changeset check pass: verified.
- Release note: two to a row below 768px when five times the type size fits, otherwise one: verified; never two numbers in a row where they do not fit, for a narrow phone, a wide tile inset or a larger browser or phone text size: verified (0 two-up layouts with a value past its content box); the change figure moves under the value below 768px: verified; 768px and up unchanged: verified.
- File
packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: clear (template rubric 65/100 onmainand here, non-blocking). - File
.changeset/scorecard-two-up-phone.md: clear.
- #13358 fix(cli): a theme family checks its compiled registries as plain Node loads them Author: @josephfarina - #13388 fix(cli): --check reads a theme family's committed compiled registries Author: @josephfarina - #13464 experimental theme: a resting background color, outline or shadow keeps a part's hover and keyboard focus visible Author: @josephfarina - #13433 cli(icons): icon response types say "icon meaning" and "variant" Author: @josephfarina - #13456 feat(templates): dashboard-scorecard shows two headline numbers per row on a phone when they fit Author: @josephfarina - #13473 docs(icons): icon-set guide's relatives line; template icons say icon component Author: @josephfarina
|
Landed in #13542. |
Template change; no record, component or package-code change.
Why
Agents building a metrics report start from
dashboard-scorecard. Below 768px its six headline numbers stack one per row at every width, so a phone shows a long column of mostly empty tiles before the first chart.What changes
padding={5}); otherwise one per row. The track isrepeat(auto-fit, minmax(min(100%, max(calc(5 * var(--text-heading-2-size) + 2 * var(--spacing-5)), calc(50% - var(--spacing-2) / 2))), 1fr)).$4.82M(headings use proportional figures), in the widest theme heading face: matcha's Playwrite US Trad draws it at about 4.8 times its size.columns={{minWidth, repeat: 'fit', max}}, written in the template because Grid'sminWidthtakes pixels only, not a type size, and the scorecard's viewport tiers replace Grid's track template throughxstyle. The source comment says the same.@media (not (min-width: 768px))), a tile's change figure moves under the value when the two do not fit side by side.From 768px up the grid and the value row are unchanged. Tiles keep
padding={5}and values stayHeadinglevel 2.Evidence
Built with the Vite plugin in the neutral, matcha, gothic and y2k themes, light and dark, with touch, at widths from 320 to 767px, at the default text size, a 125% and 150% browser font size, and a phone text size of 1.35×, 2× and 3× (the type-size scales set directly):
Tiles per row below 768px (light; dark is the same), measured on this head:
Effect on built pages
In fresh agent-built metrics reports, judged blind against a hand-written page, the result moved within run-to-run noise: most agents rewrote the KPI row with their own Grid instead of keeping the template's. No page showed a clipped headline number. The change is for pages that keep the template as shipped.
Testing
check:changesets.Scope
preflight: pass 2f8835f