-
Notifications
You must be signed in to change notification settings - Fork 291
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: PDF file asset [WPB-15702] #18743
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #18743 +/- ##
==========================================
+ Coverage 45.63% 45.66% +0.03%
==========================================
Files 956 968 +12
Lines 27857 27937 +80
Branches 6286 6302 +16
==========================================
+ Hits 12712 12758 +46
- Misses 13560 13591 +31
- Partials 1585 1588 +3 |
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.
LGTM!
|
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.
Well done 👏
Description
What's changed:
How it works:
We render PDFs using react-pdf library. The library with its code is lazy loaded, based on the viewport. The preview itself is not scrollable, it'll be clickable (opens fullscreen file preview on click) in the future.
Demo
Preview:
Loading:
Lazy loading:
Screen.Recording.2025-02-12.at.12.38.24.mov
Error:
Checklist