Skip to content
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

12634 implement validation across layouts when loading layout set with modal warning user of the issue #12988

Conversation

JamalAlabdullah
Copy link
Contributor

Description

  • Added validation to check if there are duplicated IDs across layouts.
  • Added a new component for a modal that shows the warning message in case there is duplication.
  • Added related tests.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • 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)

@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Jun 19, 2024
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.80%. Comparing base (d2e9f4e) to head (05cfb6a).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12988      +/-   ##
==========================================
+ Coverage   91.78%   91.80%   +0.01%     
==========================================
  Files        1400     1402       +2     
  Lines       19827    19859      +32     
  Branches     2388     2390       +2     
==========================================
+ Hits        18199    18231      +32     
  Misses       1371     1371              
  Partials      257      257              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…ation-across-layouts-when-loading-layout-set-with-modal-warning-user-of-the-issue
@ErlingHauan ErlingHauan self-requested a review June 20, 2024 08:34
Copy link
Contributor

@ErlingHauan ErlingHauan left a comment

Choose a reason for hiding this comment

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

Nice work! This makes it easy for the user to find the errors and correct them. I like it a lot 😄

I have added some comments down below 😊

@ErlingHauan
Copy link
Contributor

One more thing: Can you make the components with the duplicate IDs display the red/danger color, as shown here?

image

@Annikenkbrathen
Copy link

Annikenkbrathen commented Jun 24, 2024

One more thing: Can you make the components with the duplicate IDs display the red/danger color, as shown here?
image

We worked on a similar design on the issue @lassopicasso worked on. I agree that we should mark the accordion that contains this conflict red. And if possible, mark the relevant components red aswell. In Lars's issue we decided to add a red background to the config that contains errors. So for now, maybe just add a red bakcround on the component (without spending time on making the icon and the red stroke) until we design the error pattern for Studio in general.

And use the error validation from the designs system on the datamodel config
Skjermbilde 2024-06-24 kl  11 23 29
https://storybook.designsystemet.no/?path=/story/komponenter-nativeselect--error

image

And double-check that you have the same red color

@github-actions github-actions bot added the area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). label Jun 26, 2024
…ation-across-layouts-when-loading-layout-set-with-modal-warning-user-of-the-issue
Copy link
Contributor

@ErlingHauan ErlingHauan left a comment

Choose a reason for hiding this comment

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

Nice work! 🚀

Copy link
Contributor

@ErlingHauan ErlingHauan left a comment

Choose a reason for hiding this comment

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

Nice work! 🚀

@JamalAlabdullah JamalAlabdullah merged commit f2657c2 into main Jun 27, 2024
11 checks passed
@JamalAlabdullah JamalAlabdullah deleted the 12634-implement-validation-across-layouts-when-loading-layout-set-with-modal-warning-user-of-the-issue branch June 27, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement validation across layouts when loading layout-set, with modal warning user of the issue.
4 participants