react-component / react-component/image
Switching images in Image.PreviewGroup by swipes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 124
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
What problem does this feature solve?
Currently, Image.PreviewGroup supports keyboard arrow keys to navigate between images in the preview modal, which is great for desktop users.
However, on mobile devices, it would be very helpful to support horizontal swipe gestures (left/right) in the preview modal to move to previous/next image.
This will provide provide a more intuitive experience for users of touchscreen devices.
What does the proposed API look like?
No changes to the public API are strictly required.
The swipe gesture support could be implemented internally and enabled by default.
If needed, a prop like enableSwipes?: boolean could be introduced to optionally enable/disable swipe navigation.
Notes
See also https://github.com/ant-design/ant-design/issues/54158.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Image.PreviewGroup preview modal and locate the existing keyboard arrow-key navigation. Implement horizontal left/right swipe navigation internally, then verify that touch users can move between images while existing keyboard navigation remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100