From ac3cd6aec2cf466b840a2d5a8393a129694665e0 Mon Sep 17 00:00:00 2001 From: IliesAllali Date: Sun, 18 Oct 2026 23:54:44 +0200 Subject: [PATCH 1/2] feat(invite): crayon pour proposer des changements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit L'invité a le crayon du propriétaire dans la barre du bas, avant « Plus ». Le bandeau du mode contribution dit « Vous proposez » (« Vous proposez des changements » sur ordinateur), sur une seule ligne, avec « Envoyer ». Le propriétaire ne voit aucun changement. Co-Authored-By: Claude Haiku 5.5 --- frontend/src/components/EditModeOverlay.css | 10 ++++++++-- frontend/src/components/EditSessionBar.jsx | 16 ++++++++++++---- .../src/components/navbar/ContextualNavbar.jsx | 11 +++++++++-- frontend/src/i18n/en/compte.js | 2 -- frontend/src/i18n/en/contribution.js | 5 +++-- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/EditModeOverlay.css b/frontend/src/components/EditModeOverlay.css index 850e1fc..3df00d2 100644 --- a/frontend/src/components/EditModeOverlay.css +++ b/frontend/src/components/EditModeOverlay.css @@ -48,14 +48,20 @@ .edit-mode-submit { flex: none; } .edit-mode-toast-close { width: 36px; min-height: 36px; flex: none; } +/* Invité : la phrase complète sur ordinateur, « Vous proposez » sur téléphone, toujours sur une ligne */ +.edit-mode-toast-short { display: none; } + @media (max-width: 768px) { .edit-mode-toast { top: 68px; max-width: calc(100vw - 24px); } .edit-mode-toast-text { font-size: 13px; } + .edit-mode-toast--contrib .edit-mode-toast-long { display: none; } + .edit-mode-toast--contrib .edit-mode-toast-short { display: inline; } } -/* Téléphone : le texte se coupait en « Vous modifi… » à côté du bouton, qui suffit à lui seul */ +/* Téléphone : le texte de l'éditeur se coupait en « Vous modifi… » à côté du bouton, qui suffit à lui seul. + L'invité garde son texte court, qui tient sur une ligne. */ @media (max-width: 480px) { - .edit-mode-toast--with-submit .edit-mode-toast-text { display: none; } + .edit-mode-toast--with-submit:not(.edit-mode-toast--contrib) .edit-mode-toast-text { display: none; } } @media (prefers-reduced-motion: reduce) { diff --git a/frontend/src/components/EditSessionBar.jsx b/frontend/src/components/EditSessionBar.jsx index 79f9647..b716069 100644 --- a/frontend/src/components/EditSessionBar.jsx +++ b/frontend/src/components/EditSessionBar.jsx @@ -11,8 +11,9 @@ function EditSessionBar({ active, hasDraft, role = 'contributor', onDeactivate, ), [isAdmin]) // Libellés courts : ils doivent tenir sur un téléphone à côté du bouton - const toastLabel = isAdmin ? t("Vous modifiez l'arbre") : t('Vos propositions') - const submitLabel = isAdmin ? t("Mettre à jour l'arbre") : t('Envoyer mes ajouts') + // Invité : « Vous proposez » sur téléphone (une seule ligne), la phrase complète sur ordinateur + const toastLabel = isAdmin ? t("Vous modifiez l'arbre") : null + const submitLabel = isAdmin ? t("Mettre à jour l'arbre") : t('Envoyer') // La famille ne voit le bouton d'envoi que lorsqu'il y a quelque chose à envoyer const showSubmit = Boolean(onSubmit) && (isAdmin || hasDraft) @@ -22,9 +23,16 @@ function EditSessionBar({ active, hasDraft, role = 'contributor', onDeactivate, <>