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

feat(CLNP-1132): zoomable image viewer #156

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Conversation

bang9
Copy link
Collaborator

@bang9 bang9 commented Jan 23, 2024

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team [email protected] with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

CLNP-1132

Description Of Changes

  • Implement zoomable image viewer

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@bang9 bang9 self-assigned this Jan 23, 2024
@bang9 bang9 changed the title feat/zoomable file viewer feat(CLNP-1132): zoomable file viewer Jan 23, 2024
@bang9 bang9 changed the title feat(CLNP-1132): zoomable file viewer feat(CLNP-1132): zoomable image viewer Jan 23, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

Attention: 96 lines in your changes are missing coverage. Please review.

Comparison is base (7c99c96) 13.08% compared to head (38bc9e5) 13.04%.

Files Patch % Lines
...t-react-native/src/components/FileViewer/index.tsx 0.00% 46 Missing ⚠️
...ve/src/components/FileViewer/FileViewerContent.tsx 0.00% 36 Missing ⚠️
...ive/src/components/FileViewer/FileViewerFooter.tsx 0.00% 7 Missing ⚠️
...ive/src/components/FileViewer/FileViewerHeader.tsx 0.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
- Coverage   13.08%   13.04%   -0.05%     
==========================================
  Files         331      334       +3     
  Lines        7388     7414      +26     
  Branches     2037     2045       +8     
==========================================
  Hits          967      967              
- Misses       6351     6376      +25     
- Partials       70       71       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bang9 bang9 requested review from a team January 24, 2024 00:36
Copy link

@AhyoungRyu AhyoungRyu left a comment

Choose a reason for hiding this comment

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

Left a small question. LGTM 👍

Comment on lines +74 to +75
{mediaViewer}
{loading && <LoadingSpinner style={{ position: 'absolute' }} size={40} color={palette.primary300} />}

Choose a reason for hiding this comment

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

Suggested change
{mediaViewer}
{loading && <LoadingSpinner style={{ position: 'absolute' }} size={40} color={palette.primary300} />}
{loading ? <LoadingSpinner style={{ position: 'absolute' }} size={40} color={palette.primary300} /> : mediaViewer}

Should we display only one component depends on the loading status? Or it's just okay to keep both like the above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The loading state is controlled by the onLoadEnd event of the mediaViewer(ImageView or VideoView).
Therefore, the LoadingSpinner should take the form of covering the screen.

@bang9 bang9 merged commit 8844b26 into main Jan 25, 2024
6 checks passed
@bang9 bang9 deleted the feat/zoomable-file-viewer branch January 25, 2024 04:05
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.

3 participants