chore: bytt A2 /ui/Profile-lenker til A3-URL-er i språkfiler(v4-apps)#4203
chore: bytt A2 /ui/Profile-lenker til A3-URL-er i språkfiler(v4-apps)#4203framitdavid wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughPartySelection 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. ChangesParty Selection and Authorization URL Updates
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/features/instantiate/containers/PartySelection.tsx (1)
205-212: 💤 Low valueConsider conditionally passing
paramsbased on the text being displayed.The
paramsarray is passed toLangregardless of which text is displayed, but onlyparty_selection.seeing_this_preferenceuses 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
📒 Files selected for processing (5)
src/features/instantiate/containers/PartySelection.tsxsrc/language/texts/en.tssrc/language/texts/nb.tssrc/language/texts/nn.tstest/e2e/integration/stateless-app/party-selection.ts
|



Oppsummering
instantiate.authorization_error_check_rights: bytterhttps://{0}/ui/Profile/→https://am.ui.{0}/accessmanagement/ui(A3 tilgangsstyring).party_selection.seeing_this_preference: bytter hardkodethttps://altinn.no/ui/Profile→ miljø-bevissthttps://af.{0}/profile/parties, og forenkler brødsmulen til Profil > Aktører (nb) /Aktørar (nn) / Parties (en).
PartySelection.tsx: importerergetHostnameog 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
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit
Release Notes
Documentation
Tests