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

PDF: Bugfixes #940

Merged
merged 8 commits into from
Feb 23, 2023
Merged

PDF: Bugfixes #940

merged 8 commits into from
Feb 23, 2023

Conversation

bjosttveit
Copy link
Member

@bjosttveit bjosttveit commented Feb 21, 2023

Description

This PR makes several changes to the generation of PDFs:

  • To make the useResolvedNode hook work with the automatic pdf layout, the automatic layout is now added to the form-layouts in redux with the name __pdf__. To make this work most of the PDF-logic is moved to a new sagaSlice, making the React components much simpler. This way is hopefully less error-prone as a watcher-saga is used to determine if all necessary things are loaded instead of checking a bunch of variables in the store.
  • Fixes issue where attachments in automatic layout would cause the PDF not to render.
  • No longer shows help-icons when printing PDF.
  • Remove extra underline from hyperlinks when printing PDF.

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions) Separate issue
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Changes/additions to component properties
    • Changes are reflected in both src/layout/layout.d.ts and layout.schema.v1.json, and these are all backwards-compatible
    • No changes made
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

@bjosttveit bjosttveit added the kind/bug Something isn't working label Feb 21, 2023
@bjosttveit
Copy link
Member Author

😨
image

Copy link
Contributor

@olemartinorg olemartinorg left a comment

Choose a reason for hiding this comment

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

Great big change! 🥳 You certainly learned a lot about sagas, good job!! 🚀
Sorry for all the comments. I suspect most of them are not that useful, though! 😆

src/App.tsx Show resolved Hide resolved
src/features/form/components/HelpTextContainer.tsx Outdated Show resolved Hide resolved
src/features/form/layout/formLayoutSlice.ts Outdated Show resolved Hide resolved
src/features/pdf/PDFView.tsx Show resolved Hide resolved
src/features/pdf/data/generatePdfSagas.ts Show resolved Hide resolved
src/features/pdf/data/generatePdfSagas.ts Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Feb 23, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

26.8% 26.8% Coverage
0.0% 0.0% Duplication

@bjosttveit bjosttveit merged commit 8ce6488 into main Feb 23, 2023
@bjosttveit bjosttveit deleted the pdf/bug-fixes branch February 23, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Attachments makes the new pdf generator time out
2 participants