Skip to content

experimental theme pictures: sheet cells are never narrower than what they hold, and a panel over the page is drawn at its cell's full width - #13057

Merged
josephfarina merged 2 commits into
feature/theme-editorfrom
theme-sheet-cells-fit
Nov 21, 2026
Merged

josephfarina merged 2 commits into
feature/theme-editorfrom
theme-sheet-cells-fit

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Agents and people judge a theme from the sheets that astryx experimental theme editor show --png draws. On those sheets a cell was only as wide as its share of the row, so a wide part was cut at the cell's edge and looked broken: a date input's calendar, a date range's two months, an overlay's media, a list that folds items into a menu. On the overlays page a date input's calendar also ran past the sheet's right edge. Now a cell is never narrower than what it holds. A panel over the page (a bottom sheet, a lightbox, an open mobile nav) is drawn at its cell's full width, never past the sheet's edge. The overlays page still crops a panel to its top, at 260px.

Problem and solution fit

  • Why were parts cut? The sheet was a three-column grid (minmax(0,1fr)), and an overlay drawn in place had max-width:100%, so anything wider than a column was clipped.
  • Why does it matter? A picture that cuts a part shows a defect the theme does not have, and the reader then "fixes" the wrong thing.
  • The fix:
    • Cells wrap in a flex row with min-width:min-content, so a cell grows to what it holds, and an overlay drawn open keeps its own width.
    • A panel over the page sizes itself from the window, so a cell that holds one (:has(dialog)) takes its share of the row and draws the panel at the cell's width.
    • On the overlays page such a panel is at least as wide as a column of five, and a part that needs a row's width (a table) keeps its row.

Expected behavior and authority

This follows the sheet's own rule, written in the SHEET_CSS comments: a cell is as large as what it holds, so every variant is drawn whole.

Smallest restoration

Only the sheet's CSS changes (_catalog.mjs), plus three tests whose expected CSS moves with it. No component, theme, command or public API changes. Two related changes are separate PRs: the pages section's pictures, and removing cut pictures on a change.

Evidence

The neutral theme, every sheet-*.html page at 1280px in Chromium, measured cell by cell against main:

item main this PR
sheet-overlays: anything past the page's right edge DateInput's calendar, to 1286px nothing
DateInput, DateRangeInput, DateTimeInput (overlays) calendar grids past their cells inside their cells; DateTimeInput keeps both fields
Carousel, Overlay, TopNavMenu (overlays) content past their cells inside
OverflowList (data) 5 texts cut with an ellipsis none
BottomSheet, Lightbox, open MobileNav panels about 217px wide wider, with close buttons inside
Table (overlays) full row full row
the other eight sheet pages nothing past an edge nothing past an edge, and no cell cuts more
  • A lone or last cell in a row now stretches to the row's width (Card's last variants, for example), as flex rows do. Nothing it holds is cut.
  • Regression test: theme-sheet-cells-fit.test.mjs pins the cell rules, the panel rule, the panel width on the overlays page and the table row. These are CSS rules; the widths above come from the render.

Scope

Components: experimental theme editor pictures (CLI)

  • 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.
  • Public text and artifacts contain no internal Meta context.

Testing

  • CI=1 vitest run --project node packages/cli/api/theme-edit: 5860 passed, 4 skipped. That run was on this change together with the two split-out PRs.
  • A real Chromium render of every sheet-*.html (neutral, 1280px, light), measured against main as in the table above.

replay: worse 0 at 8706079

preflight: pass 8706079

@vercel

vercel Bot commented Nov 20, 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 21, 2026 6:50am UTC

Request Review

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

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

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

Not ready yet: the branch needs a rebase, and approval also waits on an engineering owner's decision.

Blocking

  • The branch is built on theme-r15-p20-25's superseded commits, so GitHub shows 299 files instead of this change's 9 and six files conflict with the base; rebase only the two picture commits onto the base tip (git rebase --onto theme-r15-p20-25 HEAD~2 on this branch), which applies cleanly.

No current record governs how astryx experimental theme editor show --png lays out its sheets or cuts and removes its pictures (AST-017 FR22 covers only the [experimental] patch Changeset, which this meets), so an engineering owner, the author included, records that decision by commenting /approve-spec <full head SHA> on the rebased head. On a neutral theme the head cuts none of the four cells the base cuts; one side effect to weigh is that cells now grow to fill their row, so Card's last two variants draw about 610px wide beside 238px.

Claims and files checked

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

  • Cells are never narrower than what they hold: verified on a neutral theme; the base cuts the date-input and date-time calendars, the top-nav menu and an overflow list, the head none.
  • A panel over the page is drawn whole inside the sheet: verified; every picture stays 1280px wide.
  • Calendar, toolbar, popover and folding list drawn whole: verified.
  • The pages section draws the sample app whole: verified (the app-shell cap no longer applies there).
  • A tall pages picture is cut between pages and named: the code path is verified; the sample pages picture is under the cut height, so it was not exercised.
  • A change removes pictures cut from a tall one: verified by the new test.
  • "Sheet CSS only, no component, theme or public API changes": true of the two picture commits, false of the 299-file diff GitHub shows.
  • The description's width table: matches except the bottom sheet panel, about 304px here rather than 272px.
  • Files: the 9 files of the two picture commits each checked (one non-blocking width note on _catalog.mjs); the other 290 files repeat the base branch's commits and leave with the rebase.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the theme-r15-p20-25 branch 18 times, most recently from 7ec0cf1 to 4f3794d Compare November 20, 2026 16:10
@josephfarina
josephfarina deleted the branch theme-r15-p20-25 November 20, 2026 22:26
@josephfarina josephfarina reopened this Nov 20, 2026
… they hold, and a panel over the page is drawn whole

The sheet was a three-column grid, and an overlay drawn in place was no
wider than its column, so a wide part (a date input's calendar, a date
range's two months, a popover with a form) was cut at its cell's edge, or
ran past the sheet's edge on the overlays page. Cells now wrap in a row
and are never narrower than what they hold, and an overlay drawn open
keeps its own width.

A panel over the page (a bottom sheet, a lightbox, an open mobile nav)
sizes itself from the window, so a cell that holds one takes its share of
the row and draws the panel whole at the cell's width, never past the
sheet's edge. On the overlays page such a panel is at least as wide as a
column of five, and a part that needs a row's width keeps its row.
@josephfarina
josephfarina changed the base branch from theme-r15-p20-25 to main November 21, 2026 05:43

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

Not ready yet: approval waits on an engineering owner's decision about the sheet layout, and one release-note sentence needs fixing.

Blocking

  • Miss: the changeset says a stepper and a toolbar were cut and now show whole, but on the neutral theme the base already draws both whole (the Stepper cell is identical before and after), so drop them from the sentence or name the theme that cuts them.

No current record governs how astryx experimental theme editor show sizes its sheet cells (AST-017 FR22 only asks for the [experimental] patch Changeset, which this meets). Approval needs an engineering owner (the author qualifies) to accept this layout without a record by commenting /approve-spec <full head SHA> on the pull request, or to have the cell-sizing rule written into the CLI's surface record first. On the neutral theme the head cuts none of the seven parts the base cuts; one side effect to weigh is that a lone or last cell now stretches to the full row, so Card's last two variants draw about 610px wide beside 238px.

Claims and files checked

Review mode: full; reason: rebase

  • Cells are never narrower than what they hold: verified; no cell is cut on any of the nine section pages at the head.
  • Date, date-range and date-time calendars, the top-nav menu, Carousel, Overlay's media and the folding list show whole: verified; the base cuts each of them.
  • A stepper and a toolbar were cut and now show whole: false; the base already draws both whole.
  • A panel over the page is drawn whole at its cell's width, never past the sheet's edge: verified; panels grow from 217px to 267-304px.
  • The description's width table: verified, except that "no cell is worse" holds only for cutting, since lone cells now stretch.
  • Only the sheet's CSS and its tests change, with no component, theme, command or public API change: verified.
  • The new regression test pins the cell rules, the panel rule, the overlays panel width and the table row: verified (it matches CSS strings).
  • The 5,860-test run on the combined change: not reproduced here; the four touched test files pass.
  • .changeset/experimental-theme-sheet-cells-fit.md: the stepper and toolbar finding above.
  • packages/cli/api/theme-edit/_catalog.mjs: works as described; non-blocking notes on stretched cells and the stale "five to a row" comment.
  • packages/cli/api/theme-edit/theme-pictures-agents-open-overlays.test.mjs: clear; its "five to a row" test name no longer matches the panel rows.
  • packages/cli/api/theme-edit/theme-sheet-cells-fit.test.mjs, theme-sheet-cells.test.mjs, theme-states-picture.test.mjs: clear.
  • scripts/vitest-node-durations.json: clear.

Automated review (maintainer link)

…the sheet cells change

A stepper and a toolbar were already drawn whole; the note and the
sheet's comment name the parts that were cut (a date input's calendar, a
date range's two months). The overlays page holds about five small
overlays to a row, and about four panels, which it still crops to their
top.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 8706079

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8706079

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: one sentence of the description needs correcting. The sheet layout itself is accepted by an engineering owner at this head, and the release note now names only parts that main cuts.

  • The description's User impact says "a popover with a form" was cut at the cell's edge, but on the neutral theme at 1280px main already draws the overlays page's Popover form whole, since its popover is held to the cell by design; drop it from that sentence or name a part main does cut there, such as the top-nav menu, Carousel's slides or Overlay's media.

Two small comment fixes are suggested inline, and a cell alone or last on its row now stretches to the full row, which draws variants such as Card's at uneven widths.

Claims and files checked

Review mode: incremental; reason: none

  • Claim (changeset): no sheet cell is narrower than what it holds, except a cell that holds a panel over the page, by design: verified (_catalog.mjs:733, :749, :804; nothing runs past any cell on the nine neutral sheets).
  • Claim (changeset): a date input's calendar, a date range's two months, an overlay's media and a popover drawn open now show whole instead of cut: verified (on main the three calendars, Overlay's media and the top-nav menu's popover run past their cells; none does at this head).
  • Claim (changeset): a list that folds items into a menu shows its items whole: verified (OverflowList's five ellipsized labels on main, none at this head).
  • Claim (changeset): a panel over the page is drawn at its cell's full width, never past the sheet's edge, and the overlays page still crops it to its top: verified (panels grow from 217px to 267-304px; every page stays 1280px wide; _catalog.mjs:788 unchanged).
  • Claim (changeset): an experimental patch release note: verified (patch bump, [experimental] tag).
  • Claim (description): cells were only a share of a three- or five-column row and an overlay drawn open was held to the cell: verified (the removed grid and max-width:100% rules).
  • Claim (description): a date input's calendar and a date range's two months were cut: verified; a popover with a form was cut: false (drawn whole on main).
  • Claim (description): on the overlays page the date input's calendar ran past the page's right edge on main and nothing does now: verified (its box reaches about 1285px from the fifth column).
  • Claim (description): the fix bullets (wrapping cells with a min-content floor, overlays keep their own width, panel cells take their share, 240px panels and full-row tables on the overlays page): verified (_catalog.mjs:732-733, :773, :785-787, :804).
  • Claim (description): the evidence table rows for the overlays, data and other sheet pages: verified by drawing both trees at 1280px.
  • Claim (description): a lone or last cell now stretches to the row's width and nothing it holds is cut: verified (Card 408px to 1252px).
  • Claim (description): only the sheet's CSS and its tests change, with no component, theme, command or public API change: verified (plus a release note and one test-timing entry).
  • Claim (description): the regression test pins the cell rules, the panel rule, the overlays panel width and the table row: verified (theme-sheet-cells-fit.test.mjs:13-45).
  • Claim (description): the full theme-editor test directory passed: not repeated; the four touched test files pass at this head.
  • File .changeset/experimental-theme-sheet-cells-fit.md: clear.
  • File packages/cli/api/theme-edit/_catalog.mjs: non-blocking comment wording at :779-781.
  • File packages/cli/api/theme-edit/theme-pictures-agents-open-overlays.test.mjs: clear.
  • File packages/cli/api/theme-edit/theme-sheet-cells-fit.test.mjs: non-blocking stale header at :4-5.
  • File packages/cli/api/theme-edit/theme-sheet-cells.test.mjs: clear.
  • File packages/cli/api/theme-edit/theme-states-picture.test.mjs: clear.
  • File scripts/vitest-node-durations.json: clear.

Automated review (maintainer link)

Comment on lines +4 to +5
* @file The sheet's cells are never narrower than what they hold (a
* calendar, a stepper, a toolbar, an overlay drawn open), so nothing is cut

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 header still names a stepper and a toolbar, which the corrected release note dropped because main already draws both whole. Suggest "(a date input's calendar, a date range's two months, an overlay drawn open)".

Comment on lines +780 to +781
// overlays first, about five to a row (a panel over the page, wider,
// about four), a panel cropped to its top at 260px.

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: on the neutral overlays page the panel rows come out as 2, 1, 2 and 4 cells (CommandPalette alone on its row), so "about four" holds only for the last one. Suggest saying a panel takes at least a 240px share and a row holds as many as fit.

@josephfarina josephfarina changed the title experimental theme pictures: sheet cells are never narrower than what they hold, and a panel over the page is drawn whole experimental theme pictures: sheet cells are never narrower than what they hold, and a panel over the page is drawn at its cell's full width Nov 21, 2026
@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 08:30

@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, because its run was cancelled before any job started, so the required checks still need a fresh run here before merge.

The sheet layout for astryx experimental theme editor show is accepted by an engineering owner at this head, and the description now names only parts that main actually cuts.

Non-blocking: a cell alone or last on its row now stretches to the full row, so variants such as Card's draw at uneven widths, and the two earlier inline suggestions (the "about four" comment in _catalog.mjs and the stale test file header) still apply.

Claims and files checked

Review mode: same-head; reason: none

  • Claim (release note): no sheet cell is narrower than what it holds: verified (_catalog.mjs:733, :749; nothing runs past any cell on the nine neutral sheets at 1280px).
  • Claim (release note): a date input's calendar, a date range's two months, an overlay's media and an open popover now show whole instead of cut: verified (on main the three date calendars, the overlay's media and the top-nav menu run 8 to 92px past their cells; none does at this head).
  • Claim (release note): a list that folds items into a menu shows its items whole: verified (OverflowList's five ellipsized labels on main, none at this head).
  • Claim (release note): a panel over the page is drawn at its cell's width, never past the sheet's edge, and the overlays page still crops it to its top: verified (panels grow from 217px to 267-304px; every page stays 1280px wide; _catalog.mjs:788 unchanged).
  • Claim (release note): an experimental patch release note: verified (patch bump, [experimental] tag).
  • Claim (description): a cell was only its share of the row, so a date input's calendar, a date range's two months, an overlay's media and a folding list were cut: verified (same measurements as above).
  • Claim (description): on the overlays page the date input's calendar ran past the sheet's right edge on main, and nothing does now: verified (its box reaches about 1286px on main).
  • Claim (description): a panel over the page is drawn at its cell's full width and the overlays page still crops it at 260px: verified.
  • Claim (description): the three-column grid and the overlay's max-width:100% caused the cuts: verified (the removed rules).
  • Claim (description): the fix bullets (wrapping cells with a min-content floor, overlays keep their own width, panel cells take their share, panels at least a five-column width and full-row tables on the overlays page): verified (_catalog.mjs:732-733, :773, :785, :787, :804).
  • Claim (description): the change follows the sheet's own rule in its comments: verified at the head (_catalog.mjs:728-729, :735); the width half is new here and accepted by the owner.
  • Claim (description): only the sheet's CSS and three tests change, with no component, theme, command or public API change: verified (plus a new test file, a release note and one test-timing entry).
  • Claim (description): the two related changes are separate pull requests: verified (both open).
  • Claim (description): the evidence table rows for the overlays, data and other sheet pages: verified by drawing both trees at 1280px.
  • Claim (description): a lone or last cell now stretches to the row's width and nothing it holds is cut: verified (Card 408px to 1252px).
  • Claim (description): the regression test pins the cell rules, the panel rule, the overlays panel width and the table row: verified (theme-sheet-cells-fit.test.mjs:13-45).
  • Claim (description): the scope checklist (one fix, no tagalongs, nothing hidden, no internal context): verified (no tagalong; no internal context in any added line).
  • Claim (description): the full theme-editor test run and the preflight result: not re-run (the author's run on a tree with the two related changes); the four touched test files pass at this head.
  • File .changeset/experimental-theme-sheet-cells-fit.md: clear.
  • File packages/cli/api/theme-edit/_catalog.mjs: non-blocking comment wording at :779-781.
  • File packages/cli/api/theme-edit/theme-pictures-agents-open-overlays.test.mjs: clear.
  • File packages/cli/api/theme-edit/theme-sheet-cells-fit.test.mjs: non-blocking stale header at :4-5.
  • File packages/cli/api/theme-edit/theme-sheet-cells.test.mjs: clear.
  • File packages/cli/api/theme-edit/theme-states-picture.test.mjs: clear.
  • File scripts/vitest-node-durations.json: clear.

Automated review (maintainer link)

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 17:21
@josephfarina
josephfarina merged commit 9669cb2 into feature/theme-editor Nov 21, 2026
81 of 136 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
… they hold, and a panel over the page is drawn at its cell's full width (#13057)

Reviewed pull request #13057, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #12787 experimental theme: a pressed or hovered part's flat tint is measured as the fill it is
- #13252 experimental theme: a one-color layer is a fill only where it covers the whole box
- #13300 experimental theme: a fill and its on-color set inside a part are measured as that part draws them
- #13321 experimental theme: a part's fill pair is measured though its on-color is set for the whole theme
- #13360 experimental theme: an on-color set on a part holding the readers leaves the fill pair out
- #12768 feat(cli): experimental theme editor show <theme> --on <part> gives what one part of a theme shows
- #13057 experimental theme pictures: sheet cells are never narrower than what they hold, and a panel over the page is drawn at its cell's full width
- #13200 experimental theme pictures: a change removes the pictures cut from a tall one
- #13199 experimental theme pictures: the pages section draws the sample app whole, cut between pages and named
- #13320 fix(cli): corners said before their edge run after it, so the whole answer does both
- #13375 experimental theme how: a clashing fill's text color goes in that fill's choice
- #13411 experimental theme how: a clash with a see-through fill joins its text too; another look's text leaves it joined
- #13420 fix(cli): experimental theme editor - glossy writes no sample gradient
- #13452 test(cli): the said-order test reads a named corner as that corner
- #13262 fix(cli): experimental theme editor - an ask that starts with clear the and names only removable looks takes them away
- #13450 fix(cli): experimental theme editor - a bar's text token is checked in the menus its items open
- #13442 feat(cli): a light neutral also fills the page, surface and card backgrounds in light mode
- #13477 docs(changeset): the clear reading takes looks away for one part
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13470.

@github-actions
github-actions Bot deleted the theme-sheet-cells-fit branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 87060793 Deployed Nov 21, 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