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

fix: Simplify autocomplete input for V3 #14262

Merged
merged 7 commits into from
Dec 13, 2024
Merged

Conversation

TomasEng
Copy link
Contributor

@TomasEng TomasEng commented Dec 11, 2024

Description

Replaced the old EditAutocomplete component in the V3 forms editor with a simpler one. This was necessary to remove the use of asChild in our code. The component was also overly complex; a simple NativeSelect should be enough for this field.

Master

Spiller.inn.2024-12-11.134954.mp4

This branch

Spiller.inn.2024-12-11.123718.mp4

Note

Actually, the autocomplete property should support multiple values, so a multiselect combobox would be the most appropriate solution here. But this was not supported in the main branch, so we should create a separate issue to fix that. We also need to check if it is supported by Apps.

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)

@github-actions github-actions bot added solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Dec 11, 2024
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.52%. Comparing base (c6690b7) to head (612e2ba).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14262   +/-   ##
=======================================
  Coverage   95.51%   95.52%           
=======================================
  Files        1826     1829    +3     
  Lines       23786    23775   -11     
  Branches     2757     2754    -3     
=======================================
- Hits        22720    22710   -10     
+ Misses        808      807    -1     
  Partials      258      258           

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

@TomasEng TomasEng force-pushed the simplify-autocomplete-v3 branch from ec37a17 to b080ddd Compare December 11, 2024 12:46
@TomasEng TomasEng marked this pull request as ready for review December 11, 2024 13:19
@TomasEng TomasEng added team/studio-domain1 team/studio-domain2 skip-releasenotes Issues that do not make sense to list in our release notes skip-documentation Issues where updating documentation is not relevant quality/code Violations from current rules for code, best practices, etc. Or just bad code. quality/debt Shortcuts made for saving time. Fixing this will make us more efficient going forward. labels Dec 11, 2024
@standeren standeren self-assigned this Dec 12, 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.

🥳

@standeren standeren assigned TomasEng and unassigned standeren Dec 12, 2024
@standeren
Copy link
Contributor

standeren commented Dec 12, 2024

Tested this locally now and it looks as expected and behaves as expected until I try to unset the property.

I see that when I remove the autocomplete property from a component the autocomplete property is set to an empty string. It is not a huge problem (I suppose), but we should not create unused config in the apps.

Skjermbilde 2024-12-12 kl  15 02 25

@TomasEng
Copy link
Contributor Author

You're right, @standeren. I'll fix the update function so that the property is removed when it receives an empty string.

@TomasEng TomasEng assigned standeren and unassigned TomasEng Dec 12, 2024
@TomasEng TomasEng requested a review from standeren December 12, 2024 14:28
@standeren standeren added the skip-manual-testing PRs that do not need to be tested manually label Dec 13, 2024
@standeren
Copy link
Contributor

Tested again now. Everything works as expected. Added the skip-manual-testing label so we can merge it 🫡

@TomasEng TomasEng merged commit 2345ba1 into main Dec 13, 2024
10 checks passed
@TomasEng TomasEng deleted the simplify-autocomplete-v3 branch December 13, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend quality/code Violations from current rules for code, best practices, etc. Or just bad code. quality/debt Shortcuts made for saving time. Fixing this will make us more efficient going forward. 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 team/studio-domain2
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants