feat(bouquet): enable discussion notification #482
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.
Fix ecolabdata/ecospheres#263
Related opendatateam/udata#3072
Introduit la notification d'une discussion sur un bouquet via data.gouv.fr.
Pour l'envoi de notification, le payload de la discussion est augmenté de
external_url
qui pointe vers l'URL courante du bouquet et demodel_name
qui vaut "bouquet". data.gouv.fr utilise ces informations dans opendatateam/udata#3072 pour construire l'email de notification.Afin d'afficher une discussion au clic sur le lien dans la notification, on utilise une technique similaire à celle de data.gouv.fr (voir screenshots plus bas) : un composant
DiscussionFocus
est monté à la place deDiscussionsList
. Il affiche un "zoom" sur cette discussion, ce qui permet de s'affranchir de la pagination. Il est possible de revenir depuis ce composant à la liste des discussions. On scroll aussi automatiquement sur la discussion "zoomée", ce qui entraine malheureusement pas mal de tweaks divers (NB: on ne peut pas scroller directement surDiscussionFocus
, les tabs sont perturbés).Vue sur une discussion (focus)
Mails de notification (local en)