-
Notifications
You must be signed in to change notification settings - Fork 31
Comments
Conversation
📝 WalkthroughWalkthroughDocument list ordering is now conditional on backend capability: a new version check (altinnNugetVersion) determines whether to trust backend ordering or apply client-side filename sorting. Added versioning utility, updated hook signature and component usage, and expanded tests to cover both ordering behaviours. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick 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. Comment |
761347f to
e4683f5
Compare
Quality Gate Failed Quality Gate failed
Failed conditions
0.0% Coverage on New Code (required ≥ 45%)
@olemartinorg
olemartinorg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App-frontend has to be backwards-compatible for all versions down to (and including) v8.0.0. Even if sorting now is done backend, I don't think we can remove it from the frontend? In case the sorting is different on backend vs. frontend, we either would have to introduce an opt-out config, or delay this change to the next major version.
If you want to delay this to the next major version only, open a PR in the monorepo instead: https://github.com/Altinn/altinn-studio/tree/main/src/App/frontend
bjorntore
commented
Oct 13, 2025
App-frontend has to be backwards-compatible for all versions down to (and including) v8.0.0. Even if sorting now is done backend, I don't think we can remove it from the frontend? In case the sorting is different on backend vs. frontend, we either would have to introduce an opt-out config, or delay this change to the next major version.
If you want to delay this to the next major version only, open a PR in the monorepo instead: https://github.com/Altinn/altinn-studio/tree/main/src/App/frontend
Is it easy to check what backend version the frontend is talking to, and sort in frontend if it's before the backend release related to this? Or is that a bad idea?
We're also considering having some flag in the response to tell the frontend to skip sorting, but feels like a hack tbh.
olemartinorg
commented
Oct 13, 2025
Is it easy to check what backend version the frontend is talking to, and sort in frontend if it's before the backend release related to this?
Yup, that would work. Look in src/utils/versioning/versions.ts for that functionality. Beware that we need both the major.minor.patch version (8.X.X) and the build version. So the functionality needs to arrive in an app-lib-dotnet release before we can know for sure which version sorts this on the backend.
bjorntore
commented
Oct 15, 2025
Is it easy to check what backend version the frontend is talking to, and sort in frontend if it's before the backend release related to this?
Yup, that would work. Look in
src/utils/versioning/versions.tsfor that functionality. Beware that we need both the major.minor.patch version (8.X.X) and the build version. So the functionality needs to arrive in an app-lib-dotnet release before we can know for sure which version sorts this on the backend.
Is it a fair solution in your opinion? Or should we rethink even more?
olemartinorg
commented
Oct 15, 2025
I think that's a good enough solution. In v5/next we'll remove that code anyway, as the dynamics of frontend/backend compatibility there will work differently.
e4683f5 to
7606e48
Compare
Quality Gate Failed Quality Gate failed
Failed conditions
1 Security Hotspot
Uh oh!
There was an error while loading. Please reload this page.
Sorting is done on the backend in Altinn/app-lib-dotnet#1511
Description
Remove the sorting of the rows in SigningDocumentList. Sorting is done on the backend in Altinn/app-lib-dotnet#1511.
Related Issue(s)
Verification/QA
feat: change signing data elements ordering altinn-studio-docs#2408
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit
New Features
Bug Fixes
Tests