Skip to content
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

lightbox: Implement drag-to-dismiss #40

Open
chrisbobbe opened this issue Mar 31, 2023 · 1 comment
Open

lightbox: Implement drag-to-dismiss #40

chrisbobbe opened this issue Mar 31, 2023 · 1 comment
Labels
a-lightbox The lightbox / image-viewer screen
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

The lightbox has an "x" button in its app bar to close it, but it can't be closed with a drag gesture.

I think my ideal version of this would be: you drag or fling the image in any direction, then:

  • if you did it far or fast enough, the image would smoothly take its Hero flight back to the thumbnail in the message list, and the route is popped from the nav.
  • if you didn't drag/fling far/fast enough, the image would move smoothly back into its starting position.

Maybe something like this is possible with the Draggable widget? (Probably it should only respond to drags this way if it's zoomed out all the way. If it's zoomed in, we want the InteractiveViewer to handle panning the image.)

Otherwise, maybe we can make the route dismissable with a drag-down gesture and no Hero animation. For this approach, we can look at the drag-gesture-based CupertinoRouteTransitionMixin, which deals with horizontal drag gestures, and maybe make something like that but for a downward drag gesture.

@gnprice
Copy link
Member

gnprice commented May 22, 2023

See also

@gnprice gnprice added the a-lightbox The lightbox / image-viewer screen label May 27, 2023
@gnprice gnprice added this to the Launch milestone Jun 15, 2023
@gnprice gnprice modified the milestones: Launch, Post-launch May 9, 2024
@gnprice gnprice modified the milestones: M6: Post-launch, M7: Future Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-lightbox The lightbox / image-viewer screen
Projects
Status: No status
Development

No branches or pull requests

2 participants