Repository navigation
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #8215, and on #8665 and #8676 (gestures for every pointer), which this stack carries. Review only this PR's change: vjeux/astryx@11abd78...a140e96
Why
In Photos, a photo opens by growing out of its thumbnail and closes back into it, so you keep your place in the grid. A Lightbox photo appears and disappears at once, with no link to the thumbnail you tapped.
What led to it
The UIKit-parity work for Astryx (
spec:AST-094): UIKit's zoom transition, on the dismissal (#8215), so a photo dragged down lands in its thumbnail.Options and tradeoffs
experimental.sourceFor), or else the element that opened the viewer, when it shows a picture.Why this choice
Only a compositor copy can be reversed mid-flight. It all runs inside
experimental: without it, a Lightbox keeps its stable behavior (spec:AST-017FR21). A drag-down close reportsonOpenChange(false)when the pointer lifts, as every other close does, and the landing follows the pointer that released it. INV13 in the layer-runtime record belongs to #8186 (the layer runtime's exit copy), which this stack carries: this PR doesn't add it, and the zoom uses its own lifted copy.Owner question:
experimental.sourceFor. It lets a caller name the element a photo grows out of and lands back in, such as one thumbnail in its own grid. Without it, only the element that opened the viewer can be the source, which misses when one button opens a whole gallery. The alternative is to drop the option until a spec names it. My pick: keep it insideexperimental.Owner question: the held close. After a close reports
onOpenChange(false), the viewer stays until the photo lands in its thumbnail (on touch, and for a drag down under any pointer), as Photos does, so the photo returns to its place instead of vanishing mid-flight. The alternative is to remove the viewer at once and skip the landing. My pick: keep it, insideexperimental.How to check it
In the "Gallery" story, which passes
experimental, on a phone:Evidence
Safari on the iOS 26.2 simulator:
The opening's busy proof judged a window too short to judge: it held no frames of a compositor-only control animation. It now blocks inside the page for 300 ms and holds 17 to 18 control frames in both engines.