-
Notifications
You must be signed in to change notification settings - Fork 92
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
ETQ admin : je peux ordonner les labels #11237
Conversation
cf0566f
to
ae8fbc6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11237 +/- ##
==========================================
- Coverage 84.41% 83.91% -0.51%
==========================================
Files 1202 1202
Lines 26416 26433 +17
Branches 4974 4974
==========================================
- Hits 22298 22180 -118
- Misses 4118 4253 +135 ☔ View full report in Codecov by Sentry. |
cbdf9fa
to
f7e42af
Compare
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.
J'ai une contre proposition:
dans procedure.rb
, tu modifies la relation has_many :label ...
par has_many :label, -> { order(:position, :id) } ...
De cette façon, les labels seront toujours ordonnés de la mm manière mm si aucune position n'est renseignée.
Du coup, tu devrais pouvoir shooter tout le code qui remplit une position par défaut et aussi les labels.order(:position)
disséminés dans le code.
WDYT ?
f7e42af
to
e389a19
Compare
yes, bonne idée! merci ;) |
e389a19
to
737f536
Compare
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.
yes !
737f536
to
307b333
Compare
.fr-table.fr-table--lg | ||
.fr-table__wrapper | ||
.fr-table__container | ||
.fr-table__content | ||
%table | ||
%caption Liste des labels |
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.
J'arrive après la bataille mais c'est dommage de retirer la caption en faveur d'un titre ! (on devrait en avoir sur toutes nos tables, en tout cas dès qu'on a une exigence en accessibilité, ce qui certes est un peu plus discutable côté admin)
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.
yep ... j'ai eu la discussion avec Marlène et Lisa.
En fait, la contrainte d'avoir le bouton "personnaliser" aligné horizontalement avec le titre initialement dans caption n'était pas compatible (j'ai tenté plusieurs astuces en vain) sur l'idée de disposer en justify-between. Il y a un comportement JS propre à caption qui ramène à gauche tout ce qui se trouve dans cette balise, malgré les class qui vont bien.
Et en effet toutes les autres tables qui ont dans l'esprit plusieurs éléments là où l'on a le titre du tableau, n'ont pas/plus de balise caption.
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.
Dans le cas ici, et d'autres tableaux "simples", sous couvert de Marlène, on pourrait avoir un équilibre access/UX en acceptant de décaler verticalement. En revanche pour des tableaux plus complexes, comme le suivi instructeur des dossiers, ça paraît plus complexe
issue: #11116
Résultat :

1- L'admin peut ordonner les labels :
2- Les instructeurs ont ainsi le même ordre dans :