-
Notifications
You must be signed in to change notification settings - Fork 71
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
Update data model selection in component config #12949
Merged
lassopicasso
merged 53 commits into
main
from
update-data-model-selection-in-component-config
Jul 16, 2024
Merged
Update data model selection in component config #12949
lassopicasso
merged 53 commits into
main
from
update-data-model-selection-in-component-config
Jul 16, 2024
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
…in datamodel + other changes
github-actions
bot
added
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.
labels
Jun 12, 2024
… `property` it is named `field`
github-actions
bot
added
the
quality/testing
Tests that are missing, needs to be created or could be improved.
label
Jul 4, 2024
This was
linked to
issues
Jul 8, 2024
lassopicasso
added
area/data-modeling
Area: Related to data models - e.g. create, edit, use data models.
and removed
area/process
Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc).
labels
Jul 8, 2024
standeren
requested changes
Jul 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frontend/app-development/hooks/mutations/useDeleteDataModelMutation.ts
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/Properties/DataModelBindings.test.tsx
Outdated
Show resolved
Hide resolved
...editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx
Outdated
Show resolved
Hide resolved
...editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx
Outdated
Show resolved
Hide resolved
...ages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditDataModelBinding.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/hooks/queries/useDataModelMetadataQuery.ts
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/hooks/useValidDataModels.test.ts
Outdated
Show resolved
Hide resolved
…ps://github.com/Altinn/altinn-studio into update-data-model-selection-in-component-config
standeren
approved these changes
Jul 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 🎉
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.
area/ui-editor
Area: Related to the designer tool for assembling app UI in Altinn Studio.
quality/testing
Tests that are missing, needs to be created or could be improved.
solution/studio/designer
Issues related to the Altinn Studio Designer solution.
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
This PR introduces support for two formats of data model binding in config:
dataType
andfield
.For now, the new format is behind a feature flag,
multipleDataModelsPerTask
. Once this flag is removed, changes to data model bindings will always be saved in the new format.With the feature flag enabled, users can select both the data model and the specific property of the data model bindings in the configuration of the selected component.
Additionally, validation has been added to handle cases where a data model or a data model field binding no longer exists. In both cases, the data model field will fall back to a dummy option with an empty string. If the data model itself no longer exists, it will fall back to the default data model.
Refactoring
editDataModelBinding.
Additional
Added/updated unit tests and playwright tests
Note
A new file,
SelectDataFieldBinding.tsx
, has been created for logic related to data field binding. This decision was made because the existingSelectDataFieldComponent
file was difficult to work with due to its linkage to deprecated "rule for calculations" code. The existing file is expected to be removed in issue #13027 or later on.Related Issue(s)
Verification