Repository navigation
feat(Lightbox): swipe between gallery photos like Photos #8197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e463256
feat(core): UIScrollView zoom constants and the zoom stage geometry
vjeux 14f14d7
feat(Lightbox): touch zoom like the iOS Photos viewer
vjeux dc3a360
feat(Lightbox): swipe between gallery photos like Photos
vjeux 70a405d
feat(core): UIScrollView zoom constants and the zoom stage geometry
vjeux a743218
feat(Lightbox): touch zoom like the iOS Photos viewer
vjeux 0fc7062
Merge the updated #8148 into the Lightbox pager (replays the lane's r…
cixzhang b8266e6
fix(Lightbox): the zoom pan reads its begin threshold per press
vjeux b4fec75
Merge main into the Lightbox pager
vjeux 91d4a1e
fix(Lightbox): a single zoomed photo gives past its edge again
vjeux 22da53d
fix(core): a released page settles at the theme's tempo
vjeux 32e21eb
docs(core): the tempo note names the snap paging Carousel
vjeux 41b57e2
Merge main into the Lightbox pager
vjeux 3ee5207
test(Lightbox): the instant-page check waits for 12 frames
vjeux 93611a3
Merge main into the Lightbox pager
vjeux 258ac0d
test(Lightbox): the busy page-settle proof pools six settles
vjeux d3bd5ce
Merge main into the Lightbox pager (v0.7.10 shipped the zoom note)
vjeux e0eab2a
Merge main into the Lightbox pager (keeps #10406's lift record)
vjeux cc382a8
Merge main into the Lightbox pager (ports #10415's busy zoom tempo)
vjeux 17e7968
Merge main into the Lightbox pager
vjeux 3963547
fix(Lightbox): the photo left behind resets by the page the pager names
vjeux 51bf10b
Merge main into the Lightbox pager
vjeux 0bb42a8
test(Lightbox): the busy settle proofs read a left-out run as none
vjeux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [feat] A Lightbox gallery now pages the way the iOS Photos viewer does. On a phone or tablet, drag or flick between items: the row follows your finger, and the release lands on the next or previous item, one at most. A gap of 40 px separates the items while they move. A zoomed photo pans with your finger until it reaches its edge; a new drag from that edge moves to the next item. A photo you leave zoomed returns to its fitted size once the gallery rests. Under a finger, the previous and next buttons and the arrow keys slide to the item instead of swapping it in place. | ||
|
|
||
| Each item's caption moves with its item, right under its photo. `onIndexChange` also reports a swipe. | ||
|
|
||
| Lightbox now loads its touch code with it, as Toast and Slider do. Its import grows from 51.4 KB to 99.6 KB gzip with the zoom and paging beneath, mostly shared touch modules that a page loads once; Lightbox's own code adds 14.1 KB minified. | ||
|
|
||
| @vjeux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] A page that a swipe releases now settles at the theme's `tempo`, as the rest of its motion does: in a `Carousel` given `hasSnap={useSnapPaging()}`, and in a `Lightbox` gallery. At the default tempo the settle is unchanged. | ||
|
|
||
| @vjeux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: each page now lays out its own photo above its own caption (
Lightbox.tsx:250-258), so a page with a longer caption gets a smaller photo box, as the description notes. This comment says the photo keeps one box whatever captions render; rewording it to what the story shows keeps it accurate.