Skip to content

spec(layers): layers follow anchors through CSS only and never inherit a press transform - #11024

Merged
cixzhang merged 4 commits into
mainfrom
specs/anchor-no-js-tracking
Nov 10, 2026
Merged

cixzhang merged 4 commits into
mainfrom
specs/anchor-no-js-tracking

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Records only. Two owner decisions, 2026-11-10 (Cindy), on layer positioning:

  • spec:AST-059 DEC-9 and architecture:layer-runtime INV21: an anchored layer follows its anchor only through CSS anchor positioning, and no script moves a layer to keep it on its anchor. Three uses are outside the rule because none follows an anchor: fixed mode's one-time coordinates, a one-time entrance or exit transform, and the reduced fallback for browsers without anchor positioning (spec:AST-003 FR22).
  • spec:AST-059 DEC-10 and architecture:layer-runtime INV22: a layer never inherits its trigger's press transform. Press feedback scales only the trigger's own visual, and the layer renders outside that subtree and anchors to the trigger's untransformed box.
  • Verification rows for both, plus INV21 and INV22 gaps, since those checks are not built.

Writing rubric results

  • R1: no; each sentence states what the system does.
  • R2: no research in the record.
  • R3: no; no evidence cell names a pull request.
  • R4: one rejected alternative per decision, each stated as a reason.
  • R5: no pull request or issue number.
  • R6: no open question added.

Scope

Records: AST-059, layer-runtime

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 6a4a4f4

@vercel

vercel Bot commented Nov 10, 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 10, 2026 11:47am UTC

Request Review

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

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 10, 2026, 12:14 PM UTC

@cixzhang cixzhang changed the title spec(layers): script never moves a layer to follow its anchor spec(layers): layers follow anchors through CSS only and never inherit a press transform Nov 10, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 158590b

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f05367e

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · f93909d

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 29 rows, core 36 rows; run pnpm api:report.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | 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.

Requesting changes: both rules are owner-approved at this revision, but four record corrections are needed before they land.

  • spec:AST-059 DEC-9 bans any scroll, resize, observer or frame handler that writes a layer's inset from a measured rectangle and says the runtime's kept reads write no coordinates, yet the software-keyboard lift that FR9 and DEC-6 require does exactly that (useLayerKeyboardClearance.ts:263-268), so name it as a fourth exception in DEC-9 and INV21 and exclude it from INV21's source check.
  • architecture:layer-runtime still presents INV22 as shipped (its scope line excepts only INV14, INV15 and INV17, and the gap line names only missing tests), but DropdownMenu anchors its menu to the Button it scales to 0.98 on press (DropdownMenu.tsx:1736, Button.tsx:152-176), so list INV22 as unmet and state that mismatch as its gap.
  • The AGENTS.md bullet "position with CSS anchor positioning only" contradicts fixed mode (INV3) and the exceptions INV21 lists; scope it to anchored layers.
  • The new gap lines sit above the list's lead-in, which now renders inside the INV22 bullet, and the paragraph below assigns them to spec:AST-003, which covers neither invariant; restore the lead-in and say AST-003 does not cover INV21 or INV22.

Smaller points: the two gap lines state build status rather than an observable mismatch, and the two new verification rows leave the failure-signal column empty.

[Automated review]

Comment thread AGENTS.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f93909d

@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 required test and docsite checks are still running on this head.

Both rules are owner-approved at this revision, and the earlier record corrections are in: the keyboard lift is a named exception, INV22 is recorded as unmet with DropdownMenu's mismatch as its gap, the agents line is scoped to anchored layers, and the gap list reads correctly again.

Optional follow-ups:

  • Selector anchors its popover to its own press-scaled ghost and secondary trigger, the same as MultiSelector, so it belongs in the INV22 gap line; the INV22 verification row could also name MultiSelector and ComplexSelector.
  • The description still lists three exceptions and INV21 and INV22 gaps for checks that are not built; it no longer matches the records.
  • Neither record's review-applicability block lists DEC-9, DEC-10, INV21 or INV22, so layering reviews are not routed to the new rules.

[Automated review]

Comment on lines +661 to +664
- DropdownMenu anchors its menu to the Button it scales on press, so a press
while the menu is open moves the menu and narrows it (INV22). Popover with a
caller-supplied anchor, MultiSelector and ComplexSelector anchor to their own
pressed control the same way.

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: Selector has the same mismatch as MultiSelector. Its ghost and secondary trigger scales to 0.98 on press (Selector.tsx:265-321), that trigger is the element its popover anchors to (Selector.tsx:2286-2288), and the list's minimum is anchor-size(width) (Selector.tsx:437). Suggest naming Selector here, and naming MultiSelector and ComplexSelector in the INV22 verification row.

@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 12:03
@cixzhang
cixzhang merged commit 392bcef into main Nov 10, 2026
113 of 117 checks passed
@github-actions
github-actions Bot deleted the specs/anchor-no-js-tracking branch November 11, 2026 06:05

This branch was successfully deployed

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