Skip to content

feat/18402 hide appName header in pdf#4173

Open
walldenfilippa wants to merge 5 commits into
mainfrom
feat/18402-hide-app-name-pdf
Open

feat/18402 hide appName header in pdf#4173
walldenfilippa wants to merge 5 commits into
mainfrom
feat/18402-hide-app-name-pdf

Conversation

@walldenfilippa
Copy link
Copy Markdown
Contributor

@walldenfilippa walldenfilippa commented May 6, 2026

Description

Footer appName needs is handled in app-lib: Altinn/app-lib-dotnet#1753

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)
    • 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
  • 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/* and backport* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

Summary by CodeRabbit

  • New Features

    • Added a configuration to control where the application name appears in generated PDFs (options: all, header, footer, none; default: all), exposed via layout and page UI settings.
  • Tests

    • Added test coverage validating default behavior and each display option for the PDF application name.

@walldenfilippa walldenfilippa added kind/product-feature Pull requests containing new features backport-ignore This PR is a new feature and should not be cherry-picked onto release branches squad/utforming Issues that belongs to the named squad. labels May 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@walldenfilippa has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 25 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8a7ef55e-a1f5-42be-a9fc-11f62668ad13

📥 Commits

Reviewing files that changed from the base of the PR and between 6ef2980 and c13e28f.

📒 Files selected for processing (4)
  • src/codegen/Common.ts
  • src/features/form/layoutSettings/LayoutSettingsContext.tsx
  • src/features/pdf/PDFWrapper.test.tsx
  • src/features/pdf/PdfFromLayout.tsx
📝 Walkthrough

Walkthrough

This PR adds a new configuration option showAppNameInPdf to layout/global UI settings (enum: 'all'|'header'|'footer'|'none', default 'all'), surfaces it in merged page settings, uses it to conditionally render the app name in PDF output, and adds tests for the behavior.

Changes

PDF App Name Display Control

Layer / File(s) Summary
Data Shape
src/codegen/Common.ts
Adds exported IGlobalSettings that extends GlobalPageSettings and defines optional showAppNameInPdf enum with default 'all'; updates ILayoutSet.uiSettings to IGlobalSettings.
Layout Integration
src/features/form/layoutSettings/LayoutSettingsContext.tsx
Adds showAppNameInPdf: 'all' to defaults and includes it in the merged result returned by usePageSettings; import formatting adjusted.
PDF Rendering
src/features/pdf/PdfFromLayout.tsx
Imports usePageSettings, reads showAppNameInPdf, computes showAppName for 'all' or 'header', and conditionally renders the app name heading.
Tests
src/features/pdf/PDFWrapper.test.tsx
Adds test suite showAppNameInPdf with cases for default and explicit 'all', 'header', 'footer', 'none'; adds mock import.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title references the main feature (hiding appName in PDF) and relates to the issue (#18402), but is somewhat technical and doesn't fully capture that this adds configurable control over app name display placement.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description follows the template structure with all required sections completed, including a clear description of changes, related issue reference, comprehensive verification/QA checklist with appropriate selections, and proper labeling for release notes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/18402-hide-app-name-pdf

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@walldenfilippa walldenfilippa marked this pull request as draft May 13, 2026 08:08
…s prop hideAppNameInPdf from enum to ExprVal.Boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/product-feature Pull requests containing new features squad/utforming Issues that belongs to the named squad.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skjule appName på underskjemaene i pdf-visning

1 participant