-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle duplicated ids in layout #12665
Conversation
…color on accordion header and sectionHeader
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12665 +/- ##
==========================================
+ Coverage 90.13% 90.16% +0.02%
==========================================
Files 1301 1304 +3
Lines 18629 18673 +44
Branches 2265 2268 +3
==========================================
+ Hits 16792 16837 +45
+ Misses 1578 1577 -1
Partials 259 259 ☔ View full report in Codecov by Sentry. |
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.
Lots of great work done! 👏 😄
I've added some comments
frontend/packages/ux-editor/src/components/Properties/PageConfigPanel/PageConfigPanel.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/containers/DesignView/DesignView.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/containers/DesignView/DesignView.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/containers/DesignView/FormLayout.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/containers/DesignView/FormLayoutWarning.module.css
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/containers/DesignView/FormLayoutWarning.tsx
Show resolved
Hide resolved
frontend/packages/ux-editor/src/containers/DesignView/PageAccordion/PageAccordion.module.css
Outdated
Show resolved
Hide resolved
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.
Great job! 👏 🎉
* enable layout with duplicated ids to return * display error if the layout contains duplicated ids * some adjustments of styling in accordion header * Display duplicated ids in the warning message * Add warning content in accordion when duplicated ids * add content to configWarning ++ * add endpoint for the specific layout in gitea * open link in new window * resize to small for list items + update text * move pageconfig warning content to a separated file * Make sure duplicated ids only display once * add text to text resources * change alert with sectionHeader, add new icon, keep the same warning color on accordion header and sectionHeader * remove comments * let isValid prop be optional * Remove some text * fix some tests + add objectutils test for flattenObjectValues * Add tests in pageConfigPanel * add tests to new formlayout utilities * add test to formlayout * fix text * feedback - change naming of text resources * replace @navikt/aksel-icons imports with @studio/icons in whole project * remove duplicated import of @studio-icons * feedbacks
Description
When layout edits are made manually, resulting in components or containers with duplicate IDs, the layout doesn't display in Altinn Studio without any clear warning to the user except for a message in the console.
To improve this, implemented a feature that notifies users within Altinn Studio about the issue. Users will now receive a specific message identifying the duplicated IDs and directing them to resolve the issue in Gitea. This message includes step-by-step instructions and a link that opens the layout file in Gitea (in a new tab) for immediate correction.
Related Issue(s)
Verification
Documentation