altinn-studio icon indicating copy to clipboard operation
altinn-studio copied to clipboard

Handle duplicated ids in layout

Open lassopicasso opened this issue 10 months ago • 1 comments

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.

image

Related Issue(s)

  • https://github.com/Altinn/altinn-studio/issues/12635

Verification

  • [x] Your code builds clean without any errors or warnings
  • [x] Manual testing done (required)
  • [x] Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • [ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

lassopicasso avatar Apr 13 '24 10:04 lassopicasso

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.16%. Comparing base (8224da2) to head (e78c285).

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              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 15 '24 14:04 codecov[bot]