Skip to content

chore: bytt A2 /ui/Profile-lenker til A3-URL-er i språkfiler(v4-apps)#4203

Open
framitdavid wants to merge 1 commit into
mainfrom
chore/update-language-files-to-a3-links-v4-apps
Open

chore: bytt A2 /ui/Profile-lenker til A3-URL-er i språkfiler(v4-apps)#4203
framitdavid wants to merge 1 commit into
mainfrom
chore/update-language-files-to-a3-links-v4-apps

Conversation

@framitdavid
Copy link
Copy Markdown
Contributor

@framitdavid framitdavid commented May 13, 2026

Oppsummering

  • instantiate.authorization_error_check_rights: bytter https://{0}/ui/Profile/https://am.ui.{0}/accessmanagement/ui (A3 tilgangsstyring).
  • party_selection.seeing_this_preference: bytter hardkodet https://altinn.no/ui/Profile → miljø-bevisst https://af.{0}/profile/parties, og forenkler brødsmulen til Profil > Aktører (nb) /
    Aktørar (nn) / Parties (en).
  • PartySelection.tsx: importerer getHostname og sender det som {0}-parameter til <Lang>.
  • stateless-app/party-selection.ts: oppdaterer Cypress-assertion til å matche ny brødsmuletekst.

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

Release Notes

  • Documentation

    • Updated authorization error help text with new access management links across English, Norwegian Bokmål, and Norwegian Nynorsk
    • Refreshed party selection guidance to direct users to updated profile settings location
  • Tests

    • Updated e2e tests to reflect language text changes

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

PartySelection component now passes a hostname parameter to localized error-explanation text. English, Norwegian Bokmål, and Norwegian Nynorsk language files update two shared text strings with new URLs pointing to access-management and profile settings, replacing older domain paths. E2E test assertion updates to expect the new shortened text.

Changes

Party Selection and Authorization URL Updates

Layer / File(s) Summary
Component hostname parameter integration
src/features/instantiate/containers/PartySelection.tsx
Component imports getHostname utility and passes hostname as a parameter to the Lang element rendering the "why_seeing_this" explanation, enabling dynamic URL construction in localized strings.
Localized text URL and message updates
src/language/texts/en.ts, src/language/texts/nb.ts, src/language/texts/nn.ts
All three language variants update authorization-rights help links to use am.ui.{0}/accessmanagement/ui and party-selection preference links to af.{0}/profile/parties, with shortened guidance text referencing the new Parties profile location.
E2E test assertion alignment
test/e2e/integration/stateless-app/party-selection.ts
Party-selection e2e test assertion is updated to expect the new shorter Norwegian text variant instead of the previous longer sentence.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating language file links from A2 /ui/Profile URLs to A3-compatible URLs in v4-apps.
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 PR description provides a clear technical summary in Norwegian and fills all major template sections, though no specific verification checkboxes are marked.

✏️ 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 chore/update-language-files-to-a3-links-v4-apps

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/features/instantiate/containers/PartySelection.tsx (1)

205-212: 💤 Low value

Consider conditionally passing params based on the text being displayed.

The params array is passed to Lang regardless of which text is displayed, but only party_selection.seeing_this_preference uses the {0} placeholder. While this doesn't cause errors, it's cleaner to pass params only when needed.

♻️ Optional refactor
           <Paragraph>
             <Lang
               id={
                 appPromptForPartyOverride === 'always'
                   ? 'party_selection.seeing_this_override'
                   : 'party_selection.seeing_this_preference'
               }
-              params={[getHostname()]}
+              {...(appPromptForPartyOverride !== 'always' && { params: [getHostname()] })}
             />
           </Paragraph>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/features/instantiate/containers/PartySelection.tsx` around lines 205 -
212, The Lang component is always receiving params even though only
'party_selection.seeing_this_preference' needs {0}; update the render so
params={[getHostname()]} is only passed when appPromptForPartyOverride ===
'preference' (i.e., when id === 'party_selection.seeing_this_preference').
Locate the Lang usage and either compute id in a variable or add a conditional
prop (only include params when appPromptForPartyOverride !== 'always' / equals
'preference') so getHostname() is not invoked unnecessarily and params are
omitted for 'party_selection.seeing_this_override'.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/features/instantiate/containers/PartySelection.tsx`:
- Around line 205-212: The Lang component is always receiving params even though
only 'party_selection.seeing_this_preference' needs {0}; update the render so
params={[getHostname()]} is only passed when appPromptForPartyOverride ===
'preference' (i.e., when id === 'party_selection.seeing_this_preference').
Locate the Lang usage and either compute id in a variable or add a conditional
prop (only include params when appPromptForPartyOverride !== 'always' / equals
'preference') so getHostname() is not invoked unnecessarily and params are
omitted for 'party_selection.seeing_this_override'.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6376cb77-cb0c-45d2-9ebf-d1fef2d592cd

📥 Commits

Reviewing files that changed from the base of the PR and between c390dba and bd8a156.

📒 Files selected for processing (5)
  • src/features/instantiate/containers/PartySelection.tsx
  • src/language/texts/en.ts
  • src/language/texts/nb.ts
  • src/language/texts/nn.ts
  • test/e2e/integration/stateless-app/party-selection.ts

@sonarqubecloud
Copy link
Copy Markdown

@framitdavid framitdavid added kind/other Pull requests containing chores/repo structure/other changes backport This PR should be cherry-picked onto older release branches labels May 13, 2026
@framitdavid framitdavid added squad/utforming Issues that belongs to the named squad. labels May 13, 2026
@framitdavid framitdavid moved this to 🔎 In review in Team Altinn Studio May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR should be cherry-picked onto older release branches kind/other Pull requests containing chores/repo structure/other changes squad/utforming Issues that belongs to the named squad.

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

2 participants