Skip to content

fix(templates): dashboard templates use page sections, not cards, for page regions - #12494

Closed
josephfarina wants to merge 1 commit into
mainfrom
josephfarina/rl-47-template-sections
Closed

josephfarina wants to merge 1 commit into
mainfrom
josephfarina/rl-47-template-sections

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

HOLD: waiting on the docs gate's status on this head; removed when it posts.

User impact

The dashboard-scorecard and dashboard-progress templates wrapped whole page regions in Card, which Card's own guidance lists as a don't ("Wrap page sections in cards … these are page regions, use Section or heading + stack"; Section: "Use Card when you mean Section"). Pages built from these templates copied that and came out as a stack of bordered boxes. Now page regions sit in page sections under their headings, and cards stay for repeated, comparable items.

  • dashboard-scorecard: the "Goal attainment" list is no longer inside a card; its rows keep their dividers. The metric tiles, the four trend charts (a comparison grid, each chart independent) and the commentary notes keep their cards.
  • dashboard-progress: the "Overall progress", "Scope burndown" and "Blockers & risks" panels are no longer cards; they sit in a full-width Section with a bottom divider, like the milestone timeline above them. "Workstreams" moves into its own Section with a section heading (its count stays on the opposite edge). The panel titles keep their outline level. CardHeading is renamed PanelHeading and loses its unused meta slot. Chart tooltips keep their cards.

Same content, same order, same grid. No component, prop or API change; no behavior change. The template docs (descriptions, keywords) are unchanged.

Visual authority

  • Correction already settled by current authority: Card's and Section's own usage guidance (Card.doc.mjs, Section.doc.mjs).

Before and after

Each sheet: every first-party theme (and no theme) in rows; light before, light after, dark before, dark after in columns; whole page; rendered files in Chromium.

dashboard-progress, 1280 px
dashboard-progress 1280

dashboard-progress, 390 px
dashboard-progress 390

dashboard-scorecard, 1280 px
dashboard-scorecard 1280

dashboard-scorecard, 390 px
dashboard-scorecard 390

State matrix

Both templates × no theme, neutral, stone, butter, chocolate, gothic, matcha, y2k × light, dark × 390 and 1280 px, plus 375 px and the dev app (no theme), with an automatic layout and contrast check (overflow, clipping, overlap, unreachable controls, text contrast):

  • No new finding in any view.
  • One fix: chocolate light, the "Blocked" badge in the risks list now passes text contrast (4.02:1 on the card fill before; it now sits on the page background).
  • Findings that remain are the same before and after and come from other open fixes (a chart label clipped at the top edge; the scorecard header's Export button on narrow phones under two themes).

Scope

Components: none (templates: dashboard-scorecard, dashboard-progress)

  • Appearance is the primary intent.
  • Behavior, API, interaction model, and unrelated layout changes were removed or split.
  • The evidence shows the changed pixels actively running, not only source or computed styles.
  • Public text and artifacts contain no internal Meta context.

Testing

  • packages/cli/api/template (incl. strict template typecheck), template discovery tests, packed-template-components, template-icon-declarations, doc-loads, check-theme-template: pass with CI=1.
  • Prettier and ESLint clean on both files. pnpm review:pre: 0 findings.
  • Merges cleanly with the other open changes to these two templates.
  • Build replay over real build requests, cold, base vs head: no start, alternatives list or block list changes.

@vercel

vercel Bot commented Nov 18, 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 18, 2026 12:09am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@josephfarina
josephfarina marked this pull request as ready for review November 18, 2026 00:02
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 18, 2026
@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 12:27 AM UTC

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 0d85e26

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.

Approved pending CI: the main CI run on this head was cancelled because CI was full, so it needs a re-run before its build and test jobs report.

The two dashboard templates now keep page regions in sections and use cards only for discrete items, as the layout-regions contract says, and the release note and description match the code.

Non-blocking:

  • dashboard-progress/page.tsx:766 still says "the card wraps the legend under it", but the donut no longer sits in a card, so "the row wraps the legend" would match the code.
  • dashboard-progress is still about 1,130 lines and scores 74/100 on the template rubric, unchanged from main; the raw <div> around the donut, 15 custom style declarations, the recharts import and a description without a job or synonyms cost the points.
Claims and files checked

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

  • Claim: the release note says both templates stop wrapping page sections in cards. Verified (dashboard-scorecard/page.tsx:846-856, dashboard-progress/page.tsx:962-985, :1084-1128).
  • Claim: the goal list, summary panels and workstream table sit in page sections under their headings. Verified (same lines; Workstreams heading at dashboard-progress/page.tsx:1111).
  • Claim: metric tiles, trend charts and commentary notes keep their cards. Verified (dashboard-scorecard/page.tsx:466, :538, :696).
  • Claim: Card's and Section's own guidance call card-wrapped page sections a don't. Verified (Card.doc.mjs:22, Section.doc.mjs:124).
  • Claim: the goal rows keep their dividers. Verified (dashboard-scorecard/page.tsx:851).
  • Claim: the summary panels sit in a full-width section with a bottom divider, like the milestone timeline. Verified (dashboard-progress/page.tsx:1084, :1070).
  • Claim: Workstreams has its own section and a section heading, with its count on the opposite edge. Verified (dashboard-progress/page.tsx:1109-1114, :511).
  • Claim: the panel titles keep their outline level. Verified (rendered heading outline, both sides).
  • Claim: the panel heading helper is renamed and drops its unused slot. Verified (dashboard-progress/page.tsx:522-537).
  • Claim: chart tooltips keep their cards. Verified (dashboard-progress/page.tsx:637, :750, :827).
  • Claim: same content, order and grid. Verified for content, order and grid tracks; the grid gap widens from 4 to 10 (dashboard-progress/page.tsx:1086).
  • Claim: no component, prop, API or behavior change, and the template docs are unchanged. Verified (only the two page files and the release note change).
  • Claim: the chocolate light Blocked badge now passes text contrast. Verified, 4.02:1 before and 4.84:1 after (rendered colors).
  • Claim: no new layout finding, and the remaining ones pre-exist. Consistent with seven rendered views (neutral light and dark at 1280 and 390 px, chocolate light at 1280 px); the other themes were not rendered.
  • Claim: template tests, the strict template typecheck, Prettier and ESLint pass. Verified (5 template test files, 57 tests; lint and format clean); the other listed checks, the merge with other open changes and the build replay were not re-run.
  • File: .changeset/templates-sections-not-cards.md: clear.
  • File: packages/cli/assets/templates/pages/dashboard-progress/page.tsx: non-blocking notes (stale comment, unchanged rubric score, page size).
  • File: packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: clear.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12072 fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint
  Author: Joey Farina <[email protected]>
- #12274 fix(core): cap the Selector family's trigger-width list minimum at the viewport
  Author: josephfarina <[email protected]>
- #12215 fix(cli): advise keeping one dependency when two packages declare one provider ID
  Author: Joey <[email protected]>
- #12322 [experimental] export --reverse: use the project's own copy of an aliased file, or restore the page's copy with its paths entry
  Author: josephfarina <[email protected]>
- #12403 docs(core): Text's as and PowerSearch's statusVariant list every value their types allow
  Author: Joey Farina <[email protected]>
- #12494 fix(templates): dashboard templates use page sections, not cards, for page regions
  Author: Joey Farina <[email protected]>
- #12282 fix(cli): theme build --check and doctor ignore which CLI release, and which command name, built a theme
  Author: Joey Farina <[email protected]>
- #12420 fix(Chat): ChatToolCalls and ChatDictationButton without a required prop name it and the fix in development
  Author: Joey Farina <[email protected]>
- #12205 fix(cli): equally scored icons put first one whose id the query names in full
  Author: Joey Farina <[email protected]>
- #12455 fix(core): a theme sets the room between a checkbox or a switch and its label
  Author: josephfarina <[email protected]>
- #12658 perf(cli): the first theme build after a CLI upgrade reuses the JavaScript it compiled from a theme's local modules
  Author: Joey <[email protected]>
- #12323 [experimental] export: React logs no render timings while the export draws a page
  Author: Joey Farina <[email protected]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12713.

@github-actions
github-actions Bot deleted the josephfarina/rl-47-template-sections branch November 19, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 0d85e26b Deployed Nov 18, 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