-
Notifications
You must be signed in to change notification settings - Fork 100
WIP: Un autre arbre #12123
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
Open
LeSim
wants to merge
23
commits into
main
Choose a base branch
from
another_dossier_tree
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
WIP: Un autre arbre #12123
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12123 +/- ##
=======================================
Coverage 89.54% 89.55%
=======================================
Files 1331 1332 +1
Lines 30142 30147 +5
Branches 6308 6298 -10
=======================================
+ Hits 26992 26997 +5
Misses 3150 3150 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e27477a
to
c200b5e
Compare
6d77d3a
to
8ccd562
Compare
- beware of changing type (integer -> text) nullify some champs which are not added to discarded because they are still present - but with the restriction of only changing to compatible type, it should not happen - section to finish (same principle)
75785f6
to
6593d1e
Compare
- rename to link_parent_children! - also drop discarded tree, as it is complicated - remove extra class Row, and use Repetition instead as it is wrongly used to materialize row in db
6593d1e
to
54188ab
Compare
54188ab
to
1bbc102
Compare
1bbc102
to
16a6221
Compare
… remove restriction on champs_on_main_stream
tchak
reviewed
Oct 14, 2025
in repetition if head.repetition? | ||
rows = row_ids(repetition).map do |row_id| | ||
repetition_champ = champs | ||
.filter { it.type == 'Champs::RepetitionChamp' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
.filter { it.type == 'Champs::RepetitionChamp' } | |
.filter(&:row?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Constat: il est aujourd'hui difficile de conditionner une section de formulaire.
Pour savoir si un champ est visible on doit vérifier les parents, et il n'est pas facile de trouver une section parente aujourd'hui.
Proposition : on relie en mémoire les champs entre eux par des méthodes (
children
,parent
). Le code se situe danslink_parent_and_children!
Ainsi, il devient trivial de faire un
def visible? = parent.visible? && conditional.compute
(champ_conditional_concern.rb)Ce qui marche à la fois pour l'affichage et pour la validation (on ne valide pas un champ caché)
Bonus :
section
,repetition
,row
deviennent beaucoup plus simple car ils n'ont plus besoin de récursivité pour construire l'arbrePLAN :
idéalement, il faudrait dérouler par étape
link_parent_and_children
pour la lecturePar ailleurs:
champs
->db_champs
et ajout dedef champ(revision: nil)
qui accède aux champs en arbreRepetitionRow
, aujourd'hui les rows sont représentés en base par desRepetitionChamp
, ce qui n'est pas topRevisionTypeDeChamp
pour être construit et c'est une données quasi static, voir si on a des pbs de perf / besoin de cacheRevisionTypeDeChamp
ce qui permettrait de faire des sommaires sans dossier fictif