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 and refactor referentiel drop_down_options #11370

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

tchak
Copy link
Member

@tchak tchak commented Feb 25, 2025

Les options des types de champ avec un menu déroulant sont accessibles aujourd'hui à travers 4 méthodes :

  • drop_dow_options
  • drop_down_options_with_other
  • options_for_select
  • column.options_for_select

Les deux derniers sont souvent équivalents, sauf sur les champs avec plusieurs colonnes de type enum

Le principal soucies c'est que :

  • drop_dow_options c'est presque toujours une liste de strings sauf des fois une liste de tuples de deux strings
  • drop_down_options_with_other c'est comme drop_dow_options + un tuple de deux strings
  • options_for_select c'est toujours une liste de tuples de deux strings
  • column.options_for_select c'est presque toujours une liste de tuples de deux strings sauf des fois une liste de strings

Dans cette PR j'essaie de rationaliser un peu :

  • drop_dow_options toujours une liste de strings
  • options_for_select_with_other toujours une liste de tuples de deux strings
  • options_for_select toujours une liste de tuples de deux strings
  • column.options_for_select toujours une liste de tuples de deux strings

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 91.48936% with 8 lines in your changes missing coverage. Please review.

Project coverage is 84.09%. Comparing base (0af8002) to head (32ef8cf).

Files with missing lines Patch % Lines
app/models/procedure_revision.rb 50.00% 3 Missing ⚠️
app/models/champs/drop_down_list_champ.rb 92.85% 2 Missing ⚠️
.../administrateurs/groupe_instructeurs_controller.rb 66.66% 1 Missing ⚠️
...descriptor/drop_down_list_champ_descriptor_type.rb 66.66% 1 Missing ⚠️
...els/types_de_champ/drop_down_list_type_de_champ.rb 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #11370       +/-   ##
===========================================
+ Coverage   37.66%   84.09%   +46.42%     
===========================================
  Files        1215     1214        -1     
  Lines       31767    26914     -4853     
  Branches     3595     5131     +1536     
===========================================
+ Hits        11966    22632    +10666     
+ Misses      19801     4282    -15519     

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

@tchak tchak force-pushed the refactor_referentiel_options branch 3 times, most recently from dae0403 to dc5d2f9 Compare February 26, 2025 14:35
@tchak tchak marked this pull request as ready for review February 26, 2025 14:41
@tchak tchak force-pushed the refactor_referentiel_options branch from dc5d2f9 to baede68 Compare February 27, 2025 13:49
@tchak tchak force-pushed the refactor_referentiel_options branch from dbc46af to 32ef8cf Compare February 27, 2025 14:58
@tchak tchak force-pushed the refactor_referentiel_options branch from 32ef8cf to 6cd7bb8 Compare February 27, 2025 16:34
@tchak tchak merged commit bb9b5ae into demarches-simplifiees:main Feb 27, 2025
9 of 14 checks passed
@tchak tchak deleted the refactor_referentiel_options branch February 27, 2025 16:36
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.

2 participants