From d83ef1226956056f8b5f2c2e3bb45f88293b3e84 Mon Sep 17 00:00:00 2001 From: Jules Neny Date: Tue, 27 Oct 2026 13:11:14 +0100 Subject: [PATCH] =?UTF-8?q?fix(connaissances):=20passe=20autofeedback=20?= =?UTF-8?q?=E2=80=94=20liens=20soulign=C3=A9s=20dans=20le=20texte=20(a11y?= =?UTF-8?q?=20100),=20r=C3=A9sum=C3=A9=20d'organisation=20sans=20redite,?= =?UTF-8?q?=20libell=C3=A9s=20du=20graphe=20=C3=A0=208=20rem=20au=20t?= =?UTF-8?q?=C3=A9l=C3=A9phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0179wsewuntMrKBA2s9y7ZeX --- components/GrapheConnaissances.vue | 10 +++++++--- composables/useFicheAdapter.ts | 6 +++++- pages/connaissances.vue | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/components/GrapheConnaissances.vue b/components/GrapheConnaissances.vue index c08f307..8faa126 100644 --- a/components/GrapheConnaissances.vue +++ b/components/GrapheConnaissances.vue @@ -263,7 +263,7 @@ const OPTIONS_PAS: { v: Pas; libelle: string }[] = [ ] const DUREE = 600 // recadrage : ≤ 700 ms, puis immobile const MARGE = { haut: 52, bas: 44, gauche: 96, droite: 96 } -const MARGE_TEL = { haut: 52, bas: 84, gauche: 80, droite: 80 } // < 768 : le pied de la vue fiches couvre le bas +const MARGE_TEL = { haut: 52, bas: 84, gauche: 64, droite: 64 } // < 768 : le pied de la vue fiches couvre le bas ; les libellés sont tenus dans le cadre par la borne de `ecran` // ── Taille mesurée (le rendu serveur part d'une taille plausible, comme GrapheMots) ── const racine = ref(null) @@ -363,7 +363,7 @@ watch(cible, (c) => { }) /** Bord à garder libre autour du centre d'un nœud : la demi-largeur maximale d'un libellé (9,5 rem) pour un principal. */ -const BORD_PRINCIPAL = 80 +const BORD_PRINCIPAL = 80 // 64 sous 768 px, où le libellé passe à 8 rem const BORD_SECONDAIRE = 12 const kindDe = computed(() => new Map(props.noeuds.map((x) => [x.id, x.kind]))) const ecran = (id: string): Pt | null => { @@ -372,7 +372,7 @@ const ecran = (id: string): Pt | null => { const z = zone.value const x = (p.x - camera.cx) * camera.s + z.x + z.w / 2 // Garde-fou : aucun libellé ne sort du cadre, même en pleine animation ou sur une colonne étroite. - const b = principaux.value.has(kindDe.value.get(id) ?? '') ? BORD_PRINCIPAL : BORD_SECONDAIRE + const b = principaux.value.has(kindDe.value.get(id) ?? '') ? (taille.w < 768 ? 64 : BORD_PRINCIPAL) : BORD_SECONDAIRE const xBorne = taille.w > 2 * b ? Math.min(taille.w - b, Math.max(b, x)) : x return { x: Math.round(xBorne * 10) / 10, @@ -594,6 +594,10 @@ const liensVus = computed(() => props.liens .gc__legende-trait { display: inline-block; width: 18px; border-top: 1.5px solid currentColor; margin-left: 6px; } .gc__legende-trait--curation { border-top-style: dashed; } @media (max-width: 639.98px) { .gc__legende { display: none; } } +@media (max-width: 767.98px) { + .gc__noeud { max-width: 8rem; } + .gc__libelle { font-size: 12px; } +} /* Mouvement réduit : état final, sans transition (la caméra saute aussi, côté script) */ .gc--fige .gc__lien, .gc--fige .gc__source, .gc--fige .gc__noeud, .gc--fige .gc__rond { transition: none; } diff --git a/composables/useFicheAdapter.ts b/composables/useFicheAdapter.ts index a09f630..8bc04d1 100644 --- a/composables/useFicheAdapter.ts +++ b/composables/useFicheAdapter.ts @@ -266,9 +266,13 @@ export function toMiniConnaissance(objet: ObjetCouche, jeu: JeuCouche): MiniFich const porteurs = porteursDe(objet, rendus) const echelles = echellesDe(objet, jeu, rendus) const nomsPorteurs = porteurs.filter((p) => p.id !== objet.id).map((p) => p.nom_canonique) + // Une organisation se porte elle-même : « titre — porteur » redirait son nom ; on dit son statut et son adresse. + const domaine = typeof objet.url_canonique === 'string' ? objet.url_canonique.replace(/^https?:\/\/(www\.)?/, '').replace(/\/.*$/, '') : '' const resume = objet.nature === 'concept' ? (objet.definition_courte ?? '') - : [objet.nom_canonique, nomsPorteurs.join(', ')].filter(Boolean).join(' — ') + : objet.nature === 'organisation' + ? [objet.statut ? `statut : ${objet.statut}` : '', domaine].filter(Boolean).join(' · ') + : [objet.nom_canonique, nomsPorteurs.join(', ')].filter(Boolean).join(' — ') return { id: objet.id, kind: objet.nature, diff --git a/pages/connaissances.vue b/pages/connaissances.vue index 00d03dd..8dd401b 100644 --- a/pages/connaissances.vue +++ b/pages/connaissances.vue @@ -283,7 +283,7 @@ useSeoMeta({ line-height: 1.45; color: color-mix(in srgb, var(--text) 82%, transparent); } -.cn-bandeau a { color: var(--text); text-underline-offset: 2px; } +.cn-bandeau a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; } .cn-bandeau a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); } .cn-vue { flex: 1 1 0; min-height: 0; min-width: 0; } @@ -328,7 +328,7 @@ useSeoMeta({ text-underline-offset: 2px; cursor: pointer; } -.cf__lien { color: var(--text); text-underline-offset: 2px; } +.cf__lien { color: var(--text); text-decoration: underline; text-underline-offset: 2px; } .cf__lien--ext { margin-left: 4px; } .cf__vers:focus-visible, .cf__lien:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }