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: Generate unique pointer correctly #13635

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Conversation

TomasEng
Copy link
Contributor

@TomasEng TomasEng commented Sep 25, 2024

Description

The newly introduced uniquePointer concept, which generates a unique ID for each node in the tree view, does not take combinations into account, which leads to errors. This pull request adds an extractCategoryFromPointer function that basically returns the part of the pointer that comes before the name (properties, anyOf etc.). This function is then used to generate the unique pointer correctly.

Steps to reproduce the bug

  1. Create a new datamodel or open an existing one in the data modelling tool
  2. Add a combination node to the root
  3. Convert the new node to a type
  4. Open the new type, either from the type button or from the type panel on the left
  5. Add a child node to the type
  6. Click on the child node and see that an error appears
Spiller.inn.2024-09-25.131013.mp4

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)

@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 Sep 25, 2024
@TomasEng TomasEng added kind/bug Used when there is a defect / something is not working as it should. added-to-sprint labels Sep 25, 2024
@TomasEng TomasEng force-pushed the fix-unique-pointer-generation branch from 202ede1 to f394132 Compare September 25, 2024 11:00
@TomasEng TomasEng force-pushed the fix-unique-pointer-generation branch from f394132 to 8c678bc Compare September 25, 2024 11:01
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.24%. Comparing base (034c44d) to head (e0a91c6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13635   +/-   ##
=======================================
  Coverage   95.23%   95.24%           
=======================================
  Files        1502     1502           
  Lines       20567    20582   +15     
  Branches     2492     2493    +1     
=======================================
+ Hits        19588    19603   +15     
  Misses        869      869           
  Partials      110      110           

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

@TomasEng TomasEng marked this pull request as ready for review September 25, 2024 11:13
@ErlingHauan ErlingHauan self-assigned this Sep 25, 2024
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.

Nicely done 🚀

@ErlingHauan ErlingHauan removed their assignment Sep 25, 2024
@framitdavid framitdavid self-assigned this Sep 25, 2024
@framitdavid
Copy link
Collaborator

tested on localhost, tested OK.

@framitdavid framitdavid assigned TomasEng and unassigned framitdavid Sep 25, 2024
@TomasEng TomasEng merged commit 714001c into main Sep 25, 2024
10 checks passed
@TomasEng TomasEng deleted the fix-unique-pointer-generation branch September 25, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added-to-sprint area/data-modeling Area: Related to data models - e.g. create, edit, use data models. frontend kind/bug Used when there is a defect / something is not working as it should. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants