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 text resource selector to code list editor #14354

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

TomasEng
Copy link
Contributor

@TomasEng TomasEng commented Jan 3, 2025

Description

This pull request adds textResources and onChangeTextResource props to StudioCodeListEditor, so that the user may select and edit text resources in the code list. The props are optional, so that if textResources are not set, the table appears like in the current solution (with regular input fields for the texts). I have not updated the usages of StudioCodeListEditor - I'll leave that to a future pull request. Consequently, this pull request does not change anything in Studio.

image

Related Issue

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 solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Jan 3, 2025
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.65%. Comparing base (ffec39a) to head (e5d7e93).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14354      +/-   ##
==========================================
+ Coverage   95.58%   95.65%   +0.07%     
==========================================
  Files        1869     1871       +2     
  Lines       24237    24285      +48     
  Branches     2786     2788       +2     
==========================================
+ Hits        23167    23231      +64     
+ Misses        814      797      -17     
- Partials      256      257       +1     

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

@TomasEng TomasEng added skip-releasenotes Issues that do not make sense to list in our release notes team/studio-domain1 skip-documentation Issues where updating documentation is not relevant labels Jan 3, 2025
@TomasEng TomasEng marked this pull request as ready for review January 3, 2025 14:27
@standeren standeren self-assigned this Jan 7, 2025
Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

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

Neat 🚀

Btw, I tested it in storybook, and I noticed that when switching to search mode, the column gets larger. Might not happen when we use it in studio tho 🤷

@standeren standeren assigned TomasEng and unassigned standeren Jan 7, 2025
@TomasEng
Copy link
Contributor Author

TomasEng commented Jan 7, 2025

Btw, I tested it in storybook, and I noticed that when switching to search mode, the column gets larger. Might not happen when we use it in studio though

Yes, that's because they use the default width from The Design System. Not sure why it's different. Hopefully it will not be an issue in Studio because the table will have full width.

@TomasEng TomasEng assigned standeren and unassigned TomasEng Jan 7, 2025
@standeren standeren assigned TomasEng and unassigned standeren Jan 7, 2025
@TomasEng TomasEng requested a review from standeren January 9, 2025 14:32
@TomasEng TomasEng assigned standeren and unassigned TomasEng Jan 9, 2025
@standeren standeren removed their assignment Jan 10, 2025
@standeren
Copy link
Contributor

I actually tested this as well, and it works as expected. So we can add the skip-manual-testing label? 😊

@standeren standeren added the skip-manual-testing PRs that do not need to be tested manually label Jan 10, 2025
@standeren standeren merged commit 21c0456 into main Jan 10, 2025
10 checks passed
@standeren standeren deleted the add-text-resource-selector-to-code-list-editor branch January 10, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend skip-documentation Issues where updating documentation is not relevant skip-manual-testing PRs that do not need to be tested manually 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-domain1
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants