-
Notifications
You must be signed in to change notification settings - Fork 14
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
Display images with new image viewer (UIScrollView version) #1413
Conversation
this is cool, but it breaks panning
# Conflicts: # Nos/Views/Components/Images/ImageViewer.swift # Nos/Views/LinkPreview.swift
Nos/Assets/Colors.xcassets/image-background.colorset/Contents.json
Outdated
Show resolved
Hide resolved
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.
I like this approach best as well! I didn't review the code in depth yet, but as a user this feels the best to me. Here are a few thoughts I had which playing with it. Do with them what you will:
- I love that this has pinch-to-zoom
- I wish the background around the image was black, not our app bg color. Black is more neutral and doesn't clash with the colors in the image the way dark purple does.
- The Mac/iPad view feels clunky to me. There are two sets of margins: one around the modal presentation and another around the image. Also there is no presentation animation, and personally I miss the swipe to dismiss even when I'm using a mouse. I think it would feel better to do a push transition rather than a modal presentation for the bigger size classes.
@joshuatbrown @mplorentz I'm fine with changing the background color to black. But I'd like to see that discussion happening in #design or in private conversation with our designer before moving on with that change. |
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.
I like this PR very much, it feels good to interact with it. It now looks even better after controlling how much the user can pan after zooming in. I'm marking this as request changes because I just want to see that check-in with our designer before merging this.
@martindsq Linda and Sebastian both agreed to a black background in Slack. |
Issues covered
#1164
Description
Displays full-screen images with the new image viewer. The gallery view will be covered in #1177.
How to test
x
to dismissScreenshots/Video
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-20.at.11.33.49.mp4
Notes
#1407 and #1408 are the same thing, but using different implementations. The point of having three draft PRs is to decide on the right approach -- each has its own pros and cons.
Update: Martin and I like the approach in this PR -- the UIScrollView -- since it feels the way we'd expect on both iPhone and Mac. I'd still love to get your thoughts, @mplorentz.
Pros for this approach
ZoomableContainer
and all its subtypes.Cons for this approach