Skip to content

fix(templates): the dashboard scorecard fits a phone screen - #12459

Closed
josephfarina wants to merge 2 commits into
mainfrom
josephfarina/scorecard-phone-fit
Closed

josephfarina wants to merge 2 commits into
mainfrom
josephfarina/scorecard-phone-fit

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

On a phone, the dashboard scorecard template broke in English:

  • The trend charts ran past the screen edge. Each chart card kept a 330 px minimum width, wider than a phone's column, so the right side of every card was cut, including its "+14% vs prior" line, and the content area scrolled sideways.
  • The header's subtitle squeezed the separator and the generated date into narrow slivers beside the period ("·" alone over "Generated", the date split over three lines).

How

  • The trends Grid gets max at its chart count. Per component:Grid FR2, a positive max lets a lone track shrink to the container, and with max equal to the number of charts nothing changes wherever a chart fits its 330 px floor (the track minimum stays 330 px or more there).
  • A chart's header row wraps, so its change line moves under the title when the card is narrow.
  • The header subtitle wraps as two groups, the period and "· Generated" with its date, so the date moves to its own line, whole.
  • The header's period control and Export row wraps, so on the narrowest phones Export moves under the period control instead of running past the edge (in English below about 330 px, where it ran past the content edge on main).

Template source only; no component, prop or API change.

Evidence

  • Pixel comparison of the whole page, before and after, for each comparison period (WoW, MoM, QoQ): identical at 768, 1024, 1280 and 1440 px. It changes at phone widths (320 to 414 px), where the layout above was broken; the Export wrap changes only 320 px, where Export ran past the content edge.
  • With text about 40% longer (spaced as real words, every 6 or every 12 characters), the page no longer overflows at 320, 360 or 390 px, header included.
  • packed-template-components, template-icon-declarations and build CLI tests pass.
  • Build replay over real build requests: no start, alternatives list or block list changes.

Scope

Templates: dashboard-scorecard

  • Restores layout that breaks on phones; tablet and desktop unchanged.
  • Public text contains no internal context.

@vercel

vercel Bot commented Nov 17, 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 17, 2026 11:22pm UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 11:43 PM UTC

@josephfarina
josephfarina marked this pull request as ready for review November 17, 2026 22:12
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 540b5a7

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes: the template now fits a phone with its shipped text and tablet and desktop layouts are unchanged, but one evidence claim in the description does not hold:

  • The description says that with text about 40% longer the page no longer overflows at 320 px, but the header's period control and Export button row (page.tsx:802) does not wrap and still runs past a 320 px screen once its labels grow by 40% (and at 360 px when the WoW, MoM and QoQ labels grow too), so either let that row wrap with wrap="wrap" or narrow the claim to what holds.

Everything else checks out: the trend cards shrink to a 320 px column, the change line and the generated date move to their own lines, and pages at 768 px and wider render pixel-identically. Separately, the template's existing rubric score (63 of 100, unchanged here) loses points for the scorecard grid's media-query columns and the commentary-column description; that does not block this change.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: on a phone the trend cards ran past the screen edge and the content scrolled sideways. Verified on the base at 320 px, where the cards run 34 px past the screen.
  • Claim: the subtitle squeezed the separator and date into narrow slivers. Verified on the base at 320 to 414 px.
  • Claim: capping the trends grid at the chart count lets a lone chart shrink and changes nothing where a chart fits its 330 px floor. Verified: the track is 272 px at 320 px, and the tracks are identical from 390 px up.
  • Claim: the chart header row wraps, so the change line moves under the title. Verified (page.tsx:542, frames at 320 to 375 px).
  • Claim: the subtitle wraps as two groups, with the date whole on its own line. Verified (page.tsx:785-800).
  • Claim: template source only, with no component, prop or API change. Verified: two files change.
  • Claim: whole-page frames are identical at 768, 1024, 1280 and 1440 px for each period. Verified for WoW at all four widths, and for MoM and QoQ at 768 and 1280 px.
  • Claim: with text about 40% longer the page no longer overflows at 320, 360 or 390 px. False at 320 px, and at 360 px when the period labels grow; it holds at 390 px.
  • Claim: the named CLI tests pass. Verified: four test files, 80 tests, at this head.
  • Claim: build results do not change. Verified: the page renders the same components and icons, and the build tests pass.
  • Claim: tablet and desktop are unchanged, and the public text has no internal context. Verified.
  • Release note: the charts shrink instead of running past the edge, the change line moves under the title, the date moves to its own line, and tablet and desktop look the same. Verified.
  • File .changeset/scorecard-phone-fit.md: clear.
  • File packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: one blocking finding (the header action row, line 802) and one non-blocking rubric note.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: the CI run on this head was cancelled because CI was at capacity, so its build and test jobs need a re-run; lint and the CLI smoke test passed.

The header's period control and Export row now wraps, so the page no longer overflows at 320, 360 or 390 px even with text about 40% longer, which addresses the earlier requested change. The trend cards, chart headers and generated date fit a phone, and tablet and desktop frames are unchanged.

  • Not blocking: the template still scores 63 of 100 (C) on the template rubric, the same as on main; the largest existing deductions are the scorecard grid's viewport media queries over Grid, and the template description saying the commentary column folds beneath the content when narrow, while it renders above the scorecards.
Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Changeset: the trend charts shrink to a narrow column instead of running past the screen edge. Verified: at 320 px the Trends track is 272 px (330 px on main) and the main region no longer scrolls sideways.
  • Changeset: a chart's change line moves under its title when the card is narrow. Verified: page.tsx:542, 320 and 360 px frames.
  • Changeset: the generated date moves to its own line instead of squeezing into a sliver. Verified: page.tsx:785-800, 320 to 414 px frames.
  • Changeset: on the narrowest phones Export moves under the period control instead of running past the edge. Verified: page.tsx:802; at 320 px Export moves under the control, where on main it ended 16 px past the content edge.
  • Changeset and description: tablet and desktop layouts look the same. Verified: pixel-identical at 600, 768, 1024, 1280 and 1440 px for WoW, and at 768 and 1280 px for MoM and QoQ, top and bottom of the page.
  • Description: on main the chart cards kept a 330 px minimum, cut their right side and scrolled the content sideways, and the subtitle squeezed the separator and date into slivers. Verified at 320 px on main.
  • Description: max at the chart count changes nothing wherever a chart fits its 330 px floor. Verified: Grid.tsx:355-365; computed tracks are identical from 390 px up.
  • Description: the Export wrap changes only 320 px, below about 330 px in English. Verified: Export keeps its place at 360 to 414 px; the row needs a 336 px viewport.
  • Description: with text about 40% longer, nothing overflows at 320, 360 or 390 px, header included. Verified with every visible text grown 40%, word-spaced every 6 and every 12 letters.
  • Description: the template-component, icon-declaration and build CLI tests pass. Verified: 4 files, 80 tests pass on this head.
  • Description: the author's build replay shows no change to starts, alternatives or block lists. Consistent: the template's doc metadata, component list and icons are unchanged and the build tests pass; the replay itself was not rerun.
  • Description: template source only, with no component, prop or API change. Verified: two files, no public API delta.
  • Description: public text contains no internal context. Verified.
  • File .changeset/scorecard-phone-fit.md: clear; a CLI patch matches a template starter-content change.
  • File packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: clear, apart from the non-blocking rubric note.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12252 docs(cli): agent docs name the prop names that differ from other libraries
  Author: Joey Farina <[email protected]>
- #12154 fix(core): a numeric typography weight builds through an extended base's adaptation rules
  Author: Joey <[email protected]>
- #12092 fix(cli): theme build reads the Core it builds with for variant declarations, and names the build command alone
  Author: Joey Farina <[email protected]>
- #12316 fix(core): a shorthand never follows its own longhand in one style merge
  Author: josephfarina <[email protected]>
- #12357 fix(core): a Table stays the scroll region when a host scrolls every table's parent
  Author: Joey Farina <[email protected]>
- #12349 fix(core): end a mouse drag a sandboxed frame never saw released
  Author: josephfarina <[email protected]>
- #12425 fix(cli): use a stored doc parse only with the zod release that made it
  Author: Joey <[email protected]>
- #12396 fix(AppShell): with the standard width points, a server-rendered shell hides its inline side nav on a phone before its script runs
  Author: Joey <[email protected]>
- #12438 fix(charts): end dots draw whole and a thinned axis keeps its last label
  Author: Joey Farina <[email protected]>
- #12448 fix(cli): upgrade outside a project names the project, not --from
  Author: Joey Farina <[email protected]>
- #12459 fix(templates): the dashboard scorecard fits a phone screen
  Author: Joey Farina <[email protected]>
- #12428 fix(core): Field labels draw in a bolder face than their description
  Author: Joey Farina <[email protected]>
- #12435 fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral
  Author: Joey <[email protected]>
- #12432 fix(templates): dashboard chart labels show whole instead of clipped by the chart edge
  Author: Joey Farina <[email protected]>
- #12441 fix(cli): mark icon-set generated calls pure so apps drop unused icons
  Author: Joey Farina <[email protected]>
- #12472 fix(MetadataListItem): a value breaks only a word longer than its line
  Author: Joey <[email protected]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12718.

@github-actions
github-actions Bot deleted the josephfarina/scorecard-phone-fit branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 540b5a75 Deployed Nov 17, 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant