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

feat: 13928 add data model binding for subfrom #13961

Merged
merged 16 commits into from
Nov 8, 2024

Conversation

JamalAlabdullah
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah commented Oct 31, 2024

Description

  • Added anew componenet called SubformDataModelSelect that render StudioNativeSelect to the recommendedAction card to choose the datamodel that will be binded to the created subform.
  • Added tests

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).
Screen.Recording.2024-11-08.at.12.51.44.mov

@JamalAlabdullah JamalAlabdullah linked an issue Oct 31, 2024 that may be closed by this pull request
@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. frontend labels Oct 31, 2024
@JamalAlabdullah JamalAlabdullah changed the title Feat/13928 add data model binding for subfrom feat:13928 add data model binding for subfrom Oct 31, 2024
@JamalAlabdullah JamalAlabdullah changed the title feat:13928 add data model binding for subfrom feat: 13928 add data model binding for subfrom Oct 31, 2024
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (95a0859) to head (009f125).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13961      +/-   ##
==========================================
- Coverage   95.21%   95.21%   -0.01%     
==========================================
  Files        1713     1714       +1     
  Lines       22586    22603      +17     
  Branches     2641     2643       +2     
==========================================
+ Hits        21506    21521      +15     
- Misses        834      836       +2     
  Partials      246      246              

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

@mlqn mlqn self-requested a review November 4, 2024 11:10
@JamalAlabdullah JamalAlabdullah requested a review from mlqn November 5, 2024 11:58
Copy link
Contributor

@mlqn mlqn left a comment

Choose a reason for hiding this comment

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

Nice work! 🚀

Copy link
Contributor

@lassopicasso lassopicasso 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! However, the create button for a new subform needs to be disabled until both the name and data model are selected. A subform need to be linked to a data model 🙂

Also, when selecting a data model for the subform, the preview shows an error saying the selected data model is not valid. Is there a separate issue for that, or should the data model selector in this PR handle this with only display valid data models for subform?
@lassopicasso I am not sure about this error in preview , i could not find it when i select between datatype modell

@lassopicasso
Copy link
Contributor

lassopicasso commented Nov 8, 2024

@lassopicasso I am not sure about this error in preview , i could not find it when i select between datatype modell

The error in the preview from the main layout set appears when you create a new subform linked to a data model.

image

Otherwise, the code looks good, and I have verified that the button is disabled. If you decide not to address this issue in this PR, could you please raise it with the rest of our domain group? 🙂 This might be something that will be handled in a separate issue, but I couldn't find an existing one, so perhaps a new issue should be created if that's the case.

I approve this for now, so feel free to merge it if you don't plan to address this in this issue. 🙂

Edit: @Jondyr will perhaps this PR: #13985 fix this issue?

Copy link
Contributor

@lassopicasso lassopicasso left a comment

Choose a reason for hiding this comment

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

See comment above 🙂

@Jondyr
Copy link
Member

Jondyr commented Nov 8, 2024

@lassopicasso I am not sure about this error in preview , i could not find it when i select between datatype modell

The error in the preview from the main layout set appears when you create a new subform linked to a data model.

image

Otherwise, the code looks good, and I have verified that the button is disabled. If you decide not to address this issue in this PR, could you please raise it with the rest of our domain group? 🙂 This might be something that will be handled in a separate issue, but I couldn't find an existing one, so perhaps a new issue should be created if that's the case.

I approve this for now, so feel free to merge it if you don't plan to address this in this issue. 🙂

Edit: @Jondyr will perhaps this PR: #13985 fix this issue?

No, #13985 will not affect this. This is likely because of the applogic parameter "alllowedInSubform" not being set to true. Which apps should remove soon, as stated by @nkylstad . So from my understanding, we just have to wait for this one to be updated on app-frontend

@lassopicasso
Copy link
Contributor

No, #13985 will not affect this. This is likely because of the applogic parameter "alllowedInSubform" not being set to true. Which apps should remove soon, as stated by @nkylstad . So from my understanding, we just have to wait for this one to be updated on app-frontend

Thanks for the explanation, and I’m sorry to disturb you on your day off 😄

I merge this then, @JamalAlabdullah 🙂

@lassopicasso lassopicasso merged commit 4c57f46 into main Nov 8, 2024
10 checks passed
@lassopicasso lassopicasso deleted the feat/13928-add-data-model-binding-for-subfrom branch November 8, 2024 11:05
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 solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat/add data model binding for subfrom
4 participants