fix(connaissances): passe autofeedback — liens soulignés dans le texte (a11y 100), résumé d'organisation sans redite, libellés du graphe à 8 rem au téléphone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0179wsewuntMrKBA2s9y7ZeX
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ff71d9b7f
commit
d83ef12269
@@ -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<HTMLElement | null>(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; }
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user