Skip to content

Single image viewer feature#239

Closed
dhruvtailor7 wants to merge 48 commits intofunctionland:developfrom
dhruvtailor7:single-image-viewer
Closed

Single image viewer feature#239
dhruvtailor7 wants to merge 48 commits intofunctionland:developfrom
dhruvtailor7:single-image-viewer

Conversation

@dhruvtailor7
Copy link
Copy Markdown
Contributor

@dhruvtailor7 dhruvtailor7 commented Jul 27, 2022

PR for the following issue.
#145

  • Browse between images (Allow the user to scroll images horizontally in a single view mode)
  • Zoom in/out the image
  • View the image information when pulled up the image
  • Display action buttons at the end of the screen
Screenrecorder-2022-07-27-11-53-12-599.mp4

Emad Baqeri and others added 28 commits June 20, 2022 16:04
…duct_and_contributing_files

code of conduct and contributing guideline files added
…and_yarn/eventsource-1.1.2

Bump eventsource from 1.1.0 to 1.1.2
…and_yarn/moment-2.29.4

Bump moment from 2.29.3 to 2.29.4
…and_yarn/terser-4.8.1

Bump terser from 4.8.0 to 4.8.1
…and_yarn/jpeg-js-0.4.4

Bump jpeg-js from 0.4.3 to 0.4.4
@dhruvtailor7 dhruvtailor7 changed the title Single image viewer feature for issue #145 Single image viewer feature Jul 27, 2022
@ehsan6sha
Copy link
Copy Markdown
Member

@dhruvtailor7 can we somehow do a pre-load of next image to eliminate the brief black screen when scrolling fast to the next one (without loss of performance)?

@dhruvtailor7
Copy link
Copy Markdown
Contributor Author

@emadbaqeri @ehsan6sha @ghorbani-m I have added the following

  • action button at the bottom of the screen
  • panResponder to go back

The performance issue is because of the shared element transition so I have removed it.

@ghorbani-m
Copy link
Copy Markdown
Contributor

Hi @dhruvtailor7, Thanks for the updates, I've had a test on updates and the issues are:

  • There is a tangible delay to display the image after opening the screen
  • We expect to back to the main screen when pulling the image-gallery-viewer screen down
  • We need the transition from the main screen to the image-gallery-viewer screen same as the previous version
20220803-144517-720x1600.mp4

Thanks.

@dhruvtailor7
Copy link
Copy Markdown
Contributor Author

dhruvtailor7 commented Aug 4, 2022

@ghorbani-m I have added the code for swipe down to go back to the main screen.
If we use the shared element transition, it is causing a delay in the opening of the image-gallery-view screen.
What do you suggest can be done here?

@ghorbani-m
Copy link
Copy Markdown
Contributor

@ghorbani-m I have added the code for swipe down to go back to the main screen. If we use the shared element transition, it is causing a delay in the opening of the image-gallery-view screen. What do you suggest can be done here?

Hi @dhruvtailor7 , I had a look at the code and solved the performance issue, the reason was passing a large data to the image-gallery-viewer screen through navigation params.
I have committed the fixes to my repo, please have a look at them and merge if they are okay.

Now, You just need to tune the SharedElement component to have a smooth transition when the user taps on an image.

@dhruvtailor7
Copy link
Copy Markdown
Contributor Author

@ghorbani-m I have pushed the code for transition. Please check.

@ghorbani-m
Copy link
Copy Markdown
Contributor

ghorbani-m commented Aug 13, 2022

@ghorbani-m I have pushed the code for transition. Please check.

Thanks @dhruvtailor7 , I've checked it out, and it seems the image transition issue is improved, but I think the solution is not the best solution (setting delay in transitionSpec config), it causes an issue (gray box before transition) on transition, please have a look to below video

I believe FlatList is more compatible with the SharedElement library, I had a simple test and replaced RCL with FlatList (imported from react-native) and removed delay config in transitionSpec and the below issue was fixed!
Could you please have a test with FlatList instead of RCL?

20220813-195553-720x1600.mp4

@ghorbani-m
Copy link
Copy Markdown
Contributor

Hi @dhruvtailor7 , I have checked your latest commit, the image transition issue is fixed, but the slider performance is not smoth!

@dhruvtailor7
Copy link
Copy Markdown
Contributor Author

Hello @ghorbani-m, I have added a few more optimization parameters to the flatlist. I think this is the best we can achieve with Flatlist.

@dhruvtailor7
Copy link
Copy Markdown
Contributor Author

Hello @ghorbani-m, Have you checked the scroll performance after the optimization?

@ghorbani-m
Copy link
Copy Markdown
Contributor

ghorbani-m commented Aug 22, 2022

Hello @ghorbani-m, Have you checked the scroll performance after the optimization?

Hello @dhruvtailor7 , Yes, I have, the scroll performance is better than previous version, but some time we have black screen while scroll images fast! (because of delay on rendering images at flatlist)

Anyway , I worked on your old code that was based on RCL, and found out what is the performance issue on transition, so
I used a trick to solve the issue. please have a look at this baranch.

@ghorbani-m
Copy link
Copy Markdown
Contributor

closed by this PR

@ghorbani-m ghorbani-m closed this Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEATURE REQUEST: Browsing single image with action buttons [OPEN TO HUNT] [$1,000]

5 participants