fix(carte): checkpoint B4a du 07/11 : canonique sans carte=graphe hors pratiques, commutateur mobile-first, tokens des encarts
Revue à deux axes (spec 5 écarts, standards 10 violations, 0 bloquant) : - utils/seo.ts : `carte=graphe` n'entre dans la canonique de `/` qu'en mode pratiques (sinon doublon de `/`) ; deux cas ajoutés à test-seo - CommutateurMode.vue : la media query `max-width: 419px` devient `min-width: 26.25rem` (PROTOCOLE §1, mobile-first) ; `700` → `--fw-bold` - EncartsOutremer.vue : `--nav-bg/--nav-surface/--nav-text` → `--bg/--surface/--text` (DESIGN-SYSTEM §tokens), compteur en `color-mix(var(--text) 78 %)` au lieu de `--text-muted`, graisses en tokens - test-y.mjs : `/agences` sur l'hôte event répond 301 depuis B4a (REDIRECTIONS_EXACTES vaut sur tout hôte, comme B23), plus 404 - DESIGN-SYSTEM.md : deux phrases qui décrivaient encore `/agences` comme une page vivante Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWGVmzQw2398GfC9dryH1Y
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
446b69ea94
commit
a39a861ee7
+2
-2
@@ -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
|
||||
</VueFiches>
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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`],
|
||||
|
||||
+1
-1
@@ -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')) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user