Skip to content

feat/18402 hide appName header in pdf#4173

Open
walldenfilippa wants to merge 4 commits intomainfrom
feat/18402-hide-app-name-pdf
Open

feat/18402 hide appName header in pdf#4173
walldenfilippa wants to merge 4 commits intomainfrom
feat/18402-hide-app-name-pdf

Conversation

@walldenfilippa
Copy link
Copy Markdown
Contributor

@walldenfilippa walldenfilippa commented May 6, 2026

Description

Footer appName needs to be handled in app-lib.

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

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2e39aa08-a348-4e5d-960f-fb0b97c609a0

📥 Commits

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

📒 Files selected for processing (2)
  • src/codegen/Common.ts
  • src/features/form/layoutSettings/LayoutSettingsContext.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/features/form/layoutSettings/LayoutSettingsContext.tsx
  • src/codegen/Common.ts

📝 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.
Description check ✅ Passed The PR description follows the template structure with all major sections completed: description, related issue, verification/QA checklist items marked, and labels added.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 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

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