diff --git a/DESIGN-SYSTEM.md b/DESIGN-SYSTEM.md index 154d108..b1990ad 100644 --- a/DESIGN-SYSTEM.md +++ b/DESIGN-SYSTEM.md @@ -48,7 +48,7 @@ Pour une chip non cliquable (affichage seul, ex. liste de résultats) : `as="spa ## FicheMiniCard + useFicheAdapter — brancher une nouvelle source -`composables/useFicheAdapter.ts` expose `toMini(source): MiniFiche`, où `MiniFiche = { id, nom, resume, chips, echelle?, geoloc, kind }`. Aujourd'hui il distingue `Org` (NocoDB, page `/`) et `StructureV2` (JSON statique `reseaux-bifurcation.json`, page `/agences`) via `'famille_principale' in source` (seul champ propre à `StructureV2`). +`composables/useFicheAdapter.ts` expose `toMini(source): MiniFiche`, où `MiniFiche = { id, nom, resume, chips, echelle?, geoloc, kind }`. Il distingue `Org` (NocoDB, mode `entraide` de `/`) et `StructureV2` (JSON statique `reseaux-bifurcation.json`, mode `pratiques` de `/`, ex-`/agences` depuis B4a) via `'famille_principale' in source` (seul champ propre à `StructureV2`). **Pour brancher une 3e source** (B6+, ex. un nouveau type de fiche) : 1. Ajoute son type à l'union `Org | StructureV2 | TonNouveauType` dans la signature de `toMini`. @@ -91,7 +91,7 @@ Remplace `FichesPanel`, `NavSidebar`, `MobileSheet` et les onglets Métropolitai ``` -Contenus de détail en place : `/` → `FicheDetail` (`compact`, `etiquettes-cliquables`) + commentaires, l'`Org` venant de la liste (même enregistrement NocoDB que `/api/fiche/:id`) ; `/agences` → `FicheReseauContenu` (corps de l'ancienne `FicheModalV2`, une structure liée s'ouvre dans le même panneau). `FicheModal` et `FicheModalV2` sont retirées ; la page `/fiche/:id` reste. +Contenus de détail en place : `/` → `FicheDetail` (`compact`, `etiquettes-cliquables`) + commentaires, l'`Org` venant de la liste (même enregistrement NocoDB que `/api/fiche/:id`) ; `/?mode=pratiques` (ex-`/agences`) → `FicheReseauContenu` (corps de l'ancienne `FicheModalV2`, une structure liée s'ouvre dans le même panneau). `FicheModal` et `FicheModalV2` sont retirées ; la page `/fiche/:id` reste. `const vf = useVueFiches(fiches, config)` : `fiches` = `MiniFiche[]` déjà adaptées, non filtrées (ref, computed ou getter) ; `config: ConfigVueFiches` = `{ dimensions, tris, groupes, etats, sousVues? }` (types dans `utils/vueFiches.ts`). Le composant ne charge rien et ne connaît pas la carte. La page lit `vf.idsResultat` pour ne montrer sur la carte que le résultat courant, `vf.survolId` pour allumer l'épingle (et l'écrit au survol d'une épingle), `vf.ficheId` / `vf.ficheOuverte` / `vf.position` pour la fiche ouverte (B12), `vf.largeur` et `vf.vueAffichee` pour placer ses boutons flottants. diff --git a/components/carte/CommutateurMode.vue b/components/carte/CommutateurMode.vue index d444bef..c81f469 100644 --- a/components/carte/CommutateurMode.vue +++ b/components/carte/CommutateurMode.vue @@ -58,8 +58,8 @@ function voisin(i: number, pas: number) { flex-shrink: 0; display: flex; align-items: stretch; - gap: var(--space-sm); - padding: 0 var(--space-md); + gap: 0; + padding: 0 var(--space-xs); background: var(--surface); border-bottom: 1px solid var(--border); min-width: 0; @@ -86,7 +86,7 @@ function voisin(i: number, pas: number) { } .modes__onglet[aria-selected='true'] { border-bottom-color: var(--nav-primary-solid); - font-weight: 700; + font-weight: var(--fw-bold); } .modes__lien { margin-left: auto; @@ -99,15 +99,23 @@ function voisin(i: number, pas: number) { outline: 2px solid var(--focus-ring); outline-offset: -2px; } -@media (max-width: 419px) { - .modes { padding: 0 var(--space-xs); gap: 0; } +/* Mobile-first (PROTOCOLE §1, checkpoint 07/11) : étroit en base, « inspirantes » repliée ; à partir de 26.25rem (420 px) le libellé entier et les espacements. */ +.modes__suite { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0 0 0 0); + white-space: nowrap; +} +@media (min-width: 26.25rem) { + .modes { padding: 0 var(--space-md); gap: var(--space-sm); } .modes__suite { - position: absolute; - width: 1px; - height: 1px; - overflow: hidden; - clip: rect(0 0 0 0); - white-space: nowrap; + position: static; + width: auto; + height: auto; + overflow: visible; + clip: auto; } } diff --git a/components/carte/EncartsOutremer.vue b/components/carte/EncartsOutremer.vue index e366bea..394f5a9 100644 --- a/components/carte/EncartsOutremer.vue +++ b/components/carte/EncartsOutremer.vue @@ -147,7 +147,7 @@ onUnmounted(() => { flex-direction: column; gap: var(--space-xs); padding: var(--space-xs); - background: var(--nav-bg); + background: var(--bg); overflow-y: auto; min-height: 0; } @@ -156,7 +156,7 @@ onUnmounted(() => { flex-direction: column; border-radius: var(--radius-md); overflow: hidden; - background: var(--nav-surface); + background: var(--surface); border: 1px solid var(--border); flex-shrink: 0; } @@ -164,12 +164,12 @@ onUnmounted(() => { margin: 0; padding: var(--space-2xs) var(--space-sm); font-size: var(--fs-sm); - font-weight: 600; - color: var(--nav-text); + font-weight: var(--fw-semibold); + color: var(--text); } .encart__n { - font-weight: 400; - color: var(--nav-text-muted); + font-weight: var(--fw-regular); + color: color-mix(in srgb, var(--text) 78%, transparent); /* DESIGN-SYSTEM §Texte atténué, pas --text-muted */ } .encart__carte { height: 170px; diff --git a/scripts/test-seo.mjs b/scripts/test-seo.mjs index e12c3f7..f31b607 100644 --- a/scripts/test-seo.mjs +++ b/scripts/test-seo.mjs @@ -43,6 +43,9 @@ const canoniques = [ [AEP, '/', { mode: 'pratiques', carte: 'graphe', vue: 'carte' }, `${A}/?mode=pratiques&carte=graphe`], [AEP, '/', { mode: 'entraide', fiche: '108' }, `${A}/fiche/108`], [AEP, '/', { mode: 'metropole' }, `${A}/`], + // checkpoint 07/11 : carte=graphe hors du mode pratiques n'est pas une page (écart 1 de la revue spec) + [AEP, '/', { carte: 'graphe' }, `${A}/`], + [AEP, '/', { mode: 'entraide', carte: 'graphe', vue: 'carte' }, `${A}/`], [AEP, '/', { mode: 'outremer', carte: 'metropole' }, `${A}/`], [AEP, '/media', { tab: 'projets', q: 'x' }, `${A}/media?tab=projets`], [AEP, '/outils', { tab: 'simulateurs', random: '1' }, `${A}/outils?tab=simulateurs`], diff --git a/scripts/test-y.mjs b/scripts/test-y.mjs index 7fe2144..543dbfd 100644 --- a/scripts/test-y.mjs +++ b/scripts/test-y.mjs @@ -250,7 +250,7 @@ if (base) { for (const f of ['tableau-ruetz-maison-1200.jpg', 'tableau-ruetz-2400.jpg', 'tableau-ruetz-og.jpg', 'fertival-table.jpg', 'arbre-pastel-600.jpg', 'arbre-pastel-900.jpg', 'arbre-pastel-1200.jpg', 'pastel-pre-800.jpg', 'pastel-pre-1200.jpg', 'pastel-pre-1800.jpg']) { egal(`HTTP média ${f} : 200`, (await get(`/medias/evenements/ruetz/${f}`, EVT)).status, 200) } - egal('HTTP event/agences : 404', (await get('/agences', EVT)).status, 404) + egal('HTTP event/agences : 301 depuis B4a (REDIRECTIONS_EXACTES vaut sur tout hôte, comme les URL mortes de B23)', (await get('/agences', EVT)).status, 301) egal('HTTP aep / : la carte, barre présente', (await get('/')).html.includes('class="app-header'), true) egal('HTTP places page inconnue : 400', (await get('/api/evenements/places?page=x')).status, 400) if (lib.TYPES_SUGGERES.includes('recette')) { diff --git a/utils/seo.ts b/utils/seo.ts index a71354e..53ab3f8 100644 --- a/utils/seo.ts +++ b/utils/seo.ts @@ -139,6 +139,8 @@ export function canonique(host: string | undefined | null, path: string, query: const gardes = PARAMS_GARDES[p] ?? [] const params = new URLSearchParams() for (const k of gardes) { + // B4a : `carte=graphe` n'existe qu'en mode pratiques ; ailleurs c'est la page par défaut (checkpoint 07/11) + if (p === '/' && k === 'carte' && premiere(query.mode).trim() !== 'pratiques') continue const v = premiere(query[k]).trim() const permises = VALEURS_GARDEES[p]?.[k] if (v && (!permises || permises.includes(v))) params.set(k, v)