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: add SubForm component #13564

Merged

Conversation

standeren
Copy link
Contributor

@standeren standeren commented Sep 17, 2024

Description

Add SubFrom component but hide it in component-list behind featureFlag.

If an app should have a subform component i the layout added manually the config will show, but, since Team Apps have not released the component yet any potential apps that have this component are using it for test-purposes.
When Team Apps release the component we should include the featureflag for the new config that we create.

Skjermbilde 2024-09-18 kl  13 12 52

@Annikenkbrathen Currently used the ClipBoard icon from Aksel Icons. But we can adapt it later.

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)

@standeren standeren linked an issue Sep 17, 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. labels Sep 17, 2024
@standeren standeren changed the title Add SubForm component feat: add SubForm component Sep 17, 2024
@standeren standeren force-pushed the 13477-support-to-drop-drag-for-subform-component-in-studio branch from 95d3084 to 5d51cce Compare September 17, 2024 13:57
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.17%. Comparing base (a5b89eb) to head (fca2c45).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...tend/packages/ux-editor/src/data/formItemConfig.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13564      +/-   ##
==========================================
- Coverage   95.18%   95.17%   -0.01%     
==========================================
  Files        1470     1470              
  Lines       20235    20237       +2     
  Branches     2448     2449       +1     
==========================================
+ Hits        19260    19261       +1     
  Misses        870      870              
- Partials      105      106       +1     

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

@standeren standeren marked this pull request as ready for review September 18, 2024 11:13
@lassopicasso
Copy link
Contributor

starting review

@standeren standeren force-pushed the 13477-support-to-drop-drag-for-subform-component-in-studio branch from 18e5995 to e58530f Compare September 19, 2024 05:56
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.

Great work! 💪 I like how you've used the .filter(Boolean) technique to conditionally display the SubForm.

I have one comment below, and I’m also curious about how the new text keys, e.g. ux_editor.component_properties.summaryDelimiter, are being used. Could you provide some context on that?

@standeren
Copy link
Contributor Author

standeren commented Sep 19, 2024

Great work! 💪 I like how you've used the .filter(Boolean) technique to conditionally display the SubForm.

I have one comment below, and I’m also curious about how the new text keys, e.g. ux_editor.component_properties.summaryDelimiter, are being used. Could you provide some context on that?

It is a new property added for the subFrom-component. So we are able to render it with our autogenerated config since it is type: string, but we do not have a text for it from before 🤗 And it is used as described in the helpText:
"The value used to separate cells/elements in a summary view where rich layout is not available. Typically a comma, dash or similar."

We definetly should add translations for these, but I think there is a separate issue for that!

Skjermbilde 2024-09-19 kl  08 11 51

@lassopicasso
Copy link
Contributor

It is a new property added for the subFrom-component. So we are able to render it with our autogenerated config since it is type: string, but we do not have a text for it from before 🤗

Thx for the explanation, @standeren ! I'm not that used to the autogenerated config 😄

@standeren standeren force-pushed the 13477-support-to-drop-drag-for-subform-component-in-studio branch from e58530f to fca2c45 Compare September 19, 2024 07:01
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.

Nice solved with the updated test, @standeren 💪

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.

Tested OK with and without feature flag 😊

@standeren standeren merged commit 3d30a92 into main Sep 20, 2024
16 of 17 checks passed
@standeren standeren deleted the 13477-support-to-drop-drag-for-subform-component-in-studio branch September 20, 2024 06:44
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. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support to drop & drag for SubForm component in Studio
3 participants