Skip to content

fix(core): a theme radius of different corners reaches what a Card, a Dialog and a menu hand each corner to - #12388

Closed
josephfarina wants to merge 11 commits into
mainfrom
josephfarina/theme-corners-reach-children
Closed

josephfarina wants to merge 11 commits into
mainfrom
josephfarina/theme-corners-reach-children

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A theme that gives a Card, a Dialog or a menu corners of different radii (borderRadius: '12px 12px 0 0', a corner longhand such as borderStartStartRadius, or 8px / 4px) draws the container right, but what the container hands its corners to does not follow (an elliptical corner reaches a full-bleed Table after this change; a List and menu rows subtract the padding from it, so they stay square there):

  • A full-bleed Table or List in a Card or a Dialog takes one radius for every corner (the card's first corner, or none), so its focus ring and row fills stay rounded at a square corner, or square at a rounded one.
  • A menu's rows take no radius at all: the menu's one variable holds four values, which the rows' calc() cannot read.

Problem and solution fit

The container publishes one radius per block edge, taken from its single private radius variable. A radius of four corners has no single value, so every reader of that variable gets the wrong corner or an invalid value. The fix writes each corner to its own variable at compile time, where the four values are known, and has the readers take their own corner. A one-value radius writes the same corner everywhere, so a variant or state rule that sets one radius still overrides a base rule's corners.

Expected behavior and authority

architecture:container-padding (Corner geometry): a full-bleed child that reaches a rounded container's corner takes that corner; the container publishes one variable for each logical corner. This change makes each of those variables carry its own corner when a theme gives the corners different radii. For menus, component:DropdownMenu DEC-12: every pointer-menu row takes the menu's corner shape, less its padding.

Smallest restoration

  • generateThemeRules: for a derived borderRadius entry with corners: true, write <var>-top-left … from the shorthand or a physical longhand and <var>-start-start … from a logical longhand. A later radius in the block replaces an earlier one, and the shorthand leaves no logical corner (initial), as the cascade does on the element.
  • corners: true on card, dialog, dropdown-menu and context-menu (registry, the component docs, and the authoring type that describes derived entries).
  • Card and Dialog set their four corner publications from those variables (with the :dir(rtl) mapping); containerCorners publishes each corner from its own host variable.
  • The menu's item, checkbox item, radio item and sub-menu row take each corner less the menu padding (one shared style); component:DropdownMenu DEC-12 records that every pointer-menu row takes the menu's shape; the touch sheet's list rows keep their own corners.
  • Card, Dialog and each menu surface (DropdownMenu, its sub-menus, ContextMenu and the Breadcrumbs overflow menu) reset their corner variables, so a default one inside a themed one keeps its own corners.
  • The CLI theme editor takes a menu radius of different corners (one length per corner; a / radius is still refused there).
  • The CLI theme editor no longer says a card's content takes one radius for every corner when Core's entry has corners.
  • A physical corner longhand written after a logical one for the same corner leaves the logical variable set, so the child takes the logical value while the element draws the physical one; which corner wins depends on the direction, which the compiler does not know.
  • Card and Dialog only copy their radius variables into shared host variables; containerCorners.stylex.ts reads each corner from them, right-to-left included, in one place. architecture:container-padding keeps menus outside container geometry, so menu rows read the menu's own corner variables, less the menu padding, in menuRowCorners.stylex.ts, not the container publication.
  • The vars-documented check counts a corners entry's corner variables as documented, from one corner list the theme pipeline shares.

Evidence

  • Reproduction before the change: a theme with card: {base: {borderRadius: '12px 12px 0 0'}} and a Table that fills the Card: the card draws 12 12 0 0, the table's scroll region 0 0 0 0 (Chromium).
  • Result after the change: the scroll region draws 12 12 0 0. A logical borderStartStartRadius: 20px in a right-to-left page reaches the table's top-right corner. A muted variant with borderRadius: 4px over that base draws 4 4 4 4 on both.
  • Menu rows, theme dropdown-menu borderRadius: '0 0 12px 12px', rows highlighted:
Before After
Menu rows square in a menu rounded at the bottom Menu rows rounded at the bottom, following the menu
  • Representative unchanged path: a one-value radius (the official themes' card radii) draws the same corners as before; the existing ContainerCorners Chromium expectations are unchanged.
  • Regression test or other mutation-sensitive proof: generateThemeRules.test.ts (corner variables, longhands, replacement, no variables without the flag, corner parsing) and seven new ContainerCorners Chromium cases (rounded top card, logical and physical corners in right-to-left, bottom-rounded dialog list, a default card inside a rounded one, every menu row kind under a bottom-rounded and a one-radius menu, and menu rows in a right-to-left page).

Scope

Components: Card, Dialog, DropdownMenu, ContextMenu, Breadcrumbs (its overflow menu), Layout (container corners), theme compilation; @astryxdesign/cli type ComponentThemingDerivedVar.corners (new member)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. (One new public type member, named on the Components line: ComponentThemingDerivedVar.corners, the corners flag of the component-doc derived entry, beside replaces. The corner variables are private.)
  • Public text and artifacts contain no internal Meta context.

Testing

  • The local CI run for this head (build, typecheck, lint, the Vitest node and ui tests the change reaches) passes; see the preflight line below.
  • Headless Chromium on a built Storybook: the ContainerCorners cases above pass, measured with getComputedStyle.
  • ContainerCorners.a11y.chromium.spec.ts extended; runs in the a11y contract job.

Writing rubric results

Record rubric (docs/contributing/spec-writing.md) over DropdownMenu.spec.md (DEC-12):

  • R1 narration: DEC-12 states the system in the present tense.
  • R2 research: none in the record.
  • R3 evidence: none cited.
  • R4 rejected alternatives: one, inside DEC-12, one line.
  • R5 change references: none.
  • R6 open questions: none added.
  • R7 project status: none.

preflight: pass 41bff50 (skip-ci marker finding only)

@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 19, 2026 3:41pm 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 19, 2026, 4:16 PM UTC

@josephfarina
josephfarina marked this pull request as ready for review November 17, 2026 18:50
@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 · c6ab36c

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.

Changes requested. Card and Dialog now hand each themed corner to a full-bleed Table or bleeding List, and the last push fixed the typecheck and docsite-build failures, but these still need fixing:

  • A default Card nested in a Card whose theme variant sets a radius hands its full-bleed Table the outer card's corners (24px against its own 12px), because the new corner variables inherit and nothing resets them on the Card, Dialog or menu root (Card.tsx:98-123).
  • Sub-menu rows keep the old single-radius rule (DropdownMenuSubMenu.tsx:146), so they stay square while their sibling rows follow the menu; apply menuRowCornerStyles.root there.
  • lint now fails because writing borderRadius: '0' pushed ContainerCorners.stories.tsx:259 past Prettier's line width, so run Prettier on that file.
  • The changeset says an elliptical radius reaches a bleeding List and menu rows, but both stay square because they subtract padding from the corner (only a Table takes it), and the description's "before" radii were 0, not 12 at every corner.
  • ComponentThemingDerivedVar.corners is a new public type member of @astryxdesign/cli, so name it on the Components: line and correct the "No new public API" checkbox.

Separately, approval also waits on an engineering owner deciding which corners menu rows take when a theme gives the menu different corners: every row mirroring the menu's shape, as here, or only the rows at a corner. An engineering owner records that decision with /approve-spec <full head SHA> on an amended record, and the author may do so as an engineering owner.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0).

Claims:

  • Different-corner theme radii reach a full-bleed Table or bleeding List in a Card or Dialog, ring and fills included: verified (Chromium, Table 24 24 0 0; last List row 0 0 24 24).
  • A logical corner longhand reaches the right corner in right-to-left: verified (Chromium, card and Table 0 20 0 0).
  • Menu rows take the menu's shape less its padding: verified for item and checkbox rows (0 0 12 12) and radio rows (same shared style); false for sub-menu rows.
  • An elliptical radius reaches these children: verified for Table (24px 12px); false for List and menu rows (0).
  • Before the change these children took one radius or none: they took none (0); the description's 12 12 12 12 reproduction is false.
  • The pipeline writes per-corner private variables only for flagged components: verified (generateThemeRules.ts:1656-1692, unit tests).
  • A variant's one-value radius overrides a base rule's corners: verified (every corner rewritten, unit test).
  • A one-value radius draws as before: verified for a container's own rule; false for a Card nested in a themed variant.
  • No new public API: false (ComponentThemingDerivedVar.corners).
  • The docsite keeps the corners field: verified (projection test passes).
  • Story and test fixtures use string radii: verified (typecheck passes); the story line now fails Prettier.
  • The theme suites pass: verified (578 tests locally).
  • No internal context in public text: verified.

Files:

  • .changeset/theme-corners-reach-children.md: elliptical claim overstated.
  • apps/docsite/scripts/generate-data.mjs: clear.
  • apps/docsite/scripts/lib/theming-doc.mjs: clear (fixed).
  • apps/storybook/stories/ContainerCorners.stories.tsx: Prettier failure at line 259.
  • packages/cli/authoring/doctypes/base/type.ts: new public member outside the scope line; doc comment not attached.
  • packages/core/src/Card/Card.doc.mjs: clear.
  • packages/core/src/Card/Card.tsx: nested inheritance.
  • packages/core/src/ContextMenu/ContextMenu.doc.mjs: clear.
  • packages/core/src/Dialog/Dialog.doc.mjs: clear.
  • packages/core/src/Dialog/Dialog.tsx: nested inheritance.
  • packages/core/src/DropdownMenu/DropdownMenu.doc.mjs: clear.
  • packages/core/src/DropdownMenu/DropdownMenuCheckboxItem.tsx: clear.
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx: clear.
  • packages/core/src/DropdownMenu/DropdownMenuRadioItem.tsx: clear.
  • packages/core/src/DropdownMenu/menuRowCorners.stylex.ts: sub-menu rows not covered; menu-row shape awaits an owner decision.
  • packages/core/src/Layout/__tests__/ContainerCorners.a11y.chromium.spec.ts: clear; no nested case.
  • packages/core/src/Layout/containerCorners.stylex.ts: clear.
  • packages/core/src/theme/derivedVarRegistry.test.ts: clear.
  • packages/core/src/theme/derivedVarRegistry.ts: clear.
  • packages/core/src/theme/generateThemeRules.test.ts: clear (fixed).
  • packages/core/src/theme/generateThemeRules.ts: corner variables written without a reset on unmatched instances.

Automated review (maintainer link)

Comment thread packages/core/src/Card/Card.tsx Resolved

@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.

Changes requested. Card and Dialog now hand each themed corner to a full-bleed Table or bleeding List, and the last push fixed the earlier Lint failure, but these still need fixing:

  • A default Card nested in a Card whose theme variant sets a radius hands its full-bleed Table the outer card's corners (24px against its own 12px), because the new corner variables inherit and nothing resets them on the Card, Dialog or menu surface roots (Card.tsx:98-123).
  • Sub-menu rows keep the old single-radius rule (DropdownMenuSubMenu.tsx:146), so they stay square while their sibling rows follow the menu; apply menuRowCornerStyles.root there and drop the old rule.
  • The changeset says an elliptical radius reaches a bleeding List and menu rows, but both stay square because they subtract padding from the corner (only a Table takes it), and the description's "before" Table radii were 0, not 12 at every corner.
  • ComponentThemingDerivedVar.corners is a new public type member of @astryxdesign/cli, so name it on the Components: line and correct the "No new public API" checkbox.

Separately, approval also waits on an engineering owner deciding which corners menu rows take when a theme gives the menu different corners: every row mirroring the menu's shape, as here, or only the rows at a corner. An engineering owner records that decision with /approve-spec <full head SHA> on an amended record, and the author may do so as an engineering owner.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Different-corner theme radii reach a full-bleed Table in a Card, focus ring included: verified (Chromium, 24 24 0 0; the base draws 0 0 0 0).
  • The last bleeding List row in a Dialog takes the bottom corners and the first stays square: covered by the new Chromium case (read; not run here because CI's browser jobs did not run).
  • A logical corner longhand reaches the right corner in right-to-left: covered by the :dir(rtl) mapping and the new Chromium case (read).
  • Menu rows take the menu's shape less its padding: verified for item and checkbox rows (0 0 12 12) and radio rows (same shared style); false for sub-menu rows (0 0 0 0).
  • An elliptical radius reaches these children: verified for Table (24px 12px); false for List and menu rows (0).
  • Before the change these children took one radius or none: they took none (0); the description's 12 12 12 12 reproduction is false.
  • The pipeline writes per-corner private variables only for flagged components: verified (unit tests).
  • A variant's one-value radius overrides a base rule's corners: verified (every corner rewritten, unit test).
  • A one-value radius draws as before: verified for a container's own rule; false for a Card nested in a themed variant.
  • No new public API: false (ComponentThemingDerivedVar.corners).
  • The theme, Card, Dialog, menu and Layout suites pass: verified (1,383 and 578 tests).
  • No internal context in public text: verified.

Files:

  • .changeset/theme-corners-reach-children.md: elliptical claim overstated.
  • apps/docsite/scripts/generate-data.mjs: clear.
  • apps/docsite/scripts/lib/theming-doc.mjs: clear.
  • apps/storybook/stories/ContainerCorners.stories.tsx: clear (Prettier fixed).
  • packages/cli/authoring/doctypes/base/type.ts: new public member outside the scope line; doc comment not attached.
  • packages/core/src/Card/Card.doc.mjs: clear.
  • packages/core/src/Card/Card.tsx: nested inheritance.
  • packages/core/src/ContextMenu/ContextMenu.doc.mjs: clear.
  • packages/core/src/Dialog/Dialog.doc.mjs: clear.
  • packages/core/src/Dialog/Dialog.tsx: nested inheritance.
  • packages/core/src/DropdownMenu/DropdownMenu.doc.mjs: clear.
  • packages/core/src/DropdownMenu/DropdownMenuCheckboxItem.tsx: clear.
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx: clear.
  • packages/core/src/DropdownMenu/DropdownMenuRadioItem.tsx: clear.
  • packages/core/src/DropdownMenu/menuRowCorners.stylex.ts: sub-menu rows not covered; menu-row shape awaits an owner decision.
  • packages/core/src/Layout/__tests__/ContainerCorners.a11y.chromium.spec.ts: clear; no nested case.
  • packages/core/src/Layout/containerCorners.stylex.ts: clear.
  • packages/core/src/theme/derivedVarRegistry.test.ts: clear.
  • packages/core/src/theme/derivedVarRegistry.ts: clear (long doc sentence, non-blocking).
  • packages/core/src/theme/generateThemeRules.test.ts: clear.
  • packages/core/src/theme/generateThemeRules.ts: corner variables written without a reset on unmatched instances.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5864240

@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed needs:spec-owner-review Current knowledge records await owner approval labels Nov 19, 2026
… Dialog and a menu hand each corner to

- The theme pipeline writes each corner of a radius to its own private variable (<var>-top-left … from the shorthand or a physical longhand, <var>-start-start … from a logical longhand) for components whose derived borderRadius entry sets the new corners flag: card, dialog, dropdown-menu, context-menu.
- Card and Dialog publish each of their corners to a full-bleed Table or List (a logical corner first, else the physical corner it is in this direction, else the one radius).
- A menu's rows take each menu corner less the menu's padding.
- A radius of one value draws as before.
…ts own corners; sub-menu rows follow the menu

[skip ci]

@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: CI has not run on this head yet. A themed radius with different corners now reaches a Card's or Dialog's full-bleed Table and bleeding List rows, every pointer-menu row follows the menu's shape as the new DropdownMenu decision records, and the four earlier findings are fixed. Next, rebase onto main: generateThemeRules.ts and its test conflict with main's reworked theme compiler, so CI cannot run until that is resolved, and main now lowers :hover blocks through the same derived path, so keep the corner fan-out there.

  • Non-blocking: a physical corner longhand written after a logical one for the same corner (a variant's borderTopLeftRadius over a base borderStartStartRadius) still hands the child the logical value, as the description notes.
  • Non-blocking: the container-padding record's Owning code still says Card and Dialog set the radius at each block edge; they now copy each corner.
Claims and files checked

Review mode: full; reason: over-500-lines

  • The release note says a per-corner theme radius on a Card or Dialog reaches a full-bleed Table or bleeding List, focus ring and fills included: verified in Chromium (Table 24 24 0 0 with its ring on the curve; last bleeding row 0 0 16 16).
  • The release note says pointer-menu rows, sub-menu and flyout rows, and ContextMenu rows take the menu's shape less its padding: verified in Chromium (0 0 12 12 on all six menu rows and on ContextMenu rows).
  • The release note says touch-sheet list rows and a drilled-in sub-menu view with a header or footer keep their own corners: verified from the code (only the four row components apply the row corners; the drilled-in frame resets them and carries no theme target, DropdownMenuSubMenu.tsx:1236-1241).
  • The release note says an elliptical corner reaches a full-bleed Table only, while List and menu rows stay square: verified from the code (two-value corners from radiusCorners; List and menu rows subtract padding inside calc()).
  • The release note says a default Card, Dialog or menu inside a themed one keeps its own corners: verified (Chromium nested Card keeps 12px; resets in Dialog.tsx:225-234 and every menu surface).
  • The release note says these children were square before, or took the first corner everywhere when the theme editor wrote the radius: verified (base Chromium 0 0 0 0; the editor writes the shorthand as the first corner, _settings.mjs).
  • The release note says the pipeline writes each corner to its own private variable only for flagged entries: verified (generateThemeRules.test.ts; a button radius writes no corner variable).
  • The release note says a one-value radius draws as before: verified (a one-radius menu draws pixel-identical rows; the published themes' built surface is unchanged).
  • The description says the base Table drew 0 0 0 0 and menu rows took no radius: verified on the base in Chromium.
  • The description says a logical start corner in a right-to-left page reaches the table's top-right, and a physical corner stays where the card draws it: verified in Chromium (0 20 0 0; 12 0 0 0).
  • The description says a one-value variant over a per-corner base draws one radius everywhere: verified from the code (the shorthand writes all four corners and clears the logical ones, generateThemeRules.ts:1661-1673).
  • The description says the theme editor takes a menu radius of different corners, still refuses a slash radius, and drops the single-radius note when Core flags corners: verified (_check.mjs:7258-7273, _edit.mjs:6778-6786, the new CLI test passes).
  • The description says a physical longhand after a logical one leaves the logical variable set: verified (generateThemeRules.ts:1675-1681); a non-blocking gap.
  • The description says every container and menu surface resets its corner variables: verified in the diff (Card, Dialog, DropdownMenu, its flyout and region, ContextMenu, Breadcrumbs).
  • The description says the documented-variables check counts corner variables from one shared list: verified (derivedVarRegistry.test.ts:511-517, radiusCornerVars).
  • The description says seven new Chromium cases were added and existing expectations are unchanged: verified in the spec diff.
  • The description says one new public type member is added and the corner variables are private: verified (built surface: no change in Core or the themes; type.ts:496).
  • The description says the local CI run passes: not verifiable here, since CI has not run at this head; Core typecheck, ESLint, Prettier and the touched unit and CLI tests pass in this review.
  • The description says public text carries no internal context: verified.
  • .changeset/theme-corners-reach-children.md: clear
  • apps/docsite/scripts/generate-data.mjs: clear
  • apps/docsite/scripts/lib/theming-doc.mjs: clear
  • apps/storybook/stories/ContainerCorners.stories.tsx: clear
  • docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear
  • packages/cli/api/theme-edit/_check.mjs: clear
  • packages/cli/api/theme-edit/_context.mjs: clear
  • packages/cli/api/theme-edit/_edit.mjs: clear
  • packages/cli/api/theme-edit/_settings.mjs: clear
  • packages/cli/api/theme-edit/theme-corners-content-each-corner.test.mjs: clear
  • packages/cli/authoring/doctypes/base/type.ts: clear
  • packages/core/src/Breadcrumbs/BreadcrumbItem.tsx: clear
  • packages/core/src/Card/Card.doc.mjs: clear
  • packages/core/src/Card/Card.tsx: clear
  • packages/core/src/ContextMenu/ContextMenu.doc.mjs: clear
  • packages/core/src/ContextMenu/ContextMenu.tsx: clear
  • packages/core/src/Dialog/Dialog.doc.mjs: clear
  • packages/core/src/Dialog/Dialog.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenu.doc.mjs: clear
  • packages/core/src/DropdownMenu/DropdownMenu.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuCheckboxItem.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuRadioItem.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx: clear
  • packages/core/src/DropdownMenu/menuRowCorners.stylex.ts: clear
  • packages/core/src/Layout/__tests__/ContainerCorners.a11y.chromium.spec.ts: clear
  • packages/core/src/Layout/containerCorners.stylex.ts: clear
  • packages/core/src/theme/derivedVarRegistry.test.ts: clear
  • packages/core/src/theme/derivedVarRegistry.ts: clear
  • packages/core/src/theme/generateThemeRules.test.ts: clear
  • packages/core/src/theme/generateThemeRules.ts: clear

Automated review (maintainer link)

Comment on lines +1675 to +1679
} else if (prop in RADIUS_CORNER_PROPS) {
for (const varName of cornerVarRoots) {
const name = `${varName}-${RADIUS_CORNER_PROPS[prop]}`;
cornerProps.delete(name);
cornerProps.set(name, value);

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.

Non-blocking: a physical longhand here leaves an earlier logical variable for the same corner set, and the readers take the logical one first. With card: {base: {borderStartStartRadius: '4px'}, 'variant:muted': {borderTopLeftRadius: '20px'}}, a muted card in a left-to-right page draws 20px at the top left while its Table takes 4px. The description already names this gap; it is narrow enough to leave, but worth a test that pins the current behaviour.

@josephfarina
josephfarina force-pushed the josephfarina/theme-corners-reach-children branch from 5864240 to 41bff50 Compare November 19, 2026 15:28
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 41bff50

@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: no build, test or lint run has finished on this head yet, so this is not a merge-ready signal; the merge guard holds until the required checks pass.

A theme radius whose corners differ now reaches what a Card, a Dialog and a pointer menu hand each corner to, and the four findings of the earlier reviews are fixed and re-measured at this head: a default Card inside a themed Card keeps its own corners, the sub-menu trigger row follows the menu, the release note's elliptical wording is accurate, and the stories file is formatted. No blocking finding remains.

Two things worth a look, neither blocking:

  • A physical corner longhand written after a logical one for the same corner leaves the logical variable set, so a muted card can draw 20px at the top left while its full-bleed Table takes the earlier logical 4px; the description names this gap, and a test pinning today's behaviour would keep it from drifting.
  • The eight-line corner reset is repeated in five files; a ninth surface that forgets it will hand a nested default menu its ancestor's corners.
Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Release note: a theme radius with different corners now reaches a Card's or a Dialog's full-bleed Table and bleeding List, focus ring and row fills included — verified: Chromium at this head: card 12px 12px 0px 0px with the Table's scroll region 12px 12px 0px 0px (base 0px 0px 0px 0px); a Dialog themed 0 0 16px 16px gives its last bleeding row 0 0 16px 16px; the Tab-focused scroll region's ring follows that curve.
  • Release note: the rows of a pointer menu, sub-menu rows included, take the menu's shape less its padding — verified: all six rows (item, checkbox, two radios, the sub-menu trigger and the flyout's row) measure 0 0 8px 8px under a menu themed 0 0 12px 12px with 4px menu padding.
  • Release note: the touch sheet's list rows and a drilled-in sub-menu view with its own header or footer keep their own corners — verified: the bottom-sheet presentation renders its rows through MenuBottomSheetActionList (a List), and the header/footer region style resets the corner variables and sets the default container radius.
  • Release note: an elliptical corner reaches a full-bleed Table, while a List and menu rows keep square corners there — verified: a Card themed 8px / 4px gives its Table 8px 4px at each corner; a bleeding List in the same card and every row of a menu themed 16px / 8px measure 0px.
  • Release note: a default Card, Dialog or menu inside a themed one keeps its own corners — verified: a default Card inside a muted Card themed 24px hands its Table 12px 12px 12px 12px on both base and head; every surface resets its eight corner variables.
  • Release note: before the change these children kept square corners, or took the first corner's radius where the CLI editor wrote the radius — verified: base measurements show 0px on every such child; the editor's first-corner note and its single-radius message are in the editor source and its test.
  • Release note: the pipeline writes each corner only for components whose derived radius entry sets the new flag, and a one-value radius draws as before — verified: the unit test shows no corner variable for Button; the built CSS of the seven published themes changes only by card corner variables carrying the radius they already drew, three of the seven byte-identical.
  • Description: the compiler writes each corner from the shorthand, a physical longhand and a logical longhand, a later radius replaces an earlier one, and the shorthand leaves no logical corner — verified: the corner map in the compiler plus five new unit tests covering each case, including the parser's 1-4 value fill and its / handling.
  • Description: the flag is set on card, dialog, dropdown-menu and context-menu in the registry, the component docs and the authoring type — verified: all four registry entries, four doc entries and the new optional member in the authoring type.
  • Description: Card and Dialog set their four corner publications from those variables, with the right-to-left mapping, in one shared place — verified: both components copy their radius variables into the shared host variables and apply the one shared corner reading before the publication.
  • Description: one shared style gives the item, checkbox, radio and sub-menu rows their corners — verified: the new menu-row style is imported by exactly those four row components and by nothing else.
  • Description: Card, Dialog and each menu surface reset their corner variables — verified: nine reset blocks across Card, Dialog (dialog and inline wrapper), DropdownMenu, its flyout and region, ContextMenu's two surfaces and the Breadcrumbs overflow menu.
  • Description: the CLI theme editor takes a menu radius of different corners, and a slash radius is still refused there — verified: a probe run of the editor: 0 0 12px 12px on the menu is accepted, 8px / 4px is still refused, and a five-value radius is refused by the grammar check before the relaxed one.
  • Description: the CLI theme editor no longer says a card's content takes one radius for every corner — verified: the note is now conditioned on the derived entry lacking the flag, with a test for both the card and a part that still takes one radius.
  • Description: a physical corner longhand written after a logical one for the same corner leaves the logical variable set — verified: the compiler writes only the named corner for a longhand, so the reader keeps the logical value; the consequence is the non-blocking note above.
  • Description: the vars-documented check counts a flagged entry's corner variables as documented, from one shared corner list — verified: the registry test derives both the documented set and the Breadcrumbs cross-component list from the shared helper, and passes.
  • Description: the before and after Chromium measurements it reports — verified: each reported value matches this review's own measurements at the same stories.
  • Description: seven new Chromium cases and the new compiler tests — verified: seven test blocks added to the container-corners spec and five new compiler cases plus the parser case; all unit suites pass at this head.
  • Description: one new public type member and no other public API — verified: the API generator reports zero rows for Core and the seven themes; the only surface change is the optional authoring-type member.
  • Description: the local run for this head passes — consistent with this review: this review ran the Core and docsite unit suites, the new CLI editor test, the knowledge and changeset checks and the Core typecheck at this head, all passing; the repository's Chromium spec was not executed here.

Files:

  • .changeset/theme-corners-reach-children.md — clear — every claim in it was checked (above).
  • apps/docsite/scripts/generate-data.mjs — clear — adds the new field to the emitted interface, which the projection test pins.
  • apps/docsite/scripts/lib/theming-doc.mjs — clear — field list matches the emitted interface; the projection test passes.
  • apps/storybook/stories/ContainerCorners.stories.tsx — clear — seven stories that reach the changed code; they render in both trees and were used for this review's measurements.
  • docs/specs/components/DropdownMenu/DropdownMenu.spec.md — clear — adds DEC-12 only; the record ends at DEC-11 on the default branch, no decider or approval line changes, and an engineering owner approved this head.
  • packages/cli/api/theme-edit/_check.mjs — clear — the relaxed refusal still rejects a slash radius, and a malformed radius is caught earlier by the grammar check.
  • packages/cli/api/theme-edit/_context.mjs — clear — type annotation only.
  • packages/cli/api/theme-edit/_edit.mjs — clear — the single-radius note is now conditioned on the derived entry.
  • packages/cli/api/theme-edit/_settings.mjs — clear — type annotation and comment.
  • packages/cli/api/theme-edit/theme-corners-content-each-corner.test.mjs — clear — covers the card, a part that still takes one radius, and a menu radius of different corners; passes.
  • packages/cli/authoring/doctypes/base/type.ts — clear — the optional member, with its doc comment now attached to it.
  • packages/core/src/Breadcrumbs/BreadcrumbItem.tsx — clear — the overflow menu resets its corner variables.
  • packages/core/src/Card/Card.doc.mjs — clear — the flag on both locales' entries.
  • packages/core/src/Card/Card.tsx — clear — resets its corner variables and publishes through the shared corner reading; the nested-card case is measured.
  • packages/core/src/ContextMenu/ContextMenu.doc.mjs — clear.
  • packages/core/src/ContextMenu/ContextMenu.tsx — clear — both surfaces reset their corner variables.
  • packages/core/src/Dialog/Dialog.doc.mjs — clear.
  • packages/core/src/Dialog/Dialog.tsx — clear — the dialog and the inline wrapper reset, and the inner corners come from the shared reading.
  • packages/core/src/DropdownMenu/DropdownMenu.doc.mjs — clear.
  • packages/core/src/DropdownMenu/DropdownMenu.tsx — clear — the popover surface resets its corner variables.
  • packages/core/src/DropdownMenu/DropdownMenuCheckboxItem.tsx — clear — row corners move to the shared style.
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx — clear — row corners move to the shared style.
  • packages/core/src/DropdownMenu/DropdownMenuRadioItem.tsx — clear — row corners move to the shared style.
  • packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx — clear — the trigger row now uses the shared style, and the flyout and region surfaces reset; measured at this head.
  • packages/core/src/DropdownMenu/menuRowCorners.stylex.ts — clear — one resolver for the four row kinds, with the right-to-left mapping; its separation from the container publication is explained and matches the current record.
  • packages/core/src/Layout/__tests__/ContainerCorners.a11y.chromium.spec.ts — clear — seven cases whose expectations this review reproduced with its own probes.
  • packages/core/src/Layout/containerCorners.stylex.ts — clear — the one place the corner is resolved for Card and Dialog; no reader of the old block-edge variables remains anywhere.
  • packages/core/src/theme/derivedVarRegistry.test.ts — clear — counts the corner variables as documented from the shared list.
  • packages/core/src/theme/derivedVarRegistry.ts — clear — the flag, the corner lists and the shared helper.
  • packages/core/src/theme/generateThemeRules.test.ts — clear — five corner cases plus the parser's cases.
  • packages/core/src/theme/generateThemeRules.ts — clear apart from the longhand-ordering note above; the corner map runs for the resting rule, pseudo-class blocks and colour-mode blocks.

Automated review (maintainer link)

'--_card-radius': radiusVars['--radius-container'],
// Theme corner variables inherit. Reset them, so a nested surface that the
// theme does not style hands out its own radius.
'--_card-radius-top-left': 'initial',

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.

Non-blocking: this eight-line reset is repeated in five files (Dialog.tsx:228 and :346, DropdownMenu.tsx:188, DropdownMenuSubMenu.tsx:212 and :326, ContextMenu.tsx:161 and :217, BreadcrumbItem.tsx:273). It follows the existing pattern of repeating --_dropdown-menu-radius and the padding at those same sites, so nothing is wrong here; the cost is that a surface added later and missing the block will hand a nested default surface its ancestor's corners. One exported style object per family of surfaces would make that impossible to forget.

josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12921 fix(Table): useTableSortableState sorts an Invalid Date like null instead of throwing
  Author: @josephfarina
- #12911 perf(cli): read a project's lockfile only for an Astryx package it has not installed
  Author: @josephfarina
- #12388 fix(core): a theme radius of different corners reaches what a Card, a Dialog and a menu hand each corner to
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12945.

@github-actions
github-actions Bot deleted the josephfarina/theme-corners-reach-children branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — 41bff502 Deployed Nov 19, 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