From f990e1c5ded7f39ee2c4cb93d43d24cb05e7ad83 Mon Sep 17 00:00:00 2001 From: IliesAllali <97601122+IliesAllali@users.noreply.github.com> Date: Sun, 1 Nov 2026 19:51:53 +0100 Subject: [PATCH] Miniatures de portrait : le recadrage s'applique partout (#205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seuls l'arbre et la fiche appliquaient le cadrage enregistré du portrait. Les miniatures (auteur et « Sur la photo » dans la visionneuse, recherche, liens de la fiche, ajout d'un proche, compte, menu du compte, choix d'un souvenir, recherche ailleurs) affichaient la photo brute. Un composant commun, PortraitThumb, place l'image avec imagePlacement, comme la fiche. Signalé par Phyll sur Discord (29/10). Co-authored-by: Claude Opus 5.5 --- frontend/src/App.jsx | 1 + frontend/src/components/AccountPanel.jsx | 5 ++-- frontend/src/components/AddPersonPanel.jsx | 3 ++- frontend/src/components/FamilyOnboarding.jsx | 3 ++- frontend/src/components/MediaPeople.jsx | 3 ++- frontend/src/components/MediaViewer.jsx | 3 ++- frontend/src/components/PersonCard.jsx | 5 ++-- frontend/src/components/PortraitThumb.css | 5 ++++ frontend/src/components/PortraitThumb.jsx | 25 +++++++++++++++++++ .../src/components/SearchSourcesPanel.jsx | 3 ++- .../components/navbar/ContextualNavbar.jsx | 4 ++- .../search/SearchResultsDropdown.jsx | 3 ++- 12 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 frontend/src/components/PortraitThumb.css create mode 100644 frontend/src/components/PortraitThumb.jsx diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index f7f3839..8aa19fc 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -3535,6 +3535,7 @@ function App() { userDisplayName={accountDisplayName} userEmail={accountEmail} userAvatarPhoto={accountAvatarPhoto} + userAvatarCrop={linkedSelfPerson?.avatarCrop ?? null} linkedPersonName={linkedSelfPerson ? `${linkedSelfPerson.firstName || ''} ${linkedSelfPerson.lastName || ''}`.trim() : ''} activeTreeName={activeAccountTreeName} annotationTools={editMode.isActive ? { diff --git a/frontend/src/components/AccountPanel.jsx b/frontend/src/components/AccountPanel.jsx index 0302b9c..3b3bb84 100644 --- a/frontend/src/components/AccountPanel.jsx +++ b/frontend/src/components/AccountPanel.jsx @@ -3,6 +3,7 @@ import { X } from 'lucide-react' import './AccountScreens.css' import { t } from '../i18n/index.js' import { initialOf } from '../utils/initial.js' +import PortraitThumb from './PortraitThumb.jsx' const AccountPanel = ({ visible, @@ -51,7 +52,7 @@ const AccountPanel = ({

{linkedPerson @@ -87,7 +88,7 @@ const AccountPanel = ({ onClick={() => onSelectPerson?.(person.id)} > {person.firstName} {person.lastName || ''} {isSelected && {t("C'est moi")}} diff --git a/frontend/src/components/AddPersonPanel.jsx b/frontend/src/components/AddPersonPanel.jsx index a1c6fb5..4cb1dce 100644 --- a/frontend/src/components/AddPersonPanel.jsx +++ b/frontend/src/components/AddPersonPanel.jsx @@ -8,6 +8,7 @@ import { firstNameLabel } from '../utils/personName.js' import { SEX_CHOICES } from '../utils/personSex.js' import { initialOf } from '../utils/initial.js' import { findLikelyDuplicates } from '../utils/duplicates.js' +import PortraitThumb from './PortraitThumb.jsx' // Titre traduit d'un bloc : le passage entre et garde son italique function withEmphasis(text) { @@ -392,7 +393,7 @@ function AddPersonPanel({ visible, persons = [], loading = false, error = '', on

  • diff --git a/frontend/src/components/navbar/ContextualNavbar.jsx b/frontend/src/components/navbar/ContextualNavbar.jsx index 0fa2d43..d2538a5 100644 --- a/frontend/src/components/navbar/ContextualNavbar.jsx +++ b/frontend/src/components/navbar/ContextualNavbar.jsx @@ -13,6 +13,7 @@ import { PHONE_QUERY } from '../../utils/sheetDrag' import './ContextualNavbar.css' import { initialOf } from '../../utils/initial.js' import Kbd from '../Kbd.jsx' +import PortraitThumb from '../PortraitThumb.jsx' const ANNOT_TOOLS = [ { id: 'pointer', label: t('Sélection'), Icon: MousePointer2 }, @@ -42,6 +43,7 @@ function ContextualNavbar({ userDisplayName = '', userEmail = '', userAvatarPhoto = '', + userAvatarCrop = null, linkedPersonName = '', activeTreeName = '', onEditClick, @@ -399,7 +401,7 @@ function ContextualNavbar({ {!authenticated ? (