-
Notifications
You must be signed in to change notification settings - Fork 91
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 usager je vois les infos de contact de mon groupe instructeur avant dépôt du dossier, une fois le(s) champ(s) de routage rempli(s) #10430
Merged
+51
−30
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f860745
feat(routing): route when autosave of champ used by routing rules
E-L-T f30057e
feat(routing): replace contact information with turbo_stream
E-L-T 78d1572
test(routing): test routing on autosave
E-L-T e413c08
chore(routing): update turbo stream only if champ used by routing rul…
E-L-T a04749c
fix a flaky test
E-L-T File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
30 changes: 30 additions & 0 deletions
30
app/views/shared/dossiers/_update_contact_information.html.haml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#contact_information | ||
- service = dossier&.service || procedure.service | ||
- if service.present? | ||
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.managed_by.header') | ||
.fr-footer__top-link.fr-pb-2w | ||
%span{ lang: :fr }= service.pretty_nom | ||
%div{ lang: :fr } | ||
= render SimpleFormatComponent.new(service.adresse, class_names_map: {paragraph: 'fr-footer__content-desc'}) | ||
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.contact.header') | ||
%ul.fr-footer__top-list | ||
- if dossier.present? && dossier.messagerie_available? | ||
%li | ||
= link_to I18n.t('users.procedure_footer.contact.in_app_mail.link'), messagerie_dossier_path(dossier), class: 'fr-footer__top-link' | ||
- elsif service.present? | ||
%li | ||
%span.fr-footer__top-link | ||
= I18n.t('users.procedure_footer.contact.email.link') | ||
= link_to service.email, "mailto:#{service.email}", class: "fr-footer__top-link" | ||
|
||
- if service.present? | ||
- if service.telephone.present? || service.horaires.present? | ||
%li | ||
- horaires = "#{I18n.t('users.procedure_footer.contact.schedule.prefix')}#{formatted_horaires(service.horaires)}" | ||
- if service.telephone.present? | ||
= link_to service.telephone_url, class: 'fr-footer__top-link' do | ||
%p | ||
= I18n.t('users.procedure_footer.contact.phone.link', service_telephone: service.telephone) | ||
- if service.horaires.present? | ||
%p | ||
= horaires |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
est-ce qu'on a un moyen (facile) de savoir si le routage / les infos de contact a changé ? Pour éviter de render ce contact information dans 99% des cas où ce ne sera pas nécessaire, que ce soit côté serveur ou côté navigateur et conserver une réactivité maximale de l'autosave (sachant que ce serait déjà largement perfectible)
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.
@colinux dans le dernier commit j‘ai ajouté une condition pour faire l‘update du footer seulement si on a touché à un champ de routage, mais ça fait péter un test de system :
spec/system/users/brouillon_spec.rb:9
. Sachant que ça a l‘air d‘être un flaky test (il échoue sur main en local sur mon poste). J‘ai testé différents fixs, sans succès, je mets ça en pause pour l‘instant. Si jamais tu as une idée...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.
@colinux Je me demande si c'est une bonne idée d'introduire ce genre d'optimisations ? J'ai l'impression que nous avons beaucoup de conditions complexes dans les turbo_stream. Je veux bien qu'on en parle au point tech. J'aimerais bien qu'on utilise quand c'est possible le nouveau
turbo_stream
refresh
avec morph dans la plupart des cas (l'autosave c'est probablement pas le bon candidat, mais même ici je pense qu'on peut simplifier)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.
l'optimisation n'étant pas tant pour le temps serveur, mais pour éviter que les navigateurs refassent des manips/comparaisons de DOM inutiles (je pense en particulier aux mobiles low-end chez qui la page de la démarche lag déjà). Cela dit il y a peut-être des astuces turbo/morph que j'ignore qui font que c'est déjà pas cher du tout, ok pour en causer