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: PDF file asset [WPB-15702] #18743

Merged
merged 12 commits into from
Feb 13, 2025
Merged

feat: PDF file asset [WPB-15702] #18743

merged 12 commits into from
Feb 13, 2025

Conversation

olafsulich
Copy link
Contributor

@olafsulich olafsulich commented Feb 12, 2025

TaskWPB-15702 [Web] PDF preview

Description

What's changed:

  1. new pdf file asset type, based on feat: FileCard component [WPB-15686] #18692
  2. refactor, mostly wrapping components with folders, moving files/code around

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:

image

Loading:

image

Lazy loading:

Screen.Recording.2025-02-12.at.12.38.24.mov

Error:

image

Checklist

  • mentions the JIRA issue in the PR name (Ex. [WPB-XXXX])
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 31.95876% with 66 lines in your changes missing coverage. Please review.

Project coverage is 45.66%. Comparing base (102bc0a) to head (752458e).
Report is 4 commits behind head on dev.

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     

@olafsulich olafsulich marked this pull request as ready for review February 13, 2025 06:13
@olafsulich olafsulich requested review from otto-the-bot and a team as code owners February 13, 2025 06:13
Copy link
Contributor

@przemvs przemvs left a comment

Choose a reason for hiding this comment

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

LGTM!

package.json Outdated Show resolved Hide resolved
src/script/hooks/useResizeObserver/useResizeObserver.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@e-maad e-maad left a comment

Choose a reason for hiding this comment

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

Well done 👏

@olafsulich olafsulich merged commit d5f4d3b into dev Feb 13, 2025
14 of 15 checks passed
@olafsulich olafsulich deleted the feat/pdf-file-card branch February 13, 2025 11:51
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.

6 participants