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(drop_down_list): fix other option with combobox and some cleanup #9651

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

tchak
Copy link
Member

@tchak tchak commented Oct 27, 2023

No description provided.

@tchak tchak added the bug label Oct 27, 2023
@what-the-diff
Copy link

what-the-diff bot commented Oct 27, 2023

PR Summary

  • Optimization of drop_down_list_component.rb Method
    The contains_long_option? method will now utilize @champ.enabled_non_empty_options rather than @champ.options.

  • Improvements in Dropdown Selection in drop_down_list_component.html.haml
    The textual content "Autre" has been replaced with t('shared.champs.drop_down_list.other'). Additionally, the render method for Dsfr::ComboboxComponent now factors in the other: true option in @champ.enabled_non_empty_options.

  • Modification in combobox.ts Method
    The _render method will now invoke Action.Update when the combobox is left open.

  • Code Cleanup in champ.rb, drop_down_list_champ.rb, and multiple_drop_down_list_champ.rb
    The options method has been eliminated from the mentioned files. The enabled_non_empty_options method can now handle the other parameter, which is a more efficient and flexible approach.

  • Enhanced Routing Rule Evaluation in groupe_instructeur.rb
    The routing_rule_matches_tdc? method will now use the improved routing_tdc.drop_down_list_enabled_non_empty_options(other: true) instead of the old routing_tdc.options_with_drop_down_other.

  • Improved Options Handling Method in champ_value.rb
    The method dealing with options will now use tdc.drop_down_list_enabled_non_empty_options(other: true) and is capable of handling both single and array values.

  • Update to type_de_champ.rb Method
    The method drop_down_list_enabled_non_empty_options is now equipped to accept other parameters. The old options_with_drop_down_other method has been removed.

  • Addition of New Translation for "Other" Option
    A new translation for the "Other" option, denoted by shared.champs.drop_down_list.other, was introduced in the locale files. This replaces the old label "Autre", enhancing the user interface across different languages.

Copy link
Member

@colinux colinux left a comment

Choose a reason for hiding this comment

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

OK (au passage j'ai vu un pb d'alignement du champ other qui n'a rien à voir avec cette PR que je vais corriger)

@tchak tchak added this pull request to the merge queue Oct 30, 2023
Merged via the queue into demarches-simplifiees:main with commit f95bd74 Oct 30, 2023
15 checks passed
@tchak tchak deleted the fix-select-other branch October 30, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants