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(dh): add input to sort dropdown entries by translation key order #3649

Merged
merged 22 commits into from
Oct 21, 2024

Conversation

ManBearTM
Copy link
Contributor

@ManBearTM ManBearTM commented Oct 21, 2024

This PR changes the dhDropdownTranslator to use the order of the translation keys to sort the dropdown options. It is still possible to sort the options by name (ASC or DESC) by using the sortDirection input. But this change means that the order of the options (or source enum) is never considered when using dhDropdownTranslator. This in turn made the sort parameter of dhEnumToWattDropdownOptions have no effect when used alongside dhDropdownTranslator. I decided to remove that feature from dhEnumToWattDropdownOptions, as I believe it leads to incorrect sorting anyway (it is not sorted by the translated text, but by enum values). Instead, use sortDirection which considers the translated text, or for non-alphabetical sorting, order the translations accordingly in the translation files.

Copy link

nx-cloud bot commented Oct 21, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 06feeab. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

dzhavat
dzhavat previously approved these changes Oct 21, 2024
mimse
mimse previously approved these changes Oct 21, 2024
dzhavat
dzhavat previously approved these changes Oct 21, 2024
@ManBearTM ManBearTM enabled auto-merge (squash) October 21, 2024 12:59
@ManBearTM ManBearTM merged commit a593555 into main Oct 21, 2024
33 checks passed
@ManBearTM ManBearTM deleted the feat/dropdown-translator-sort-by-translation-keys branch October 21, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants