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

UI/PhotoPreview #330

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open

UI/PhotoPreview #330

wants to merge 29 commits into from

Conversation

nagavcindriqim
Copy link
Contributor

@nagavcindriqim nagavcindriqim commented Sep 9, 2024

A UI component you can use to present an image or set of images in full-screen mode.

Requirements

  • you should be able to inject an array of images
  • image preview is presented full-screen
  • you can zoom and pan the image
  • you can rotate the screen vertically and/or horizontally
  • you can navigate to the next screen (if multiple are supplied)
  • swipe down to dismiss it interactively
  • written in SwiftUI

Closes #206

@nagavcindriqim nagavcindriqim self-assigned this Sep 9, 2024
@nagavcindriqim nagavcindriqim requested a review from a team September 9, 2024 13:20
Copy link
Collaborator

@borut-t borut-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. I would also like to see a preview of it in the Storbybook app. Can you do that within this PR please.

@borut-t
Copy link
Collaborator

borut-t commented Sep 23, 2024

I've previewed the component in the Storybook app. Here is my observation:

  • there is some flickering going on and it appears to be happening only for the remote images
  • remote image aspect ratio is not respected
  • could we go with a TabView and PageTabViewStyle() instead?
Screen.Recording.2024-09-23.at.08.45.45.mov

@nagavcindriqim
Copy link
Contributor Author

I've previewed the component in the Storybook app. Here is my observation:

  • there is some flickering going on and it appears to be happening only for the remote images
  • remote image aspect ratio is not respected
  • could we go with a TabView and PageTabViewStyle() instead?

Screen.Recording.2024-09-23.at.08.45.45.mov

@borut-t I've made some changes to loading remote images. The issue persisted only when Kingfisher was not available.
Unfortunately we can not use TabView since it limits us on the scrolling functionality.

@borut-t
Copy link
Collaborator

borut-t commented Sep 23, 2024

I've previewed the component in the Storybook app. Here is my observation:

  • there is some flickering going on and it appears to be happening only for the remote images
  • remote image aspect ratio is not respected
  • could we go with a TabView and PageTabViewStyle() instead?

Screen.Recording.2024-09-23.at.08.45.45.mov

@borut-t I've made some changes to loading remote images. The issue persisted only when Kingfisher was not available. Unfortunately we can not use TabView since it limits us on the scrolling functionality.

There is still some glitching going on...
https://github.com/user-attachments/assets/3b516597-0d31-42bf-a181-f149d4b0ff20

Regards to the TabView, I think this can be done with it.

@nagavcindriqim
Copy link
Contributor Author

I've previewed the component in the Storybook app. Here is my observation:

  • there is some flickering going on and it appears to be happening only for the remote images
  • remote image aspect ratio is not respected
  • could we go with a TabView and PageTabViewStyle() instead?

Screen.Recording.2024-09-23.at.08.45.45.mov

@borut-t I've made some changes to loading remote images. The issue persisted only when Kingfisher was not available. Unfortunately we can not use TabView since it limits us on the scrolling functionality.

There is still some glitching going on... https://github.com/user-attachments/assets/3b516597-0d31-42bf-a181-f149d4b0ff20

Regards to the TabView, I think this can be done with it.

@borut-t the glitch should now be fixed 🙏

@borut-t
Copy link
Collaborator

borut-t commented Sep 23, 2024

I've previewed the component in the Storybook app. Here is my observation:

  • there is some flickering going on and it appears to be happening only for the remote images
  • remote image aspect ratio is not respected
  • could we go with a TabView and PageTabViewStyle() instead?

Screen.Recording.2024-09-23.at.08.45.45.mov

@borut-t I've made some changes to loading remote images. The issue persisted only when Kingfisher was not available. Unfortunately we can not use TabView since it limits us on the scrolling functionality.

There is still some glitching going on... https://github.com/user-attachments/assets/3b516597-0d31-42bf-a181-f149d4b0ff20
Regards to the TabView, I think this can be done with it.

@borut-t the glitch should now be fixed 🙏

And they truly are. Two things:

  • progress loader looks a bit funny, can we use the default one?
  • i can zoom out the image too far. Can we limit until the image fit's the screen? (e.g., it should not be smaller than the screen width/height)

@nagavcindriqim
Copy link
Contributor Author

I've previewed the component in the Storybook app. Here is my observation:

  • there is some flickering going on and it appears to be happening only for the remote images
  • remote image aspect ratio is not respected
  • could we go with a TabView and PageTabViewStyle() instead?

Screen.Recording.2024-09-23.at.08.45.45.mov

@borut-t I've made some changes to loading remote images. The issue persisted only when Kingfisher was not available. Unfortunately we can not use TabView since it limits us on the scrolling functionality.

There is still some glitching going on... https://github.com/user-attachments/assets/3b516597-0d31-42bf-a181-f149d4b0ff20
Regards to the TabView, I think this can be done with it.

@borut-t the glitch should now be fixed 🙏

And they truly are. Two things:

  • progress loader looks a bit funny, can we use the default one?
  • i can zoom out the image too far. Can we limit until the image fit's the screen? (e.g., it should not be smaller than the screen width/height)

@borut-t we can't use the default one since we are using .drawingGroup() modifier.
zooming out is now limited to fit the screen 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] PhotoPreview
4 participants