Skip to content

spec: an open layer may render up to 5 more elements under touch, with no new anatomy (AST-017 DEC-29) - #8439

Merged
cixzhang merged 5 commits into
mainfrom
spec/layer-dom-allowance
Oct 25, 2026
Merged

cixzhang merged 5 commits into
mainfrom
spec/layer-dom-allowance

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

May an open layer render a few more elements under touch than under a fine pointer, when each extra element has a named job?

Existing authority searched

  • spec:AST-017 FR60 and DEC-26 (current): minimal DOM; budgets and the exception path live in architecture:component-style-authoring INV7.
  • INV7 (current): an open layer under a coarse pointer has at most as many elements as under a fine pointer; any excess is an owner exception per component.
  • component:BottomSheet (current): FR1 anatomy (panel, content area, handle, scrim); no element budget.
  • Search terms: INV7, element count, layer, sheet frame, exception.

Decision

  • spec:AST-017 FR60 and DEC-29 (Cindy, 2026-10-25): under touch, an open layer (a surface mounted only while open: sheet, popover, menu, context menu, dialog, toast, lightbox) may render up to 5 more elements, and fewer is preferred. Added elements are internal nodes with named jobs; the allowance adds no anatomy part or theme target; decoration SHOULD use pseudo-elements or existing elements. Closed layers and triggers stay at the fine-pointer count; repeated components keep the strict budget, at rest and pressed. Anything beyond needs an owner exception with counts.
  • INV7 cites FR60 and DEC-29 for the allowance (the number, layer set, and scope live only in FR60).
  • component:BottomSheet names its frame's element jobs; fewer is preferred, and the pill, edge tint (decoration for pseudo-elements), and positioner (merge into the panel) are open gaps.

Bounding data (current measurements)

Layer Fine pointer Touch, open Extra
Popover sheet presentation, both dismissals off (#8229) 178 181 +3
Popover sheet presentation, either dismissal on 178 177 −1
ContextMenu open (#8228) — — +5
Menu sheets after #8392 — — about +4

5 covers every current case with no headroom beyond the largest.

Relation to other work

Rejected alternatives

  • Strict parity for layers, with an owner exception for every sheet frame.

Claim scope and non-goals

The element budget for open layers under touch, and BottomSheet's element jobs. Surface components' budget, content-once, and one-presentation rules are unchanged.

Writing rubric results

  • R1 narration: none.
  • R2 research in the record: none; the bounding data stays in this description.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none; one line inside DEC-29.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none; the record has no open questions.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge (CI lint)
  • Prettier
  • git diff --check

…touch (AST-017 FR60, DEC-29; INV7); BottomSheet names its frame's jobs
@vercel

vercel Bot commented Oct 25, 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 Oct 25, 2026 8:13pm UTC

Request Review

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

astracat-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 25, 2026, 8:45 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/BottomSheet 25.9KB 25.9KB 0B 7.5KB 7.5KB 0B
core/BottomSheetSwitcher 9.1KB 9.1KB 0B 3.2KB 3.2KB 0B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 33.8KB 33.8KB 0B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

48 of 502 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 556,900
RichTextEditor Markdown parity: side by side probe light 538,816
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 28 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@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 one owner decision: whether an open layer may render up to 5 more elements under touch than under a fine pointer (spec:AST-017 FR60 clause and DEC-29), which relaxes the strict parity architecture:component-style-authoring INV7 sets today. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner. Whichever way it goes, three fixes are needed:

  • Move the element counts in BottomSheet.spec.md (lines 129–133) out of the record, because they measure a Popover story that is not on main and records keep measurements out (knowledge-contracts INV10).
  • Name one set of layers and one parity scope in FR60 and INV7, since FR60 adds toast and parity for every touch presentation while INV7 still lists six layers.
  • Correct two job entries: a sheet without a scrim opens its dialog non-modally, outside the top layer, and the edge tint is decoration like the pill, so it needs the same gap note or a reason a pseudo-element cannot carry it.

[Automated review]

Comment on lines +129 to +133
- A presentation that shows a component's content in this sheet renders 3
more elements open than its anchored layer: 181 against 178 on Popover's
Adaptive Presentation story with both dismissals off, coarse pointer at 390
px against mouse at 1280 px, and 177 against 178 with either dismissal on.
Elements beyond this frame are the presenting component's own to justify.

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.

These counts measure a Popover story that is not on main yet (Popover has no presentation prop at this head), and the component template keeps measurements out of this subsection: "Current measurements belong in the audit record; this subsection owns only durable constraints and their verification target." Could this bullet keep one durable sentence (the frame's elements beyond an anchored layer, and that anything beyond the frame is the presenting component's own to justify) and leave the numbers in the description's bounding-data table? The description's R2 result would then hold.

- Element jobs (`architecture:component-style-authoring` INV7; proposed
allowance in `spec:AST-017` FR60, DEC-29). An open sheet's frame has 8
elements, where an anchored layer has 5:
- the dialog carries modality and the top layer;

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.

Without a scrim the sheet opens with dialog.show(), so the dialog is neither modal nor in the top layer in that presentation. Suggest: the dialog is the native dialog every sheet renders, modal and in the top layer when scrim-backed.

- the grabber bar is the drag handle, and its pill draws the handle;
- the body is the scroll area;
- the content box carries the padding and is the observed content box (FR3);
- the edge tint gives iOS Safari's toolbar tint the sheet's color.

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.

BottomSheetEdgeTint.tsx describes this element as "an internal decorative element", with aria-hidden and no role, which is the reasoning line 134 applies to the pill. Either give it the same gap note, or say why a pseudo-element cannot carry it (the file header explains that WebKit samples the declared background of the fixed element it hit tests).

Comment thread docs/specs/AST-017/spec.md Outdated
Comment on lines +765 to +770
**Proposed; pending owner decision (DEC-29, OQ1):** a component's touch
presentation renders no more elements than its fine-pointer presentation,
except that a layer, a surface mounted only while open (a sheet, popover,
menu, context menu, dialog, toast, or lightbox), may render up to 5 more
elements while open when each added element has a named job in the
component's record. While closed, a layer and its trigger render no more

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.

This list includes toast, and the first sentence sets parity for every component's touch presentation, while the INV7 text this pull request amends still names six layers (Popover, BottomSheet, DropdownMenu, ContextMenu, Lightbox, Dialog) and has no parity rule outside its two budgets. Could both records name the same set and scope, with the number 5 owned by one of them?

Comment on lines +149 to +151
pointer has at most as many elements as under a fine pointer (proposed:
up to 5 more while open, each with a named job in the component's record;
`spec:AST-017` FR60, DEC-29).

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.

If DEC-29 is adopted, INV7's verification row still fails "more elements under a coarse pointer than a fine one", and deciding_specs names only DEC-26 for INV7, so adoption needs both amended alongside this sentence.

…et as FR60; dialog and edge-tint jobs corrected

@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 one owner decision: whether an open layer may render up to 5 more elements under touch than under a fine pointer (spec:AST-017 FR60 clause and DEC-29), which relaxes the strict parity architecture:component-style-authoring INV7 sets today. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner. The earlier points on the counts, the dialog and edge-tint jobs, and the shared layer set are addressed; before an approval adopts the clause, two fixes are still needed:

  • Give the clause failure signals in FR60's and INV7's verification rows (INV7's row still fails any coarse-pointer excess), add DEC-29 to INV7's deciding_specs, and give BottomSheet's job list a verification target.
  • State the number 5, the layer set and the touch-parity scope in one record and have the other cite it, since FR60 still says its budgets are the two INV7 states while INV7 restates the 5.

[Automated review]

Comment on lines +149 to +152
pointer has at most as many elements as under a fine pointer (proposed in
`spec:AST-017` FR60 and DEC-29: a layer is any surface mounted only while
open, Toast included, and it may render up to 5 more elements under touch
while open, each with a named job in the component's record).

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.

If DEC-29 is adopted with this head, INV7's verification row (line 295) still fails "more elements under a coarse pointer than a fine one", FR60's row in docs/specs/AST-017/spec.md (line 927) checks none of the clause's failures (more than 5 extra, an added element with no named job, a closed layer or trigger above the fine-pointer count), and deciding_specs (line 20) names only DEC-26. Could the rows carry the clause's failure signals, with DEC-29 added here? This parenthetical also restates the 5 and the layer set that FR60 states; citing FR60 without the number would leave one owner.

Comment on lines +119 to +121
- Element jobs (`architecture:component-style-authoring` INV7; proposed
allowance in `spec:AST-017` FR60, DEC-29). An open sheet's frame has 8
elements:

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.

The 8 elements and their jobs match the shipped sheet. The component template has Performance and resources own "durable constraints and their verification target", and the verification map below has no row for this list, so nothing checks that the shipped frame still matches it. Could it get one, such as an element-count assertion on the open sheet?

…s; DEC-29 in INV7 deciding_specs; BottomSheet job list verified
…ents while open, no new anatomy, decoration on pseudo-elements, fewer preferred
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2335aef

@cixzhang cixzhang changed the title spec: proposed: an open layer may render up to 5 more elements under touch, with named jobs spec: an open layer may render up to 5 more elements under touch, with no new anatomy (AST-017 DEC-29) Oct 25, 2026
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 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.

Recommended for approval: an engineering owner approved this exact head, and the open-layer allowance in FR60 and DEC-29, INV7's citation of it, and BottomSheet's element-job list agree with each other and with the shipped sheet. No changes are needed; as follow-up work, BottomSheet's Element jobs verification row still needs its element-count test, and moving the edge tint to a pseudo-element needs an iOS Safari check first, because the edge tint's own source says Safari reads the declared background of the nearest fixed or sticky element.

[Automated review]

@cixzhang
cixzhang merged commit 67dc45f into main Oct 25, 2026
72 checks passed
cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
No conflicts. Brings in BottomSheet's element-jobs list (meta#8439) and the
interaction harness fix.
@github-actions
github-actions Bot deleted the spec/layer-dom-allowance branch October 26, 2026 06:31

This branch was successfully deployed

1 active deployment
Preview — 2335aefa Deployed Oct 25, 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