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

Make sure selectedLayoutSet is an existing one in layoutsets before rendering ux-editor #12566

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

standeren
Copy link
Contributor

Description

If editing a page in a layoutset that has been deleted we get error in ux-editor.
It can be tested by adding a custom receipt (or any other new layout set in teory), go to app-dev page, and back to process and delete local changes. Going to app-dev page again will result in errors.

This PR updates the selected layout set to the first in the set if the currently selected one does not exist. OBS: only possible to do this change for v4 since these apps require layoutsets.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)

@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 Mar 21, 2024
@standeren standeren force-pushed the set-initial-layoutset-to-an-existing branch 3 times, most recently from bd28f70 to 3db11cb Compare March 22, 2024 07:07
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.68%. Comparing base (cb2f905) to head (83a73a8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12566      +/-   ##
==========================================
+ Coverage   88.67%   88.68%   +0.01%     
==========================================
  Files        1288     1288              
  Lines       18513    18514       +1     
  Branches     2265     2265              
==========================================
+ Hits        16417    16420       +3     
+ Misses       1835     1834       -1     
+ Partials      261      260       -1     

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

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM 😄

@standeren standeren force-pushed the set-initial-layoutset-to-an-existing branch from 3db11cb to 83a73a8 Compare April 4, 2024 09:11
@standeren standeren merged commit f68040e into main Apr 4, 2024
11 checks passed
@standeren standeren deleted the set-initial-layoutset-to-an-existing branch April 4, 2024 10:04
Jondyr pushed a commit that referenced this pull request Jun 10, 2024
…endering ux-editor (#12566)

* Make sure selectedLayout is an existing one in layoutsets before rendering ux-editor

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant