From 8e1b244a4a79024b6d1feebbd253139897f71798 Mon Sep 17 00:00:00 2001
From: IliesAllali
Date: Sun, 18 Oct 2026 22:33:19 +0200
Subject: [PATCH] =?UTF-8?q?fix:=20en-t=C3=AAte=20de=20la=20fiche=20en=20mo?=
=?UTF-8?q?dification=20et=20bouton=20de=20connexion=20de=20la=20landing?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Fiche : pastille Édition retirée ; case « Je ne connais pas son prénom » sur une ligne pleine largeur ; badge caméra « Changer la photo » sur le portrait (même choix de source)
- Landing : « Se connecter » en bouton blanc sans contour, icône de profil ; sur téléphone, icône ronde seule avec aria-label
Co-Authored-By: Claude Haiku 5.5
---
frontend/src/components/PersonCard.css | 21 +++++--
frontend/src/components/PersonCard.jsx | 80 +++++++++++++-------------
frontend/src/i18n/en/fiche.js | 1 +
landing/src/App.jsx | 13 ++---
landing/src/index.css | 10 +++-
5 files changed, 70 insertions(+), 55 deletions(-)
diff --git a/frontend/src/components/PersonCard.css b/frontend/src/components/PersonCard.css
index e42840f..a8ac8d7 100644
--- a/frontend/src/components/PersonCard.css
+++ b/frontend/src/components/PersonCard.css
@@ -35,8 +35,8 @@
.pc-hidden-input { display: none; }
/* ── En-tête ── */
-.pc-head { display: flex; gap: 16px; align-items: flex-start; padding-right: 36px; }
-.pc-photo-wrap { display: grid; gap: 8px; justify-items: center; flex: none; }
+.pc-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; align-items: start; padding-right: 36px; }
+.pc-photo-wrap { position: relative; display: grid; gap: 8px; justify-items: center; flex: none; }
.pc-photo {
width: 84px; height: 84px; border-radius: 24%; overflow: hidden;
background: var(--pz-a100); box-shadow: 0 0 0 1px rgba(42, 38, 34, .06), var(--pz-shadow);
@@ -54,15 +54,26 @@
.pc-photo--add:active:not(:disabled) { transform: scale(.97); }
.pc-photo--add:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 3px; }
.pc-photo--add:disabled { opacity: .6; cursor: default; }
-.pc-photo-actions { display: grid; gap: 4px; justify-items: center; }
/* Menu du choix de source du portrait : au-dessus de la fiche (z-index 1000), sous la modale Immich (2200) */
.pc-source-backdrop { position: fixed; inset: 0; z-index: 1100; }
.pc-source-menu { position: fixed; z-index: 1150; min-width: 220px; }
+.pc-photo-badge {
+ position: absolute; right: -6px; bottom: -6px; z-index: 1;
+ width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
+ border: 0; border-radius: 50%; background: #fff; color: var(--pz-ink-2); cursor: pointer;
+ box-shadow: 0 0 0 1px rgba(42, 38, 34, .06), var(--pz-shadow);
+ transition: transform 140ms var(--pz-ease), background-color 160ms ease;
+ -webkit-tap-highlight-color: transparent;
+}
+@media (hover: hover) and (pointer: fine) { .pc-photo-badge:hover:not(:disabled) { background: var(--pz-a50); color: var(--pz-a700); } }
+.pc-photo-badge:active:not(:disabled) { transform: scale(.94); }
+.pc-photo-badge:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 2px; }
+.pc-photo-badge:disabled { opacity: .5; cursor: default; }
.pc-photo-btn {
border: 0; background: none; padding: 2px 4px; cursor: pointer;
font: 500 12px var(--pz-sans); color: var(--pz-a700); text-decoration: underline; text-underline-offset: 2px;
}
-.pc-photo-btn--danger { color: var(--pz-danger); }
+.pc-photo-btn--danger { color: var(--pz-danger); justify-self: center; }
.pc-photo-btn:disabled { opacity: .5; cursor: default; }
.pc-id { display: grid; gap: 6px; min-width: 0; padding-top: 4px; }
@@ -256,6 +267,6 @@
/* Prénom inconnu (issue Anaïs, 18/10) : libellé en italique, case à cocher sous les champs de nom */
.pc-name-unknown { font-style: italic; font-weight: 300; }
-.pc-unknown-first { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font: 400 13px var(--pz-sans); color: var(--pz-ink-2); cursor: pointer; }
+.pc-unknown-first { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: -4px 0 0; font: 400 12.5px var(--pz-sans); color: var(--pz-ink-2); cursor: pointer; white-space: nowrap; }
.pc-unknown-first input { width: 15px; height: 15px; accent-color: var(--pz-a500); }
.pc-name-error { margin: 6px 0 0; font: 500 12.5px var(--pz-sans); color: var(--pz-danger); }
diff --git a/frontend/src/components/PersonCard.jsx b/frontend/src/components/PersonCard.jsx
index 64740b5..80a9b39 100644
--- a/frontend/src/components/PersonCard.jsx
+++ b/frontend/src/components/PersonCard.jsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useRef, forwardRef } from 'react'
import { createPortal } from 'react-dom'
-import { Save, Trash2, Plus, X, Search, Check, Play, ImagePlus, Sparkles, ChevronLeft, ChevronRight } from 'lucide-react'
+import { Save, Trash2, Plus, X, Search, Check, Play, ImagePlus, Camera, Sparkles, ChevronLeft, ChevronRight } from 'lucide-react'
import { getParents, getChildren, getPersonUnions, getPersonMedias, getDemoLife, filiations, persons, unions } from '../data/mockData'
import { fetchPersonLife } from '../api/treeApi.js'
import LifeTimeline from './LifeTimeline.jsx'
@@ -517,29 +517,29 @@ const PersonCard = ({
)}
{editMode && onAvatarUpload && (
-
-
- {person.photo && (
-
- )}
-
+
+ )}
+ {editMode && onAvatarUpload && person.photo && (
+
)}
@@ -570,22 +570,6 @@ const PersonCard = ({
placeholder={t('Nom')}
aria-label={t('Nom')}
/>
- {/* Visible tant que le prénom est vide, et tant qu'elle est cochée (pour pouvoir la décocher) */}
- {(unknownFirstName || !String(getEditValue('firstName', person.firstName) ?? '').trim()) && (
-
- )}
{firstNameMissing && {t('Il faut au moins un prénom.')}
}
{lastNameMissing && {t('Il faut au moins un nom si le prénom est inconnu.')}
}
@@ -606,7 +590,6 @@ const PersonCard = ({
)}
- {editMode && {t('Édition')}}
{editMode && siblingPlace && (
+ {editMode && ((unknownFirstName || !String(getEditValue('firstName', person.firstName) ?? '').trim())) && (
+
+ )}
{avatarActionError && {avatarActionError}
}
diff --git a/frontend/src/i18n/en/fiche.js b/frontend/src/i18n/en/fiche.js
index 94ea9aa..a01c9a2 100644
--- a/frontend/src/i18n/en/fiche.js
+++ b/frontend/src/i18n/en/fiche.js
@@ -19,6 +19,7 @@ export default {
'Fermer la fiche': 'Close profile',
'Changer': 'Change',
'Ajouter une photo': 'Add a photo',
+ 'Changer la photo': 'Change photo',
'Retirer': 'Remove',
'Prénom': 'First name',
'Nom': 'Last name',
diff --git a/landing/src/App.jsx b/landing/src/App.jsx
index 1d1306b..e458592 100644
--- a/landing/src/App.jsx
+++ b/landing/src/App.jsx
@@ -780,14 +780,13 @@ function Header({ t, onCta, loginHref, elevated }) {
{t.nav.privacy && {t.nav.privacy}}
diff --git a/landing/src/index.css b/landing/src/index.css
index af26450..cdc3e8e 100644
--- a/landing/src/index.css
+++ b/landing/src/index.css
@@ -80,6 +80,9 @@ em.s { font-style: italic; font-weight: 300; }
.nav-in nav { display: flex; gap: 4px; }
.nav-cta { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-login svg { flex: none; }
+/* Connexion : fond blanc, sans contour, même hauteur que « Créer mon arbre » (btn sm) */
+.btn.s.nav-login { background: #fff; color: var(--encre); box-shadow: none; }
+@media (hover: hover) and (pointer: fine) { .btn.s.nav-login:hover { background: var(--a50); } }
.nav-in nav a {
font: 500 14px var(--sans); color: var(--encre2); text-decoration: none;
padding: 8px 12px; border-radius: 999px; transition: background-color 160ms ease;
@@ -239,8 +242,11 @@ html.logo-intro .lk-nom { animation: lk-nom 700ms var(--ease-out) 380ms both; }
@media (max-width: 820px) {
.steps, .promise, .guides { grid-template-columns: 1fr; }
.nav-in nav { display: none; }
- /* Téléphone : la connexion reste au pied de page, l'en-tête garde la place du bouton de création */
- .nav-login { display: none; }
+ /* Téléphone : icône de profil ronde à gauche de « Créer mon arbre », le texte passe en aria-label */
+ .btn.s.nav-login { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
+ .nav-in { gap: 10px; }
+ .nav-cta { gap: 6px; }
+ .nav-login-text { display: none; }
}
@media (max-width: 560px) {
.hero { padding-top: 8px; }