Skip to content

feat(Layout): LayoutContent names its container, so a theme styles a dialog's body apart from its header and footer - #12751

Closed
josephfarina wants to merge 1 commit into
mainfrom
core-layout-content-container
Closed

josephfarina wants to merge 1 commit into
mainfrom
core-layout-content-container

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary: feat(Layout): LayoutContent names the container it sits in (data-container), as LayoutHeader and LayoutFooter already do, so a theme styles a dialog's body apart from its header and its footer bar.

The theme miss

A classic-Facebook-style dialog (and a Windows 98 one) is a full-bleed title bar, a padded body and a gray button bar. With a Dialog composed as documented (a Layout with a DialogHeader, a LayoutContent and a LayoutFooter), a theme could style the footer of a dialog alone (layout-footer with container:dialog) but not its body: layout-content named no container, so padding it padded every content region on the page and in cards, and removing the dialog's own padding for a full-bleed title bar left the body text against the frame.

The general rule

LayoutHeader, LayoutContent and LayoutFooter name the container they sit in; LayoutPanel does not. LayoutContent reflects data-container (dialog, card or bottom-sheet, from the same layer-scoped context the header and footer read; none outside one), and layout-content declares the container visual prop. It is an attribute only: no prop, default or style changes. The Dialog's own LayoutContent takes it, an AlertDialog's body included.

Records

  • component:LayoutContent (owner cixzhang): FR6 and DEC-1 mirror LayoutHeader's and LayoutFooter's FR6 and DEC-1; the compatibility class is additive; the verification map gains the FR6 row; verified_by lists componentPartTargets.test.tsx.
  • component:Layout: DEC-2, the Owns bullet, the Builder impact row and the compatibility line name the content region beside the header and footer.
  • component:Card FR7, component:Dialog FR11 and component:BottomSheet FR26 name LayoutContent beside LayoutHeader and LayoutFooter.

Writing rubric results

R1 narration: none; FR6, DEC-1 and the Layout DEC-2 text state what the regions do.
R2 research: none.
R3 evidence: the FR6 row cites the describe block and its two tests by name, and current source.
R4 rejected alternatives: none recorded.
R5 change references: none.
R6 open questions: none.
R7 project status: none.

Test plan

  • componentPartTargets.test.tsx: the content region reflects card, dialog and none, beside the header and footer; a theme rule on layout-content with container:dialog compiles to .astryx-layout-content[data-container="dialog"] and never touches a card's.
  • Local, CI=1: Core builds; the ui tests for theme/componentPartTargets, Layout/ and Dialog/ pass; check:knowledge, check:changesets, Prettier and ESLint pass.

preflight: CI 18/18 pass and astracat's review finds no blocking issue at b767963 (its one hold is the owner spec approval below)

@vercel

vercel Bot commented Nov 19, 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:37am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 3:39 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b767963

⏳ Building… Until it's ready, Storybook · Sandbox open the branch's previous preview.

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.

Approval waits on an engineering owner deciding the new LayoutContent spec claims, and four fixes are needed either way.

The pull request adds FR6 and DEC-1 to the LayoutContent record, and no current record decides yet that LayoutContent reflects its container: an engineering owner records that decision by commenting /approve-spec followed by the full head commit SHA, and the author may do so as an engineering owner.

  • The release note .changeset/core-layout-content-container.md has no category tag, so pnpm check:changesets fails; start its body with [feat].
  • The Layout record's DEC-2 (with its ownership, builder-impact and compatibility lines), Card FR7, Dialog FR11, BottomSheet FR26 and the LayoutContainerContext.ts header still say only the header and footer reflect the container, so name LayoutContent there too.
  • The description says check:changesets passes and that every Layout region names its container, but the check fails and LayoutPanel reflects no container, so correct both statements.
  • The description has no ## Writing rubric results section, which a pull request that changes a record must include, so add the R1–R7 results.

The inline comments add three non-blocking suggestions: a comment that restates the code, the no-op reformat of Layout.doc.mjs, and a test that also passes on main.

Claims and files checked

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

  • Claim: LayoutContent reflects the card, dialog or bottom-sheet it sits in, and nothing outside one — verified: the new reflection test fails on main and passes here; the bottom sheet comes from the same provider, with no test.
  • Claim: before this change a theme could target a dialog's footer but not its body — verified on main: the content region carried no container.
  • Claim: the change is an attribute only, with no prop, default or style change — verified: no stylesheet or shipped theme selects the attribute, and the API delta has only the two theming rows.
  • Claim: the layout-content target declares the container state — verified in the Layout doc's target list; the theming-target guard passes.
  • Claim: every Layout region names the container it sits in — false: LayoutPanel reflects none.
  • Claim: the LayoutContent record's new requirement and decision mirror the header's and footer's, the compatibility class becomes additive, and the verification map and verified-by list gain the new test — verified.
  • Claim: a dialog-only theme rule compiles to a dialog-scoped selector and never touches a card's — verified, though the same test passes on main.
  • Claim: Core builds and the theme, Layout and Dialog tests pass (326) — verified.
  • Claim: the knowledge check, Prettier and ESLint pass — verified.
  • Claim: the changesets check passes — false: it fails on the missing tag.
  • Release note: LayoutContent names its container as the header and footer do, so a theme can style a dialog's body apart — verified; patch bump — matches the release policy for compatible work; category tag — missing.
  • File .changeset/core-layout-content-container.md: finding (no category tag).
  • File docs/specs/components/Layout/LayoutContent.spec.md: on hold for owner approval; one non-blocking wording note.
  • File packages/core/src/Layout/Layout.doc.mjs: clear (one semantic change; non-blocking reformat note).
  • File packages/core/src/Layout/LayoutContent.tsx: clear behavior; non-blocking comment note; stale header noted with the record finding.
  • File packages/core/src/theme/componentPartTargets.test.tsx: clear; non-blocking test note.

Automated review (maintainer link)

Comment thread packages/core/src/Layout/Layout.doc.mjs Resolved
…e styles a dialog's body apart from its header and footer
@josephfarina
josephfarina force-pushed the core-layout-content-container branch from 461259c to b767963 Compare November 19, 2026 03:22
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b767963

@josephfarina
josephfarina marked this pull request as ready for review November 19, 2026 03:23
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026

@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 has not completed on this head yet.

An engineering owner approved the new LayoutContent requirement and decision, and the matching Layout, Card, Dialog and BottomSheet record updates, for this exact head. The fixes from the previous review are all in, and no blocking finding remains. The required CI checks still have to pass on this head before it can merge.

Claims and files checked

Review mode: full; reason: history

  • Claim: before this change a theme could target a dialog's footer but not its body — verified: on main the content region reflects no container, and the new reflection test fails there.
  • Claim: the header, content region and footer name their container, and the side panel does not — verified in source.
  • Claim: the content region reflects card, dialog or bottom sheet from the same layer-scoped context, and nothing outside one — verified by the reflection test for card, dialog and none; the bottom sheet in source, through the same provider the header and footer use.
  • Claim: the content theme target declares the container state — verified in the Layout doc's target list; the theming-target test passes.
  • Claim: it is an attribute only, with no prop, default or style change — verified: no stylesheet or published theme selects it, and the API delta has only the two theming rows.
  • Claim: a dialog's content region takes it, an alert dialog's body included — verified in source: the alert dialog renders its body inside the dialog's container.
  • Claim: the LayoutContent record gains a requirement and a decision that mirror the header's and footer's, becomes additive, and gains the verification row and the verified-by entry — verified.
  • Claim: the Layout record's decision, ownership, builder-impact and compatibility lines, and the Card, Dialog and BottomSheet requirements, name the content region — verified.
  • Claim: the description carries the writing-rubric results — verified.
  • Claim: a dialog-only content rule compiles to a dialog-scoped selector and never reaches a card's — verified; that test also passes on main, so the reflection test is the regression guard.
  • Claim: Core builds and the theme, Layout and Dialog tests pass — verified: Core and the themes build, and 892 tests across the theme, Layout, Dialog, AlertDialog and Card suites pass.
  • Claim: the knowledge, changeset, Prettier and ESLint checks pass — verified, Prettier on the TypeScript and Markdown files CI formats.
  • Claim: the local preflight passes on this head — not checkable here, as it is a local run; on GitHub, Lint and the CLI smoke test pass and the main CI run has not completed.
  • Release note: the content region names its container like the header and footer, so a theme can style a dialog's body apart — verified; feature tag with a patch bump — matches the compatible-work rule, and the changeset check passes.
  • File .changeset/core-layout-content-container.md: clear.
  • File docs/specs/components/BottomSheet/BottomSheet.spec.md: clear.
  • File docs/specs/components/Card/Card.spec.md: clear.
  • File docs/specs/components/Dialog/Dialog.spec.md: clear.
  • File docs/specs/components/Layout/Layout.spec.md: clear.
  • File docs/specs/components/Layout/LayoutContent.spec.md: clear.
  • File packages/core/src/Layout/Layout.doc.mjs: clear.
  • File packages/core/src/Layout/LayoutContainerContext.ts: clear.
  • File packages/core/src/Layout/LayoutContent.tsx: clear.
  • File packages/core/src/theme/componentPartTargets.test.tsx: clear.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12635 fix(cli): export loads and gives back a page whose modules import TypeScript files by .js names
  Author: @josephfarina
- #12727 fix(cli): export loads a served package's subpath exported only to imports
  Author: @josephfarina
- #12224 fix(cli): a {@link} in a template description resolves as astryx docs resolves it
  Author: @josephfarina
- #12278 fix(core): a Theme given a value that is not a theme keeps the page running
  Author: @josephfarina
- #12751 feat(Layout): LayoutContent names its container, so a theme styles a dialog's body apart from its header and footer
  Author: @josephfarina
- #12168 fix(templates): header, footer and toolbar rows wrap for longer translated labels
  Author: @josephfarina
- #12399 [experimental] export: the dropped-text warning checks Core's docs, and text not drawn yet inside Core components that take children no longer warns
  Author: @josephfarina
- #12541 [docs] Core: list the props ComplexSelector, Selector, Toast and ContextMenuItem take
  Author: @josephfarina
- #12676 docs(cli): a short form keeps its own 640 column inside a wide template frame
  Author: @josephfarina
- #12458 fix(core): Field labels use the primary text colour
  Author: @josephfarina
- #12373 [experimental] export: a link to a place in the page stays in the file in a srcdoc viewer frame
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12827.

@github-actions
github-actions Bot deleted the core-layout-content-container branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — b7679637 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant