Skip to content

feat(Lightbox): drag a photo down to close, like Photos - #8215

Merged
cixzhang merged 4 commits into
meta:mainfrom
vjeux:uikit/c24-dismiss
Nov 8, 2026
Merged

cixzhang merged 4 commits into
meta:mainfrom
vjeux:uikit/c24-dismiss

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Batch: B7 Lightbox
Stack: #8215 → #10630

On main 88ba279, after #8197 merged; this head merges main 619ffeb with no conflict, vjeux@6ef4060. This head answers CodeBunny's 07:28Z review, vjeux@5773dc0: the dismissal's busy proof plays four dismissals and judges them with the harness's pooledBusyProof, each run against its own control and the frame floor over the pool. It reads the backdrop's fade at a flat point with trackBrightness, so screenSignal.ts and its test are gone. This pull request carries only its own two commits, restacked from #8197's head with its own diff unchanged (the same patch-id): the drag to close, vjeux@ca38b12, and the dismissal proofs naming the motion each hold judges, vjeux@340106c. In useZoomStage.ts, where #8197's hasOuterPager option meets this pull request's drag to dismiss, the drag-to-close commit keeps both.

This round rebases onto the stack's new heads and follows main's spec:AST-094 FR4 for the drag's two releases:

  • The photo leaves on Photos' measured dismissal springs. That's a gesture-driven exit, which FR4 allows when the component's motion table lists the springs with their platform source; the record's new Motion section lists both.
  • A cancelled drag's return is not an exit, so it now plays the shared springs.settle from the release velocity, with the backdrop and controls on its pace.
  • Timing against what was last felt: the return played Photos' measured critically damped springs (stiffness 877.63 for its position and 955.23 for its size, a response of about 0.21 s). It now plays springs.settle (response 0.5 s, critically damped). The dismissal is unchanged.
  • The release is decided by Core's one release rule, resolveSnapPoint, with the same projection. Two edges follow its rules: a projection of exactly 10 pt while moving down dismisses, and a release above the drag's start moving down springs back, as a release moving back toward the start does.
  • A click or a tap on the gallery counter leaves the viewer open, as on main: the counter takes its own clicks in the click-through control layer.

Why

On a phone, the only ways out of a Lightbox photo are a small Close button or a tap beside it. In Photos, people drag the photo down: it follows the finger, shrinks, the background fades, and letting go closes it, or brings it back if the drag returns.

What changes

  • A fitted photo dragged down follows the finger and shrinks by the travel. The backdrop fades, and the controls fade faster, by Photos' measured curves.
  • The release closes the viewer when the drag's projected end lies more than 10 pt below its start, so a short flick closes. A release moving up, or brought back to the start, springs back.
  • The backdrop's blur comes off while it moves and returns at rest, since a full-screen blur every frame drops frames on low-end phones. Under Reduce Motion the photo fades out.
  • The drag to close is part of the touch presentation, which a coarse primary pointer brings (spec:AST-094 FR13). Where the primary pointer is fine, a mouse's, a pen's or a trackpad's drag leaves the photo in place, as on main.
  • Both releases animate on the compositor, so they keep moving while the page is busy.

Record change

  • FR5's list of springs on a named role names "a cancelled drag's return" where it named "the dismiss". A new sentence: "A drag down that closes the viewer is a gesture-driven exit, so it plays the measured springs the Motion section lists (spec:AST-094 FR4)."
  • FR8's basis adds spec:AST-094 FR4 and FR45.
  • A new Motion section lists the dismissal's two measured springs with their values and platform source. A new verification row checks that every spring the dismissal plays is listed there with its value.
  • The Current-state impact list: FR8 leaves the touch-presentation line. A new line names FR8's implementation gap: the close is reported when the photo has left the screen, about 0.3–0.5 s after the lift, until the shared exit hold lets the viewer stay up after a reported close.

Writing rubric results

Run over docs/specs/components/Lightbox/Lightbox.spec.md:

  • R1 narration: none.
  • R2 research: the Motion section names each measured spring's platform source, which spec:AST-094 FR4 asks of a measured exit spring.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: one, DEC-2's existing line.
  • R5 pull request or issue references: none.
  • R6 open questions: none.

How to check it

In the "Gallery with zoom" story, on a phone:

  1. Drag the photo down slowly: it follows, shrinks, and the background fades.
  2. Let go: the photo carries on down as the viewer closes.
  3. Drag down, back up to the start, and let go: the photo springs back on springs.settle, and the backdrop and controls return with it.
  4. Flick down quickly: the viewer closes.
  5. With Reduce Motion on, drag down and let go: the photo fades out.
  6. Tap or click "1 / 4": the viewer stays open.

Evidence

The pooled busy proof (LightboxDismiss.interaction.browser.spec.ts, "the dismissal keeps changing the screen every frame while the main thread is blocked"), the five conditions:

  1. Per-run control check: pooledBusyProof holds each judged run to its own control. A run whose backdrop holds while its control moves fails the pool by name: "run N: moved on X of the Y frames its control moved".
  2. minRunFrames: 2 plus the per-run new-position check: a run whose control moved on fewer than two frames is "too little to judge" and leaves the pool. After the verdict, each judged run must show a new backdrop level on at least one of its own frames, not an excused one (movedWith − belowStep ≥ 1, "run N shows a new backdrop level"), so runs of one frame cannot add up to the floor. A pool of three moving runs and one whose two frames are both excused passes the verdict and fails this check (not for landing): vjeux@9e9635b
  3. minJudgedRuns: 2 of 4: the helper's default, set explicitly. On failure it reports "N of 4 runs judged, under 2".
  4. Floor and bounds unchanged: the 4-judged-frame floor and every other bound stay at the harness's values. Only where the frames come from changes: four dismissals instead of one.
  5. Red-first, including both mutants: in WebKit at CI-like load the single run starves 4 of 8 runs (4 CPUs, two busy threads) and 8 of 8 (2 CPUs), and the pooled proof passes 4 of 4 in each. A dismissal driven from the main thread and a frozen one both fail the pooled proof in both engines (results in Testing).
  • Red-first, the return: on a Storybook build with the measured return springs (20082a4), all four return cases fail against springs.settle. The size is off by 0.0143 of scale against 0.002, and the position by 1.73 px and 3.45 px against 0.25 px. All four pass at this head.
  • Red-first, the record: the new unit case fails on the record without the Motion section ("dismissPositionSpring: expected undefined to be defined") and passes with it.
  • Red-first, the counter: on that build, in a window taller than the photo, a mouse click on "1 / 4" closed the viewer. It stays open at this head.
  • Red-first, the release rule: with the previous dismissCommits, the new unit case fails on the release above the start ("expected true to be false"); it passes through resolveSnapPoint.
  • The cancel's busy proof judges until six cast steps from the end, as the zoom's does on the same spring. Near its end the spring moves about 0.18 of what remains each frame, so within about 5.6 steps a frame moves less than one cast step.

Safari on the iOS 26.2 simulator, recorded with the previous return timing (the dismissal is unchanged):

main this PR
main: nothing happens it shrinks and leaves
main: nothing happens it springs back

Fine pointer, before and after (desktop Chromium, a mouse, "With zoom"; at rest, 120 px into a drag down, and 120 ms after the release): the drag to close is touch only, so a mouse drag leaves the photo in place and the viewer open on both.

main: main

this pull request: this pull request

Testing

At 5773dc0: the dismissal's busy proof, pooled, in WebKit in a 4-CPU container (the CI profile) with two busy threads: the single run before it starves 4 of 8 runs, the pooled proof passes 4 of 4 (16 dismissals). In a 2-CPU container with none, the single run starves 8 of 8 and the pooled proof passes 4 of 4. With six busy threads the single run starves 12 of 12; the pooled proof passes 3 of 6 and fails the other 3 by name (too few runs judged, or a run's window under 100 ms). It passes in Chromium, loaded and idle, and in WebKit idle. Both mutants fail the pooled proof in both engines (not for landing): a dismissal the main thread drives, "moved on 0 of the 13 frames its control moved", vjeux@6f4f1ec; a frozen one, "4 began after the motion had settled", vjeux@4e40921. With minRunFrames: 2 and the per-run check at this head, it passes 2 of 2 in WebKit with two busy threads, 2 of 2 in a 2-CPU container and 1 of 1 in Chromium, and both mutants still fail the pooled proof in both engines; replayed, every recorded run keeps its verdict. The Lightbox unit files pass 146 of 146 and pnpm check:knowledge passes.

At 340106c on main 88ba279: core tsc is clean; the Lightbox, motion, Text and Layer unit files pass 1,739/1,739; pnpm check:knowledge passes. In a 4-CPU container (the CI profile) the Lightbox interaction specs pass 102 in Chromium (4 skips) and 95 in WebKit (9 skips). On a loaded box, WebKit's two busy-main-thread proofs failed once each by name (the frame floor and touch pacing); alone they pass 6 of 6. The Lightbox a11y specs pass 28 of 28 in Chromium.

At b299095 on #8197's 0bb42a8 and main 5c1b7d4: core tsc is clean, where 977e361 alone has the five errors #10438 brings. The Lightbox interaction specs pass 102 in Chromium (4 skips) and 96 in WebKit in a 4-CPU container, the CI profile (9 skips); the WebKit run's one failure, the dismissal's busy proof, passes 10 of 10 alone at this head and at b540d43. The two dismissal specs pass 78 of 78 in WebKit, three times over.

At 029e7ff, the same own diff (patch-id unchanged) sits on #8197's 3ee5207, and it merges with main 1c142dc without conflict. At f5d36c6 on #8197's 22da53d (main bef866e): pnpm install --frozen-lockfile exits 0; core tsc is clean; the Lightbox, hooks, motion and gestures unit files pass 2,918/2,918; pnpm check:knowledge and pnpm check:changesets pass.

Earlier, at 164ec07 on #8197's 0fc7062 (main 1dce318); the browser runs used 86477e5, which differs only by two unit cases that pin the restore to the viewer's opening:

  • pnpm install --frozen-lockfile exits 0; core tsc is clean; strict ESLint on every changed file 0; comment sentence lengths 0 over;
  • pnpm check:knowledge, check:changesets, check:repo, check:i18n-catalog, check:i18n-runtime, check:use-client and check:package-boundaries pass;
  • the Lightbox and motion unit files pass 1,018/1,018 at 86477e5, and the Lightbox unit files 145/145 at this head;
  • on a Storybook build of this head: Chromium Lightbox interaction specs 95 passed (4 WebKit-only skips); WebKit 90 passed (9 Chromium-only skips); Chromium Lightbox a11y specs 28/28; the a11y audit finds 0 new violations.

@vercel

vercel Bot commented Oct 24, 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 8, 2026 10:46am UTC

Request Review

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

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 5773dc0

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Lightbox · Storybook 119.3 kB (+1.5 kB) · 10.5 kB CSS (+71 B) 3,374 (+397) ✓ · ✓ · ✓
lab/CommentThread 331.5 kB (+1.4 kB) · 2.4 kB CSS (0) — — · — · —
lab/Comments 338.4 kB (+1.4 kB) · 2.5 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.00 MB packed (+10.8 kB); no new dependencies.

API changes: none in this pull request

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

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


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.

Approval waits on an engineering owner's decision: drag to dismiss is new Lightbox behavior with no current spec, and it relies on the draft spec:AST-094 this stack adds, whose FR4, FR11 and FR14 also amend current records. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (you may do so yourself as an engineering owner), or says which requirement to change. Independently of that decision, these need fixing before approval:

  • Land the earlier PRs of the stack and rebase, so this PR carries only its own commit rather than 32,471 authored lines.
  • Restore every page the dismissal faded when the viewer reopens, since reopening a gallery at the item next to the dismissed one currently leaves the current page at opacity: 0 (Lightbox.tsx L684–688).
  • Restore the viewer when the caller keeps isOpen true after a drag dismissal, instead of leaving an open, invisible dialog.
  • Give the data-lightbox-chrome layers a zIndex so Close and Previous stay above a gallery's pages while the layers fade.

[Automated review]

Comment thread packages/core/src/Lightbox/Lightbox.tsx Resolved
Comment thread packages/core/src/Lightbox/Lightbox.tsx Resolved
Comment thread packages/core/src/Lightbox/Lightbox.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.

Approval waits on an engineering owner's decision: drag to dismiss is new Lightbox behavior with no current spec, and it relies on the draft spec:AST-094 this stack adds, whose FR4, FR11 and FR14 also amend current records. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or names the requirement to change. Independently of that decision, these need fixing before approval:

  • Land the earlier PRs of the stack and rebase, so this PR carries only its own commit rather than 32,892 authored lines; the rebase also clears pr-a11y, which fails only because a spec it runs exists on main but not on this branch.
  • Restore every page and caption the dismissal faded when the viewer reopens, since reopening a gallery at the item next to the dismissed one leaves the current page at opacity: 0 (Lightbox.tsx L684–688).
  • Restore the viewer when the caller keeps isOpen true after a drag dismissal, instead of leaving an open, invisible dialog.
  • Give the data-lightbox-chrome layers a zIndex, so Close and Previous stay above a gallery's pages while the layers fade and for the half second after.

[Automated review]

@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's decision: drag to dismiss is new Lightbox behavior with no current spec, and it relies on the draft spec:AST-094 this stack adds, whose FR4, FR11 and FR14 also amend current records (and FR4, as written, rules out the theme-retunable touch springs the stack ships). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or names the requirement to change. Independently of that decision, these need fixing before approval:

  • Land the earlier PRs of the stack and rebase, so this PR carries only its own commit rather than 37,202 authored lines.
  • Restore every page and caption the dismissal faded when the viewer reopens, since reopening a gallery at the item next to the dismissed one leaves the current page at opacity: 0 (Lightbox.tsx L681–694).
  • Restore the viewer when the caller keeps isOpen true after a drag dismissal, instead of leaving an open, invisible dialog.
  • Give the data-lightbox-chrome layers a zIndex, so Close and Previous stay above a gallery's pages while the layers fade and for the half second after.
  • Regenerate packages/cli/test/__golden__/no-icon-set/docs-topics.json, whose motion topic skeleton no longer matches the motion docs, so test-node (1/4) passes again.

[Automated review]

@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:

  • Reduced motion. core/src/Lightbox/Lightbox.tsx:669 handles reduced motion locally. Per design:reduced-motion (DR1–DR4), the animator is the one place that resolves it (touch cross-fades in 200 ms or less with no travel, a fine pointer changes at once), and core has no opt-out, so reducedMotion: 'keep' should be removed.
  • Commit or spring back on release. core/src/Lightbox/zoomStage.ts:550 decides on its own whether a release finishes or springs back. A shared release rule is being specified (AST-057 FR5 covers row swipe today); avoid a component-specific threshold model.

This is about where the behavior lives, not about the PR's intent.

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Agreed: one implementation.

@vjeux
vjeux force-pushed the uikit/c24-dismiss branch from 13266ce to e1a3389 Compare October 25, 2026 05:48
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026
@vjeux

vjeux commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Pushed in e1a3389: the dismissal's release and its cancel take the animator's default and pass touchRelease. The release rule stays as it is until the shared interactive-transition driver exists, then moves onto it.

@cixzhang

cixzhang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 164ec07

@vjeux

vjeux commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

#8197 corrects #8148's changeset wording in the same file.

@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 because the pull request is a draft; marking it ready for review starts the run.

#8147

Approve, with no blocking findings.

#8148

Request changes:

  • .changeset/lightbox-every-pointer.md at #8148's own head says a ctrl-wheel or a trackpad pinch now zooms a photo in every Lightbox, while the gestures attach only with hasZoom; move the "with hasZoom" wording that #8197 adds into #8148's own commit.

#8197

Approve, with no blocking findings.

#8215

Approve: the gallery counter, the drag-to-close docs and changeset, the release rule and the restore Effect are fixed, and the record changes have an engineering owner's approval at this head (two optional notes inline).

Whole stack

Pass; since a pull request lands only when it and every pull request below it are approved, #8215 waits on #8148's changeset fix.

[Automated review]

isOpen: 'Whether the lightbox is open.',
onOpenChange: 'Callback when open state changes.',
onOpenChange:
'Callback when open state changes (including a photo dragged down).',

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.

Optional: the full descriptions at lines 72 and 193 now say the drag closes the viewer "on a phone or tablet"; this dense one could say the same, for example 'Callback when open state changes (including, on a phone or tablet, a photo dragged down).'.

});
});

describe('Lightbox recognizers attach for every pointer (spec:AST-094 FR43)', () => {

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.

Optional: this suite's first test proves the drag to dismiss does not attach under a fine pointer, so a name such as 'Lightbox drag to dismiss attaches only in the touch presentation' would match what it checks.

@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 164ec07

@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec f5d36c6

@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: two one-line fixes in #8197 stand between this stack and approval; every record change carries an engineering owner's approval at its own head, and a pull request lands only when it and every pull request below it are approved.

#8197 — request changes

  • .changeset/pager-settle-tempo.md says a released page now follows the theme's tempo "in a Carousel with hasSnap", but hasSnap set to true keeps native scroll snap and only a useSnapPaging() value runs the pager, so write "in a Carousel whose hasSnap is a useSnapPaging() value".

#8215 — approve

No blocking findings in the drag to close; approved pending CI.

Whole stack — fails

  • The tempo changeset above ships with the stack's release notes.
  • spec:AST-094's FR45 verification row still ends "the pager's measured settle, which does not yet follow tempo or character, is a recorded implementation gap" while the rewritten FR4 paragraph says the settle follows tempo, so drop "tempo or" from that row in #8197.

Both pull requests now conflict with main in LightboxFinePointer.a11y.browser.spec.ts, so rebase #8197 and then this one; CI has not run on this head yet, and a maintainer adds the ci:run label so it runs.

[Automated review]

Comment thread .changeset/pager-settle-tempo.md Resolved
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 029e7ff

@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, so a maintainer adds the ci:run label so it runs.

#8197 — approve. Touch gallery paging follows the current Lightbox spec (FR7), and the tempo release note now names a Carousel given hasSnap={useSnapPaging()}. No blocking findings.

#8215 — approve. On a phone or tablet a fitted photo dragged down follows the finger, shrinks, and closes the viewer or springs back, as the current Lightbox spec (FR8) and the touch-presentations spec (FR4, FR36–FR37) describe; a mouse, pen or trackpad keeps today's behaviour, and the spec text this pull request adds is approved for this head. No blocking findings.

Non-blocking:

  • The dense onOpenChange description in Lightbox.doc.mjs could say "on a phone or tablet", as the full descriptions do.
  • The suite at Lightbox.test.tsx:1672 checks that the drag to close attaches only in the touch presentation; its name could say so.

Whole stack — passes: the earlier release-note and FR45 fixes are in, and both pull requests merge cleanly with main. A pull request lands only when it and every pull request below it are approved.

[Automated review]

@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 229e5c0

@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, so a maintainer adds the ci:run label so it runs.

#8197: approve, with no blocking findings. Touch gallery paging and the pager's tempo-paced settle follow the Lightbox and touch-presentation specs, and its spec text is owner-approved for its head.

#8215: approve, with no blocking findings. The touch drag to close follows the Lightbox spec and the shared release rule, its spec text is owner-approved for this head, and a mouse, pen or trackpad where the primary pointer is fine behaves as on main.

Whole stack: passes. A pull request lands only when it and every pull request below it are approved.

[Automated review]

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

Waiting on an engineering owner: #8215's record changes need an approval for this head before the stack can be approved; no code finding blocks either pull request.

#8197: approve, with no blocking findings. Touch gallery paging and the pager's tempo-paced settle follow the Lightbox and touch-presentation specs, and its spec text is owner-approved for its head. Before it lands, rebase it onto main: #10415 now conflicts in LightboxZoom.interaction.browser.spec.ts, and that busy zoom proof should keep #10415's tempo 5 (slowViewer(page, ZOOM_TEMPO)).

#8215: waits on an engineering owner's decision on its Lightbox record changes: the FR5 rewrite with the new Motion section listing the two measured dismissal springs, the Current-state line reporting the close about 0.3–0.5 s after the lift, and the drag's fade of the controls, caption and neighbouring photos with the backdrop's blur off while it moves. The approval given at the previous head does not carry over to this restack. An engineering owner records it by commenting /approve-spec followed by this head's full commit SHA, and the author may do so as an engineering owner. Its code is unchanged since the last review and has no blocking finding.

Whole stack: passes. A pull request lands only when it and every pull request below it are approved. CI has not run on this head; a maintainer adds the ci:run label so it runs.

[Automated review]

@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

/approve-spec b540d43

@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: both pull requests in this stack approve, and CI passes on this head.

#8197: approve, with no blocking findings. Touch gallery paging and the pager's tempo-paced settle follow the Lightbox and touch-presentation specs, its spec text is approved by an engineering owner for its head, and the busy zoom proof now keeps main's tempo 5.

#8215: approve, with no blocking findings. The touch-only drag to close follows the Lightbox spec's release rule, and its record changes (the measured dismissal springs in the new Motion section and the late-close gap line) are now approved by an engineering owner for this head. Two optional wording nits stay open on the dense onOpenChange description and one test suite's name.

Whole stack: passes; it merges cleanly with today's main. A pull request lands only when it and every pull request below it are approved.

[Automated review]

@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

/approve-spec b299095

@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: both pull requests in this stack approve, and CI passes on this head.

#8197: approve, with no blocking findings. Touch gallery paging and the pager's tempo-paced settle follow the Lightbox and touch-presentation specs, its spec text is approved by an engineering owner for its head, and its busy settle proof now treats a run the harness left out as missing.

#8215: approve, with no blocking findings. The touch-only drag to close follows the Lightbox spec's release rule, its record changes are approved by an engineering owner for this head, and its dismissal proofs now name the motion each hold judges. Two optional wording nits stay open on the dense onOpenChange description and one test suite's name.

Whole stack: passes; it merges cleanly with today's main. A pull request lands only when it and every pull request below it are approved.

[Automated review]

@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 yet: #8215 approves on its own, but #8197 below it changes two Lightbox behaviors that no spec settles, so the stack waits on an engineering owner.

#8197 — waits on an owner decision:

  • Miss: a controlled or default index below 0 now opens the viewer on the first item, where main renders nothing, and no Lightbox requirement settles that fallback.
  • Miss: in a gallery, a video one item away now stays mounted and paused, so paging back resumes it where it stopped instead of restarting it as on main, and no requirement settles that either.

An engineering owner approves or changes these two behaviors by commenting /approve-spec with #8197's full head SHA on #8197, or by answering in a comment; the author may do so as an engineering owner.

#8215 — approve, with no blocking findings.

Whole stack — passes and merges cleanly with today's main; a pull request lands only when it and every pull request below it are approved.

[Automated review]

Comment thread packages/core/src/Lightbox/Lightbox.tsx Resolved
Comment thread packages/core/src/Lightbox/Lightbox.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.

Approved: both pull requests in this stack approve, and CI passes on this head.

#8197: approve, with no blocking findings. Touch gallery paging and the pager's tempo-paced settle follow the Lightbox and touch-presentation specs, and its record edits carry an engineering owner's approval for its head.

#8215: approve, with no blocking findings. The touch-only drag to close decides once at the lift through Core's shared release rule and plays the springs the Lightbox record lists, with an engineering owner's approval of the record edits for this head.

Whole stack: passes; the public API is unchanged and the head merges cleanly with main. A pull request lands only when it and every pull request below it are approved, so #8197 lands first.

[Automated review]

vjeux added 2 commits November 7, 2026 17:20
A Lightbox photo closed only through its Close button or a tap beside
it. Dragged down, a fitted photo now follows the drag, shrinks, and the
backdrop fades with it. The release closes the viewer when the drag's
projected end lies more than 10 pt below its start, so a short flick
closes and a drag brought back springs back. The photo leaves on
Photos' measured dismissal springs, which component:Lightbox lists, as
spec:AST-094 FR4 allows an exit. Every other release, the return
included, plays springs.settle. The release animates on the
compositor. The drag to close is part of the touch presentation,
which a coarse primary pointer brings (spec:AST-094 FR13). Where the
primary pointer is fine, a mouse's, a pen's or a trackpad's drag
leaves the photo in place, as before.

The backdrop's blur comes off while the photo moves and returns at
rest, since a full-screen blur every frame drops frames on low-end
phones. Under Reduce Motion the photo fades out.

The close is reported when the photo has left the screen, about
0.3-0.5 s after the lift; component:Lightbox names that gap until the
shared exit hold lands.
Main's holdAnimations now takes the motion a test judges, and rejects
when the hold took none of it. Each dismissal proof names what it
reads: the dismissal's travel, the spring back's scale, and the opacity
of each Reduce Motion fade. A cancelled return names its travel, and
its scale too where the test reads it: a photo brought back within
10 pt of the start returns with no scale to animate.
@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 340106c

@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: the drag to close follows the Lightbox and touch-presentation specs, its record changes carry an engineering owner's approval for this head, and CI passes.

With #8197 merged, this pull request lands on its own; there are no blocking findings.

  • Optional: the dense onOpenChange description (Lightbox.doc.mjs:298) could say "on a phone or tablet", as the full descriptions do.
  • Optional: the suite at Lightbox.test.tsx:1676 checks that the drag attaches only in the touch presentation, which its name could say.

[Automated review]

@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 6ef4060

@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: the drag to close itself is settled on spec (an engineering owner's /approve-spec covers this head), but its WebKit busy-main-thread proof fails CI at this head.

  • Miss: LightboxDismiss.interaction.browser.spec.ts:412-473 judges the dismissal's roughly 0.15 s motion in a single run, so pr-interaction-webkit (2/6) fails with "the compositor presented too little in this window to judge"; play the dismissal several times and judge the runs with pooledBusyProof, as the harness README and LightboxPaging.interaction.browser.spec.ts do.
  • Miss: screenSignal.ts re-implements the harness's trackBrightness frame reader (regionSignal, signalFrames) and adds two helpers nothing calls (cadenceOutside, presentedFramesExpected); read the fade with trackBrightness and delete screenSignal.ts and its test.

The other failing leg, pr-interaction (4/6), is LightboxZoom's double-tap busy proof, which this pull request does not change and which passes in WebKit here. Two optional wording nits from earlier still stand (Lightbox.doc.mjs:298 and the suite name at Lightbox.test.tsx:1737).

[Automated review]

The dismissal runs for about a fifth of a second, and a blocked WebKit
presents a frame only every 100 to 300 ms, so one run could hold too
few frames to judge. The proof now plays four dismissals and judges
them with the harness's pooledBusyProof: each run against its own
control, the frame floor over all of them. A run counts only with two
control frames, and each judged run must show a new level on its own.
It reads the backdrop's fade at a flat point with trackBrightness, so
screenSignal.ts and its test, a second frame reader, are gone.

@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: the drag to close follows component:Lightbox FR8 and spec:AST-094, its record changes carry an engineering owner's approval for this head, both test findings from the last review are fixed, and CI passes on this head.

  • The dismissal's busy-main-thread proof now plays four dismissals and judges them with pooledBusyProof; it passes in the WebKit interaction leg that failed before, and in Chromium.
  • screenSignal.ts and its test are gone; the proof reads the backdrop's fade with the harness's trackBrightness.

Two optional wording nits from earlier still stand (Lightbox.doc.mjs:298 and the suite name at Lightbox.test.tsx:1737). The Stack: line names #10630, but #10630 is built on an earlier commit of this pull request, so this one was reviewed on its own.

[Automated review]

@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 5773dc0

This branch was successfully deployed

1 active deployment
Preview — 5773dc05 Deployed Nov 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) 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.

2 participants