Compare commits

..

2 Commits

Author SHA1 Message Date
2e4bc8f583 fix: keep glossary entry details open on compact viewports
All checks were successful
SMOKE / smoke (push) Successful in 4s
CI / build-and-anchors (push) Successful in 38s
CI / build-and-anchors (pull_request) Successful in 34s
2026-04-26 14:04:30 +02:00
8a14ea1d7a Merge pull request 'feat(glossary): add step 21 smart navigation' (#324) from feat/glossary-navigation-step21 into main
All checks were successful
CI / build-and-anchors (push) Successful in 37s
Proposer Apply (Queue) / apply-proposer (push) Successful in 31s
SMOKE / smoke (push) Successful in 18s
Deploy staging+live (annotations) / deploy (push) Successful in 10m22s
Reviewed-on: #324
2026-04-26 11:09:09 +00:00

View File

@@ -2718,6 +2718,16 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ??
const isGlossaryCompactViewport = () =>
isGlossaryEdition &&
(mqGlossaryCompact.matches || mqGlossaryCompactLandscape.matches);
function forceOpenGlossaryEntryDetails() {
if (!isGlossaryEntryMode || !reading) return;
reading.querySelectorAll("details.details-section").forEach((details) => {
details.open = true;
});
}
forceOpenGlossaryEntryDetails();
function disableFollowForCompactGlossary() {
followEl.classList.remove("is-on");
@@ -2745,16 +2755,11 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ??
}
if (isGlossaryHomeMode || isGlossaryCompactViewport()) {
forceOpenGlossaryEntryDetails();
disableFollowForCompactGlossary();
return;
}
if (isGlossaryEntryMode) {
reading.querySelectorAll("details.details-section").forEach((details) => {
details.open = true;
});
}
const h1 = reading.querySelector("h1");
const topChapterLabel =