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: Implement StudioCodeListEditor in component edit view #13922

Merged

Conversation

ErlingHauan
Copy link
Contributor

@ErlingHauan ErlingHauan commented Oct 25, 2024

Description

  • Implemented the StudioCodeListEditor component in the "manual" tab. Use &featureFlags=codeListEditor to enable it.
  • Added a custom hook that returns an object with the text keys for StudioCodeListEditor.
  • Added another custom hook that controls the button value in the manual tab.
  • Removed superflous spacing below the options tabs.
  • Reused existing language resources that are not likely to change, and deleted the duplicates.
  • Moved an alert inside the component in the manual tab, since it's only displayed there.

Edit:

  • Made the new modal a fixed size.

Related Issue(s)

Video

Spiller.inn.2024-10-30.155233.mp4

Edit: The modal now has a fixed height.

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)

@ErlingHauan ErlingHauan linked an issue Oct 25, 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. area/dashboard Area: Related to the dashboard application solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Oct 25, 2024
@ErlingHauan ErlingHauan changed the title Implement StudioCodeListEditor in component edit view feat: Implement StudioCodeListEditor in component edit view Oct 25, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 95.28302% with 5 lines in your changes missing coverage. Please review.

Project coverage is 95.20%. Comparing base (4c57f46) to head (f00e7d5).

Files with missing lines Patch % Lines
...ig/editModal/EditOptions/OptionTabs/OptionTabs.tsx 89.65% 1 Missing and 2 partials ⚠️
...OptionTabs/EditManualOptions/EditManualOptions.tsx 92.85% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13922      +/-   ##
==========================================
- Coverage   95.20%   95.20%   -0.01%     
==========================================
  Files        1740     1747       +7     
  Lines       22828    22876      +48     
  Branches     2672     2676       +4     
==========================================
+ Hits        21733    21778      +45     
- Misses        849      850       +1     
- Partials      246      248       +2     

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

@ErlingHauan ErlingHauan marked this pull request as ready for review October 30, 2024 15:00
Copy link
Contributor

@TomasEng TomasEng left a comment

Choose a reason for hiding this comment

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

Dette er veldig bra. EditOptions begynner å bli ganske stor og kompleks. Hva tenker du om å benytte anledningen til å rydde opp der?

Ellers lurer jeg på om det er nødvendig å bruke debounce her. Det er mulig jeg tar feil, men så vidt jeg vet er dette allerede satt opp på et høyere nivå, og da bør det være tilstrekkelig. Hvis det likevel er nødvendig, ville jeg satt opp Timer Mocks i testene for å unngå at de bare står og venter.

Ellers må du gjerne gå over funksjonene du har laget og sette på returtyper. Dette er en regel vi egentlig burde hatt linting på, men vi har ikke satt det opp fordi det er så mye gammel kode som ikke følger regelen.

@ErlingHauan ErlingHauan requested a review from TomasEng November 4, 2024 14:51
@ErlingHauan ErlingHauan added the text/content used for issues that need som text improvements, often by ux label Nov 5, 2024
@Ildest Ildest self-assigned this Nov 5, 2024
Copy link
Contributor

@Ildest Ildest left a comment

Choose a reason for hiding this comment

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

Reviewed texts with a couple of suggestions

@Ildest Ildest removed their assignment Nov 5, 2024
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.

Tested OK! 🚀

@Ildest Ildest enabled auto-merge (squash) November 8, 2024 11:59
@ErlingHauan ErlingHauan disabled auto-merge November 8, 2024 12:09
Copy link
Contributor

@Ildest Ildest left a comment

Choose a reason for hiding this comment

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

All good

@ErlingHauan ErlingHauan merged commit 139ddbd into main Nov 8, 2024
3 checks passed
@ErlingHauan ErlingHauan deleted the 13505-implement-studiocodelisteditor-in-component-edit-view branch November 8, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard Area: Related to the dashboard application 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. text/content used for issues that need som text improvements, often by ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement StudioCodelistEditor in component edit view
4 participants