-
Notifications
You must be signed in to change notification settings - Fork 70
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: Refactor component script and check if enum contents are numbers #13694
Open
ErlingHauan
wants to merge
10
commits into
main
Choose a base branch
from
13673-changing-header-size-causes-error-message
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: Refactor component script and check if enum contents are numbers #13694
ErlingHauan
wants to merge
10
commits into
main
from
13673-changing-header-size-causes-error-message
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Oct 3, 2024
ErlingHauan
changed the title
fix: Make JSON Schema script check if enum contents are numbers
fix: Make component schema script check if enum contents are numbers
Oct 4, 2024
ErlingHauan
changed the title
fix: Make component schema script check if enum contents are numbers
fix: Make component schema script check if enum contents are numbers - and refactor script
Oct 4, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13694 +/- ##
=======================================
Coverage 94.41% 94.41%
=======================================
Files 1574 1574
Lines 21276 21276
Branches 2541 2541
=======================================
Hits 20088 20088
Misses 943 943
Partials 245 245 ☔ View full report in Codecov by Sentry. |
ErlingHauan
changed the title
fix: Make component schema script check if enum contents are numbers - and refactor script
fix: Make component schema script check if enum contents are numbers and refactor script
Oct 4, 2024
ErlingHauan
force-pushed
the
13673-changing-header-size-causes-error-message
branch
from
October 4, 2024 08:51
23da349
to
6bc116b
Compare
github-actions
bot
added
area/dashboard
Area: Related to the dashboard
solution/studio/repos
Issues related to the Altinn Studio Repos solution (Gitea).
solution/platform
Issues related to Altinn Platform solutions.
quality/testing
Tests that are missing, needs to be created or could be improved.
skip-releasenotes
Issues that do not make sense to list in our release notes
kind/dependencies
Used for issues or pull requests that are dependency updates
area/pdf
labels
Oct 4, 2024
ErlingHauan
force-pushed
the
13673-changing-header-size-causes-error-message
branch
from
October 4, 2024 08:53
6bc116b
to
656843e
Compare
ErlingHauan
removed
area/ui-editor
Area: Related to the designer tool for assembling app UI in Altinn Studio.
area/dashboard
Area: Related to the dashboard
solution/studio/designer
Issues related to the Altinn Studio Designer solution.
solution/studio/repos
Issues related to the Altinn Studio Repos solution (Gitea).
solution/platform
Issues related to Altinn Platform solutions.
quality/testing
Tests that are missing, needs to be created or could be improved.
kind/dependencies
Used for issues or pull requests that are dependency updates
area/pdf
labels
Oct 4, 2024
github-actions
bot
added
the
solution/studio/designer
Issues related to the Altinn Studio Designer solution.
label
Oct 4, 2024
ErlingHauan
added
solution/studio/code
Issues related to DX, coding, debugging and testing locally.
and removed
solution/studio/designer
Issues related to the Altinn Studio Designer solution.
labels
Oct 4, 2024
ErlingHauan
added
area/ui-editor
Area: Related to the designer tool for assembling app UI in Altinn Studio.
and removed
solution/studio/code
Issues related to DX, coding, debugging and testing locally.
labels
Oct 4, 2024
ErlingHauan
changed the title
fix: Make component schema script check if enum contents are numbers and refactor script
fix: Refactor component script and check if enum contents are numbers
Oct 4, 2024
…ps://github.com/Altinn/altinn-studio into 13673-changing-header-size-causes-error-message
github-actions
bot
added
the
solution/studio/designer
Issues related to the Altinn Studio Designer solution.
label
Oct 4, 2024
This was
unlinked from
issues
Oct 4, 2024
This was referenced Oct 4, 2024
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.
frontend
skip-releasenotes
Issues that do not make sense to list in our release notes
solution/studio/designer
Issues related to the Altinn Studio Designer solution.
team/studio-domain2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Functional changes
Previously, when generating JSON Schemas for the components, the script always asserted that enum values were strings.
Now, the script checks the first value of the enum and asserts the type (number or string) based on that.
In addition, the console now logs
definitionName: ComponentNameExternal
instead ofdefinitionName: ComponentName
for v4 components, because that is the actual definition we get the component schemas from.Refactoring
expandRef
utility function to get the external references to v4 components. This improves the quick fix from a couple of weeks ago.writeToFile
function into a new file calledfileUtils.ts
.run.ts
intoschemaUtils.ts
andlanguageUtils.ts
.Related Issue(s)
Verification