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

chore: Add PDF config for layoutset #13512

Merged
merged 12 commits into from
Oct 2, 2024

Conversation

standeren
Copy link
Contributor

@standeren standeren commented Sep 9, 2024

Description

Implements support to set an existing layout as dedicated PDF. Setting it to PDF assigns a PDF-icon to the accordion and moves it to the bottom of the pages-panel in order to separate it from the order. Also implements a unset functionality moving the page back to order and removing the icon. If trying to convert a layout to pdf while there exists a pdf already a modal is shown with the options to convert the existing pdf back to a layout page or deleting it.
Skjermbilde 2024-09-13 kl  17 08 33

This PR also improves the way new layouts are named by simply checking that the autogenerated name does not exist in either order or pdfLayoutName.

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@standeren standeren linked an issue Sep 9, 2024 that may be closed by this pull request
5 tasks
@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Sep 9, 2024
@standeren standeren changed the title Add PDF config for page and layoutset Chore: Add PDF config for page and layoutset Sep 10, 2024
@standeren standeren force-pushed the 12829-implement-setting-pdflayoutname-for-a-layoutset branch from f197a00 to d57a769 Compare September 10, 2024 09:11
@standeren standeren changed the title Chore: Add PDF config for page and layoutset chore: Add PDF config for page and layoutset Sep 10, 2024
@standeren standeren force-pushed the 12829-implement-setting-pdflayoutname-for-a-layoutset branch from d57a769 to 6e08bc0 Compare September 10, 2024 10:17
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 97.31544% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.35%. Comparing base (fe5395f) to head (2730155).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...Properties/PageConfigPanel/PdfConfig/PdfConfig.tsx 95.83% 1 Missing ⚠️
...ux-editor/src/containers/DesignView/DesignView.tsx 92.30% 1 Missing ⚠️
...tainers/DesignView/PageAccordion/PageAccordion.tsx 80.00% 0 Missing and 1 partial ⚠️
...src/hooks/mutations/useUpdateLayoutNameMutation.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13512      +/-   ##
==========================================
+ Coverage   94.32%   94.35%   +0.02%     
==========================================
  Files        1543     1550       +7     
  Lines       20984    21113     +129     
  Branches     2521     2532      +11     
==========================================
+ Hits        19794    19921     +127     
- Misses        945      946       +1     
- Partials      245      246       +1     

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

@standeren standeren force-pushed the 12829-implement-setting-pdflayoutname-for-a-layoutset branch 3 times, most recently from e7d6582 to 6b90fb1 Compare September 12, 2024 14:09
@standeren standeren force-pushed the 12829-implement-setting-pdflayoutname-for-a-layoutset branch 3 times, most recently from a3a8574 to 7f1b8b1 Compare September 13, 2024 15:02
@standeren standeren changed the title chore: Add PDF config for page and layoutset chore: Add PDF config for layoutset Sep 13, 2024
@standeren standeren marked this pull request as ready for review September 13, 2024 15:08
@standeren standeren force-pushed the 12829-implement-setting-pdflayoutname-for-a-layoutset branch 3 times, most recently from dcf9d1c to c48b267 Compare September 19, 2024 06:03
@ErlingHauan
Copy link
Contributor

Starting review

Copy link
Contributor

@ErlingHauan ErlingHauan left a comment

Choose a reason for hiding this comment

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

Nice, thorough work!
It's great that you notice and clean up unneeded code along the way 😄

I only have some nitpicking comments about the language 😊

frontend/language/src/nb.json Outdated Show resolved Hide resolved
frontend/language/src/nb.json Outdated Show resolved Hide resolved
frontend/language/src/nb.json Outdated Show resolved Hide resolved
@standeren standeren force-pushed the 12829-implement-setting-pdflayoutname-for-a-layoutset branch from 0111106 to 846314b Compare September 30, 2024 08:16
Copy link
Member

@nkylstad nkylstad left a comment

Choose a reason for hiding this comment

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

Tested OK!

@standeren standeren merged commit b8a91fd into main Oct 2, 2024
16 checks passed
@standeren standeren deleted the 12829-implement-setting-pdflayoutname-for-a-layoutset branch October 2, 2024 11:42
ErlingHauan added a commit that referenced this pull request Oct 4, 2024
Co-authored-by: Erling Hauan <148075168+ErlingHauan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement setting pdfLayoutName for a layoutSet
3 participants