Compare commits

...

7 Commits

Author SHA1 Message Date
dbd1e14e4e Merge pull request 'fix(glossaire): include standalone relation headings in reading follow' (#304) from fix/glossaire-reading-follow-relations-h2 into main
All checks were successful
Proposer Apply (Queue) / apply-proposer (push) Successful in 21s
CI / build-and-anchors (push) Successful in 42s
SMOKE / smoke (push) Successful in 9s
Deploy staging+live (annotations) / deploy (push) Successful in 7m55s
Reviewed-on: #304
2026-03-26 21:35:00 +01:00
7033354011 fix(glossaire): include standalone relation headings in reading follow
All checks were successful
SMOKE / smoke (push) Successful in 3s
CI / build-and-anchors (push) Successful in 42s
CI / build-and-anchors (pull_request) Successful in 44s
2026-03-26 21:29:26 +01:00
7345730e3c Merge pull request 'fix(glossaire): expose relations heading to reading follow' (#303) from fix/glossaire-relations-follow-heading into main
All checks were successful
Proposer Apply (Queue) / apply-proposer (push) Successful in 24s
CI / build-and-anchors (push) Successful in 50s
SMOKE / smoke (push) Successful in 8s
Deploy staging+live (annotations) / deploy (push) Successful in 9m19s
Reviewed-on: #303
2026-03-26 20:47:02 +01:00
cea94c56db fix(glossaire): expose relations heading to reading follow
All checks were successful
SMOKE / smoke (push) Successful in 4s
CI / build-and-anchors (push) Successful in 41s
CI / build-and-anchors (pull_request) Successful in 43s
2026-03-26 20:42:01 +01:00
c1e24736e3 Merge pull request 'feat(glossaire): deduplicate entry aside relation groups' (#302) from feat/glossaire-entry-aside-dedup into main
All checks were successful
Proposer Apply (Queue) / apply-proposer (push) Successful in 21s
CI / build-and-anchors (push) Successful in 49s
SMOKE / smoke (push) Successful in 4s
Deploy staging+live (annotations) / deploy (push) Successful in 9m41s
Reviewed-on: #302
2026-03-26 20:27:31 +01:00
24bbfbc17f feat(glossaire): deduplicate entry aside relation groups
All checks were successful
SMOKE / smoke (push) Successful in 6s
CI / build-and-anchors (push) Successful in 47s
CI / build-and-anchors (pull_request) Successful in 46s
2026-03-26 20:24:49 +01:00
a11e2f1d18 Merge pull request 'fix(glossaire): compact sticky entry hero on glossary pages' (#301) from fix/glossaire-entry-sticky-hero-collapse into main
All checks were successful
Proposer Apply (Queue) / apply-proposer (push) Successful in 32s
CI / build-and-anchors (push) Successful in 45s
SMOKE / smoke (push) Successful in 8s
Deploy staging+live (annotations) / deploy (push) Successful in 9m18s
Reviewed-on: #301
2026-03-26 18:32:19 +01:00
3 changed files with 56 additions and 6 deletions

View File

@@ -7,12 +7,15 @@ interface Props {
}
const { relationBlocks = [] } = Astro.props;
const relationsHeadingId = "relations-conceptuelles";
---
{relationBlocks.length > 0 && (
<section class="glossary-relations" aria-label="Relations conceptuelles">
<h2>Relations conceptuelles</h2>
<section
class="glossary-relations"
aria-labelledby={relationsHeadingId}
>
<h2 id={relationsHeadingId}>Relations conceptuelles</h2>
<div class="glossary-relations-grid">
{relationBlocks.map((block) => (
<section class={`glossary-relations-card ${block.className}`}>

View File

@@ -1500,6 +1500,7 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ??
.filter(Boolean);
const h2Plain = Array.from(reading.querySelectorAll("h2[id]"))
.filter((h2) => !h2.closest("details.details-section"))
.map((h2) => ({
id: h2.id,
anchor: h2,
@@ -1508,7 +1509,7 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ??
h2,
}));
const H2 = (h2Anchors.length ? h2Anchors : h2Plain)
const H2 = [...h2Anchors, ...h2Plain]
.slice()
.sort((a, b) => absTop(a.marker) - absTop(b.marker));

View File

@@ -201,6 +201,36 @@ export function uniqueGlossaryEntries(
return out;
}
export function slugsOfGlossaryEntries(
entries: GlossaryEntry[] = [],
): Set<string> {
const slugs = new Set<string>();
for (const entry of entries) {
const slug = slugOfGlossaryEntry(entry);
if (!slug) continue;
slugs.add(slug);
}
return slugs;
}
export function excludeGlossaryEntries(
entries: GlossaryEntry[] = [],
excluded: Iterable<string> = [],
): GlossaryEntry[] {
const excludedSlugs = new Set(
Array.from(excluded)
.map((value) => normalizeGlossarySlug(value))
.filter(Boolean),
);
return entries.filter((entry) => {
const slug = slugOfGlossaryEntry(entry);
return Boolean(slug) && !excludedSlugs.has(slug);
});
}
export function resolveGlossaryEntriesInSourceOrder(
slugs: string[] = [],
allEntries: GlossaryEntry[] = [],
@@ -504,11 +534,27 @@ export function getGlossaryEntryAsideData(
allEntries: GlossaryEntry[] = [],
): GlossaryEntryAsideData {
const currentFamily = familyOf(currentEntry);
const currentSlug = slugOfGlossaryEntry(currentEntry);
const fondamentaux = getFondamentaux(allEntries);
const sameFamilyEntries = getEntriesOfSameFamily(currentEntry, allEntries);
const sameFamilyTitle = getSameFamilyTitle(currentEntry);
const relationSections = getRelationSections(currentEntry, allEntries);
const contextualTheory = getContextualTheory(currentEntry, allEntries);
const relationEntries = uniqueGlossaryEntries(
relationSections.flatMap((section) => section.items),
);
const relationSlugs = slugsOfGlossaryEntries(relationEntries);
const contextualTheory = excludeGlossaryEntries(
getContextualTheory(currentEntry, allEntries),
new Set([currentSlug, ...relationSlugs]),
).slice(0, 6);
const contextualTheorySlugs = slugsOfGlossaryEntries(contextualTheory);
const sameFamilyEntries = excludeGlossaryEntries(
getEntriesOfSameFamily(currentEntry, allEntries),
new Set([currentSlug, ...relationSlugs, ...contextualTheorySlugs]),
).slice(0, 8);
const showNoyau =
currentFamily !== "concept-fondamental" &&