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

Wizard: LOCALE - Add Languages drop down (HMS-5151) #2652

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

regexowl
Copy link
Collaborator

@regexowl regexowl commented Dec 6, 2024

Rebased on #2651

This adds a drop down for languages selection. The options are populated with an ouput of localectl list-locales and sorted to display results starting with the search term first.

Also added tests.

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 97.95455% with 9 lines in your changes missing coverage. Please review.

Project coverage is 85.14%. Comparing base (9324a33) to head (d653b28).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...zard/steps/Locale/components/LanguagesDropDown.tsx 91.96% 9 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2652      +/-   ##
==========================================
+ Coverage   84.82%   85.14%   +0.32%     
==========================================
  Files         172      173       +1     
  Lines       19625    20062     +437     
  Branches     1928     1945      +17     
==========================================
+ Hits        16647    17082     +435     
- Misses       2956     2958       +2     
  Partials       22       22              
Files with missing lines Coverage Δ
...ts/CreateImageWizard/steps/Locale/languagesList.ts 100.00% <100.00%> (ø)
...zard/steps/Locale/components/LanguagesDropDown.tsx 92.17% <91.96%> (-7.83%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9324a33...d653b28. Read the comment docs.

@regexowl regexowl changed the title Wizard: Add Languages drop down Wizard: LOCALE - Add Languages drop down (HMS-5151) Dec 6, 2024
@lucasgarfield lucasgarfield force-pushed the locale-languages-dropdown branch from d603dfb to d7ddb4f Compare December 6, 2024 23:45
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [filterValue]);

const sortfn = (a: string, b: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to update this so it uses the reusable utility function. Will take care of it tomorrow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a commit for the reusable function, thank you!

This adds a drop down for languages selection. The options are populated with an ouput of `localectl list-locales` and sorted to display results starting with the search term first.

Also added tests.
This replaces sortfn with a reusable sorting function from utilities.
@lucasgarfield lucasgarfield force-pushed the locale-languages-dropdown branch from de4c408 to d653b28 Compare December 9, 2024 19:49
Copy link
Collaborator

@lucasgarfield lucasgarfield 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!

@lucasgarfield lucasgarfield enabled auto-merge (rebase) December 9, 2024 20:02
@lucasgarfield lucasgarfield merged commit c9efe9e into osbuild:main Dec 9, 2024
7 checks passed
@regexowl regexowl deleted the locale-languages-dropdown branch December 10, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants