Skip to content

Moved validationOnNavigation to globalPageSettings#4063

Closed
walldenfilippa wants to merge 1 commit intofeat/16446-navigation-validationfrom
fix/validation-on-navigation-globalPageSettings
Closed

Moved validationOnNavigation to globalPageSettings#4063
walldenfilippa wants to merge 1 commit intofeat/16446-navigation-validationfrom
fix/validation-on-navigation-globalPageSettings

Conversation

@walldenfilippa
Copy link
Contributor

Description

Moved validationOnNavigation into GlobalPageSettings in Common.ts. This means it is now part of the standard page settings hierarchy and will be automatically supported in NEXT, where uiSettings from layout-sets.json moves to App/ui/Settings.json).

By being part of GlobalPageSettings, the setting is automatically handled by usePageSettings(): layout-set-specific Settings.json overrides the global layout-sets.json uiSettings.

Fixed the override priority for validationOnNavigation in useGetNavigationIsPrevented — page-specific configuration now correctly takes precedence over the global setting, instead of the other way around.

Override hierarchy (highest to lowest priority)
Individual page layout file (data.validationOnNavigation)
Layout-set Settings.json (pages.validationOnNavigation)
Global layout-sets.json uiSettings (validationOnNavigation)

Related Issue(s)

  • closes #{issue number}

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

…ed validationOnNavigation to GlobalPageSettings
@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 labels Mar 16, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 455736f6-d461-44ac-86d4-f2084ff836eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/validation-on-navigation-globalPageSettings
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@sonarqubecloud
Copy link

@walldenfilippa
Copy link
Contributor Author

/publish

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

PR release:

  • <link rel="stylesheet" type="text/css" href="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.3-pr.4217.validation-on-navigation-globalPageSettings.2162351f/altinn-app-frontend.css">
  • <script src="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.3-pr.4217.validation-on-navigation-globalPageSettings.2162351f/altinn-app-frontend.js"></script>

⚙️ Building...
❌ Failed: https://github.com/Altinn/app-frontend-react/actions/runs/23146175815

@walldenfilippa
Copy link
Contributor Author

changing branch name, creating a new PR

@walldenfilippa walldenfilippa deleted the fix/validation-on-navigation-globalPageSettings branch March 16, 2026 13:45
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant