fix: fiche, partage, landing et bannière de création

- Fiche : nom, puis une ligne « surnom · repères de vie · âge » (point médian, sans pastille d'âge)
- Portrait vide : icône seule, avec aria-label et title « Ajouter une photo »
- Partage : message replié (copie directe, « Voir ou modifier le message »), sur-titre retiré
- Landing : « Se connecter » en bouton secondaire à gauche de « Créer mon arbre », masqué sur téléphone
- Bannière « Votre arbre est créé. » dans la DA (carte pz, Newsreader, bouton pilule)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
IliesAllaliandClaude Haiku 5.5 committed 2026-10-18 22:20:20 +02:00
1 parent f0196eec54
commit 97b92e3f84
9 files changed
+76 -36

No files matched your search

+15 -18
View File
@@ -544,31 +544,28 @@
left: 20px;
z-index: 1200;
max-width: 340px;
padding: 12px 14px;
padding: 18px 20px 20px;
display: grid;
gap: 8px;
border-radius: 14px;
border: 1px solid rgba(42, 38, 34, 0.14);
background: rgba(242, 239, 234, 0.95);
box-shadow: 0 6px 24px rgba(52, 48, 44, 0.18);
color: #2a2622;
font-size: 13px;
line-height: 1.45;
gap: 10px;
border-radius: var(--pz-r-l);
border: 1px solid var(--pz-line);
background: var(--pz-surface);
box-shadow: var(--pz-shadow);
color: var(--pz-ink-2);
font: 400 14px/1.5 var(--pz-sans);
}
.tree-created-prompt strong {
color: #2A2622;
font-size: 14px;
color: var(--pz-ink);
font: 400 21px/1.15 var(--pz-serif);
letter-spacing: -.01em;
}
.tree-created-prompt button {
.tree-created-prompt .pz-btn {
justify-self: start;
border: 1px solid #efc7b8;
border-radius: 8px;
background: #ffffff;
color: #2a2622;
padding: 6px 10px;
cursor: pointer;
min-height: 38px;
padding: 0 18px;
font-size: 14px;
}
.settings-card {
+2 -2
View File
@@ -2840,7 +2840,7 @@ function App() {
<div className="tree-created-prompt" role="status">
<strong>{t('Votre arbre est créé.')}</strong>
{t("Ajoutez un proche pour commencer, comme votre mère, votre père ou un frère. Il suffit d'un prénom.")}
<button type="button" onClick={() => setTreeWelcomeVisible(false)} aria-label={t('Fermer')}>
<button type="button" className="pz-btn pz-btn--secondary" onClick={() => setTreeWelcomeVisible(false)} aria-label={t('Fermer')}>
{t('Fermer')}
</button>
</div>
@@ -2850,7 +2850,7 @@ function App() {
<strong>{t("Votre arbre est créé, mais l'import n'a pas abouti.")}</strong>
{` ${treeImportError} `}
{t("Vous pouvez réessayer depuis les paramètres de l'arbre.")}
<button type="button" onClick={() => setTreeImportError('')} aria-label={t('Fermer')}>
<button type="button" className="pz-btn pz-btn--secondary" onClick={() => setTreeImportError('')} aria-label={t('Fermer')}>
{t('Fermer')}
</button>
</div>
+13 -5
View File
@@ -237,6 +237,8 @@ const ContributionPanel = ({
const [newPassword, setNewPassword] = useState('')
const [inviteLocalError, setInviteLocalError] = useState('')
const [copyFeedback, setCopyFeedback] = useState('')
// Le message d'invitation reste replié : une ligne, le texte ne s'ouvre que sur demande
const [showInviteMessage, setShowInviteMessage] = useState(false)
// Load persisted decisions from localStorage
useEffect(() => {
@@ -365,7 +367,6 @@ const ContributionPanel = ({
aria-labelledby="contribPanelTitle"
>
<div className="pz-modal-head">
<p className="pz-eyebrow">{t('Partager et relire')}</p>
<h1 id="contribPanelTitle" className="pz-title">{familyTitleBefore}<em>{t('participe')}</em>{familyTitleAfter}</h1>
</div>
<button type="button" className="pz-btn pz-btn--ghost pz-btn--icon pz-modal-close" onClick={onClose} aria-label={t('Fermer')}>
@@ -411,11 +412,18 @@ const ContributionPanel = ({
</div>
{defaultInviteText && (
<div className="contrib-invite-message">
<label className="contrib-invite-title" htmlFor="contrib-invite-text">{t('Le message à envoyer')}</label>
<textarea id="contrib-invite-text" className="contrib-invite-textarea" rows={9} value={inviteText} onChange={(e) => setInviteText(e.target.value)} />
<div className="contrib-invite-message-actions">
<button type="button" className="pz-btn pz-btn--primary pz-btn--sm" onClick={() => handleCopy(inviteText, t('Message copié'))}><Copy size={14} strokeWidth={2} />{t('Copier le message')}</button>
<div className="contrib-invite-message-row">
<button type="button" className="contrib-pill-btn contrib-pill-btn--edit" onClick={() => handleCopy(inviteText, t('Message copié'))}><Copy size={14} strokeWidth={2} />{t("Copier le message d'invitation")}</button>
<button type="button" className="contrib-link-btn" aria-expanded={showInviteMessage} aria-controls="contrib-invite-text" onClick={() => setShowInviteMessage((v) => !v)}>
{showInviteMessage ? t('Masquer le message') : t('Voir ou modifier le message')}
</button>
</div>
{showInviteMessage && (
<>
<label className="contrib-invite-message-label" htmlFor="contrib-invite-text">{t('Le message à envoyer')}</label>
<textarea id="contrib-invite-text" className="contrib-invite-textarea" rows={6} value={inviteText} onChange={(e) => setInviteText(e.target.value)} />
</>
)}
</div>
)}
{(inviteLocalError || inviteError) && <div className="contrib-error">{inviteLocalError || inviteError}</div>}
+5 -2
View File
@@ -68,8 +68,11 @@
.pc-id { display: grid; gap: 6px; min-width: 0; padding-top: 4px; }
.pc-name { margin: 0; font: 400 28px/1.08 var(--pz-serif); letter-spacing: -.01em; color: var(--pz-ink); text-wrap: balance; }
.pc-name em { font-style: italic; font-weight: 300; }
.pc-nick { margin: 0; font: italic 300 17px/1.3 var(--pz-serif); color: var(--pz-muted); }
.pc-life { margin: 0; font: 400 13.5px/1.4 var(--pz-sans); color: var(--pz-muted); }
.pc-meta { margin: 0; font: 400 13.5px/1.5 var(--pz-sans); color: var(--pz-muted); text-wrap: pretty; }
.pc-meta-item { display: inline; }
.pc-meta-item--nowrap { white-space: nowrap; }
.pc-nick { font: italic 300 15.5px/1 var(--pz-serif); color: var(--pz-ink-2); }
.pc-meta-sep { margin: 0 .45em; color: var(--pz-faint); }
.pc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pc-chips:empty { display: none; }
/* Place dans la fratrie (mode édition) : ‹ 2 sur 3 › dans une pastille */
+18 -4
View File
@@ -425,6 +425,12 @@ const PersonCard = ({
return parts.join(' – ')
})()
const ageLabel = age === null ? null : person.isAlive ? t('{age} ans', { age }) : t('{age} ans au décès', { age })
// Une seule ligne sous le nom : surnom, repères de vie, âge, séparés par un point médian
const metaItems = [
person.nickname && { key: 'nick', node: <em className="pc-nick">{person.nickname}</em>, nowrap: true },
lifeLine && { key: 'life', node: lifeLine },
ageLabel && { key: 'age', node: ageLabel, nowrap: true },
].filter(Boolean)
const renderRelationRow = (target, relationType, meta) => (
<div key={`${relationType}-${target?.id}`} className="pc-rel-row">
@@ -491,9 +497,10 @@ const PersonCard = ({
className="pc-photo pc-photo--add"
onClick={() => avatarInputRef.current?.click()}
disabled={avatarActionLoading}
aria-label={t('Ajouter une photo')}
title={t('Ajouter une photo')}
>
<ImagePlus size={22} strokeWidth={1.8} aria-hidden="true" />
<span>{avatarActionLoading ? t('Envoi') : t('Ajouter une photo')}</span>
</button>
) : (
<div className="pc-photo">
@@ -572,8 +579,16 @@ const PersonCard = ({
{isFirstNameUnknown(person) ? <span className="pc-name-unknown">{firstNameLabel(person)}</span> : person.firstName} <em>{person.lastName}</em>
</h2>
)}
{!editMode && person.nickname && <p className="pc-nick">{person.nickname}</p>}
{!editMode && lifeLine && <p className="pc-life">{lifeLine}</p>}
{!editMode && metaItems.length > 0 && (
<p className="pc-meta">
{metaItems.map((item, i) => (
<span key={item.key} className={`pc-meta-item${item.nowrap ? ' pc-meta-item--nowrap' : ''}`}>
{item.node}
{i < metaItems.length - 1 && <span className="pc-meta-sep" aria-hidden="true">·</span>}
</span>
))}
</p>
)}
<div className="pc-chips">
{editMode && <span className="pz-tag pz-tag--accent pz-tag--dot">{t('Édition')}</span>}
{editMode && siblingPlace && (
@@ -587,7 +602,6 @@ const PersonCard = ({
</button>
</span>
)}
{!editMode && ageLabel && <span className="pz-tag">{ageLabel}</span>}
{!editMode && person.profession && <span className="pz-tag">{person.profession}</span>}
</div>
</div>
+4 -1
View File
@@ -67,9 +67,12 @@
.contrib-invite-passwords { display: grid; gap: 6px; }
.contrib-pass-hint { margin: 2px 4px 0; font: 400 12.5px/1.45 var(--pz-sans); color: var(--pz-muted); }
.contrib-invite-message { display: grid; gap: 8px; }
.contrib-invite-message-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.contrib-invite-message-label { font: 500 12.5px var(--pz-sans); color: var(--pz-muted); }
.contrib-link-btn { border: 0; padding: 4px 2px; background: none; cursor: pointer; font: 500 12.5px var(--pz-sans); color: var(--pz-a700); text-decoration: underline; text-underline-offset: 2px; }
.contrib-link-btn:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 2px; border-radius: 4px; }
.contrib-invite-textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; background: var(--pz-surface); border: 1px solid var(--pz-line); border-radius: var(--pz-r-m); font: 400 13.5px/1.5 var(--pz-sans); color: var(--pz-ink-2); resize: vertical; outline: none; field-sizing: content; min-height: 9.5lh; }
.contrib-invite-textarea:focus { border-color: var(--pz-a500); box-shadow: 0 0 0 3px var(--pz-a100); }
.contrib-invite-message-actions { display: flex; justify-content: flex-end; }
.contrib-role-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 12px; background: var(--pz-surface); border: 1px solid var(--pz-line); border-radius: var(--pz-r-m); }
.contrib-role-badge { display: grid; gap: 1px; min-width: 130px; flex: 1; }
.contrib-role-badge strong { font: 500 14px var(--pz-sans); color: var(--pz-ink); }
+3 -2
View File
@@ -52,7 +52,6 @@ export default {
// ─── Panneau de relecture ───
'Copie indisponible': 'Copy unavailable',
'Minimum 8 caractères.': 'At least 8 characters.',
'Partager et relire': 'Share and review',
'La famille {em}': 'The family {em}',
'participe': 'joins in',
'Fermer': 'Close',
@@ -82,7 +81,9 @@ export default {
'Changing the password means everyone who has already opened the tree will need to enter the new one.',
'Le message à envoyer': 'The message to send',
'Message copié': 'Message copied',
'Copier le message': 'Copy message',
"Copier le message d'invitation": 'Copy invitation message',
'Voir ou modifier le message': 'View or edit the message',
'Masquer le message': 'Hide the message',
'Propositions à relire': 'Suggestions to review',
'Acceptez ou refusez chaque modification, puis appliquez vos choix.': 'Accept or decline each change, then apply your choices.',
'Actualiser': 'Refresh',
+12 -2
View File
@@ -778,9 +778,19 @@ function Header({ t, onCta, loginHref, elevated }) {
<a href="#comment">{t.nav.how}</a>
<a href="#demo">{t.nav.demo}</a>
{t.nav.privacy && <a href={t.privacyHref}>{t.nav.privacy}</a>}
<a href={loginHref}>{t.nav.login}</a>
</nav>
<button type="button" onClick={onCta} className="btn p sm">{t.cta}</button>
<div className="nav-cta">
{/* Icône « connexion » de Lucide (ISC), tracée à la main : la landing n'embarque pas la bibliothèque */}
<a href={loginHref} className="btn s sm nav-login">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
<polyline points="10 17 15 12 10 7" />
<line x1="15" x2="3" y1="12" y2="12" />
</svg>
{t.nav.login}
</a>
<button type="button" onClick={onCta} className="btn p sm">{t.cta}</button>
</div>
</div>
</header>
)
+4
View File
@@ -78,6 +78,8 @@ em.s { font-style: italic; font-weight: 300; }
.site-nav.is-elevated { border-bottom-color: var(--trait); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.nav-in nav { display: flex; gap: 4px; }
.nav-cta { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-login svg { flex: none; }
.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;
@@ -237,6 +239,8 @@ 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; }
}
@media (max-width: 560px) {
.hero { padding-top: 8px; }