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

HL-836 | Fix pdf viewer issues #2115

Merged
merged 2 commits into from
Jun 14, 2023
Merged

HL-836 | Fix pdf viewer issues #2115

merged 2 commits into from
Jun 14, 2023

Conversation

sirtawast
Copy link
Collaborator

@sirtawast sirtawast commented Jun 13, 2023

Description ✨

  • Resolve rendering issues
  • Update react-pdf again

Issues

Loading the worker from public/ is not elegant and webpack should probably load it but webpack is keen on generating the file with hash included in the name for cache busting purposes. That won't allow the resource to be loaded from a single static path so we need to revisit that after NextJs12 upgrade, which has changes in the asset pipeline.

UPDATE: Loads from webpack now, with considerably smaller JS footprint ~500KB.

@sirtawast sirtawast requested review from rikuke and mjturt June 13, 2023 07:20
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2023

Codecov Report

Merging #2115 (bf71c86) into develop (d7ed7d0) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #2115      +/-   ##
===========================================
- Coverage    33.07%   33.07%   -0.01%     
===========================================
  Files          773      773              
  Lines        15052    15055       +3     
  Branches      3199     3199              
===========================================
  Hits          4979     4979              
- Misses        9582     9585       +3     
  Partials       491      491              
Impacted Files Coverage Δ
...t/applicant/src/components/pdfViewer/PdfViewer.tsx 0.00% <0.00%> (ø)
...t/src/components/termsOfService/TermsOfService.tsx 0.00% <ø> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sirtawast sirtawast changed the title HL-836 HL-836 | Fix pdf viewer issues Jun 13, 2023
@github-actions
Copy link
Contributor

te-admn is deployed to: https://te-admn-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

te-yout is deployed to: https://te-yout-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

te-bknd is deployed to: https://te-bknd-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-hdlr is deployed to: https://helsinkibenefit-bf-hdlr-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-appl is deployed to: https://helsinkibenefit-bf-appl-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

TestCafe result is success for https://te-yout-2115.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://te-admn-2115.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-bknd is deployed to: https://helsinkibenefit-bf-bknd-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

TestCafe result is success for https://helsinkibenefit-bf-appl-2115.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

ks-empl is deployed to: https://ks-empl-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-hdlr is deployed to: https://ks-hdlr-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-bknd is deployed to: https://ks-bknd-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-youth is deployed to: https://ks-youth-2115.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

TestCafe result is success for https://ks-handler-2115.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

github-actions bot commented Jun 13, 2023

TestCafe result is failure for https://ks-empl-2115.test.kuva.hel.ninja! 😿💢💥💥

Check the report on:

Copy link
Contributor

@mjturt mjturt left a comment

Choose a reason for hiding this comment

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

Don't really like the idea of keeping deps in repo. This should be eventually fixed properly, but should we for now consider this as a temporary fix? What @rikuke thinks?

Some info here wojtekmaj/react-pdf#97

@github-actions
Copy link
Contributor

github-actions bot commented Jun 13, 2023

TestCafe result is failure for https://ks-youth-2115.test.kuva.hel.ninja! 😿💢💥💥

Check the report on:

@sirtawast
Copy link
Collaborator Author

Don't really like the idea of keeping deps in repo. This should be eventually fixed properly, but should we for now consider this as a temporary fix? What @rikuke thinks?

Some info here wojtekmaj/react-pdf#97

I can try to get this working today but no guarantees. Webpack configuration is not my forte and it should be done in applicant's next.config.js, which there is no previous example of on how to extend or override webpack.

@sirtawast sirtawast force-pushed the HL-836 branch 3 times, most recently from 66fdc82 to d1cf8d4 Compare June 14, 2023 07:59
@sonarqubecloud
Copy link

[yjdh-kesaseteli-shared] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[yjdh-kesaseteli-handler] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 5 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

84.7% 84.7% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[yjdh-kesaseteli-api] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 60 Code Smells

94.5% 94.5% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[yjdh-kesaseteli-employer] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 6 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

82.4% 82.4% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[yjdh-kesaseteli-youth] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

91.8% 91.8% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@mjturt mjturt left a comment

Choose a reason for hiding this comment

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

Approved, if tests really fail, they should be fixed before merge.

@sirtawast sirtawast merged commit fec0741 into develop Jun 14, 2023
@sirtawast sirtawast deleted the HL-836 branch June 14, 2023 09:35
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