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

fix: root header doesn't display when there are no elements #13439

Merged
merged 7 commits into from
Sep 6, 2024

Conversation

lassopicasso
Copy link
Contributor

@lassopicasso lassopicasso commented Aug 29, 2024

Description

Removed the logic that returned null when schemaModel.isEmpty() was true, as it blocked rendering the root header when only the root element was present. This check, along with the associated method and tests, has been removed.

Fixed a race condition that occurred after this removal by adding setQueryData for user info, ensuring the cache is ready since user info is fetched at a higher level in PageLayout.tsx.

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/data-modeling Area: Related to data models - e.g. create, edit, use data models. solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Aug 29, 2024
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.74%. Comparing base (957f1cb) to head (ac85f5d).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13439      +/-   ##
==========================================
- Coverage   93.74%   93.74%   -0.01%     
==========================================
  Files        1446     1446              
  Lines       20030    20028       -2     
  Branches     2429     2428       -1     
==========================================
- Hits        18778    18776       -2     
  Misses       1004     1004              
  Partials      248      248              

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

@lassopicasso lassopicasso marked this pull request as ready for review August 29, 2024 13:24
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah left a comment

Choose a reason for hiding this comment

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

Looks good and it works as expected😊

@lassopicasso lassopicasso changed the title Fix/root header doesn't display when there are no elements Fix: root header doesn't display when there are no elements Sep 4, 2024
@lassopicasso lassopicasso changed the title Fix: root header doesn't display when there are no elements fix: root header doesn't display when there are no elements Sep 4, 2024
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah left a comment

Choose a reason for hiding this comment

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

Looks good 😊

@mlqn
Copy link
Contributor

mlqn commented Sep 6, 2024

Tested OK in dev! 💯 I just noticed that a generic error is displayed when we try to generate the model, but this will be fixed by this issue: #11037

error.mov

@mlqn mlqn merged commit 61e0ab2 into main Sep 6, 2024
17 checks passed
@mlqn mlqn deleted the fix/root-header-display-without-elements branch September 6, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/data-modeling Area: Related to data models - e.g. create, edit, use data models. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data model - Root header disappears when all elements are deleted
3 participants