From 7e497de40e5f0b3797495eb3f80d3a68c41ae44a Mon Sep 17 00:00:00 2001 From: Quentin Rouiller Date: Thu, 23 Apr 2026 17:00:00 +0200 Subject: [PATCH] =?UTF-8?q?Version=202026.5.30=20=E2=80=94=20Absence=20r?= =?UTF-8?q?=C3=A9currente=20cyan=20+=20mode=20compact=2024"=20[code=20inte?= =?UTF-8?q?rpol=C3=A9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- viewer.css | 13 ++++++++----- viewer.js | 54 +++++++++++++++++++++++++++++---------------------- 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/manifest.json b/manifest.json index 830b5d8..6ccde87 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Planification", - "version": "2026.5.29", + "version": "2026.5.30", "description": "Vue claire et rapide du planning des techniciens EasyVista. Regroupe interventions et réservations par tech, affiche horaires, contact, lieu, catégorie et statut en un coup d'œil.", "browser_specific_settings": { "gecko": { diff --git a/viewer.css b/viewer.css index a851e1b..552adb6 100644 --- a/viewer.css +++ b/viewer.css @@ -2622,12 +2622,15 @@ header.topbar::before { v2026.5.23 : refonte complète en style "onglet" single-line, compact ========================================================================== */ .pinned-popup.pinned-popup-minimized { + display: flex !important; + flex-direction: row !important; + align-items: center !important; min-width: 300px !important; - max-width: 360px !important; - width: 300px !important; - height: auto !important; - min-height: 80px !important; - padding: 44px 16px 16px 16px !important; + max-width: 400px !important; + width: auto !important; + height: 36px !important; + min-height: 36px !important; + padding: 0 6px 0 4px !important; overflow: visible; background: var(--bg-elevated) !important; border: 1px solid var(--border) !important; diff --git a/viewer.js b/viewer.js index 3c3bb94..02dc933 100644 --- a/viewer.js +++ b/viewer.js @@ -5275,17 +5275,34 @@ function openPersistentTimelinePopup(el) { return; } const ivIdx = el.dataset.ivIdx; - if (ivIdx === undefined) return; + if (ivIdx === undefined) { + console.log("[persistentTimeline] segment sans ivIdx (hole/absence vide) — abandon"); + return; + } const cardEl = el.closest(".card"); - if (!cardEl) return; + if (!cardEl) { + console.warn("[persistentTimeline] pas de .card parent trouvée"); + return; + } const row = cardEl.querySelector(`.intervention-v2[data-iv-idx="${ivIdx}"]`); - if (!row) return; + if (!row) { + console.warn(`[persistentTimeline] row intervention-v2[data-iv-idx="${ivIdx}"] introuvable`); + return; + } const actionId = row.dataset.actionId; const iv = findIvByActionId(actionId); - if (!iv) return; + if (!iv) { + console.warn(`[persistentTimeline] iv pour actionId=${actionId} introuvable`); + return; + } const tip = tooltipEl(); - if (!tip) return; + if (!tip) { + console.warn("[persistentTimeline] tooltipEl() null"); + return; + } + + console.log(`[persistentTimeline] ouverture grande popup pour iv actionId=${actionId}`); // Nettoyer tout état précédent (ancrage, épinglage, timers) bulleState.pinned = false; @@ -5298,29 +5315,20 @@ function openPersistentTimelinePopup(el) { tip.innerHTML = buildTooltipHTML(iv); tip.classList.remove("hidden"); tip.classList.add("visible"); - // mode "anchored" : le hover ne doit pas la remplacer par une autre popup + // mode "anchored" : le hover timeline ne doit pas la remplacer par la petite popup tip.dataset.mode = "anchored"; state.currentTooltipIv = iv; - // Position : juste sous le segment timeline. D'abord on reset les coords - // pour que getBoundingClientRect() reflète la vraie taille du nouveau - // contenu. + // v2026.5.34 : utiliser positionTooltipAnchored() unifié, en préférant + // dessous (sous le segment timeline) via opts.anchorBelow = true. + // + // D'abord on reset les coords pour que le tipRect soit correctement mesuré + // avec le nouveau contenu. tip.style.left = "-9999px"; tip.style.top = "0px"; - // Forcer un reflow pour que tipRect soit à jour avec le nouveau contenu - const tipRect = tip.getBoundingClientRect(); - const r = el.getBoundingClientRect(); - let x = r.left; - let y = r.bottom + 8; - if (x + tipRect.width > window.innerWidth - 8) x = window.innerWidth - tipRect.width - 8; - if (x < 4) x = 4; - if (y + tipRect.height > window.innerHeight - 8) { - y = r.top - tipRect.height - 8; - } - if (y < 4) y = 4; - - // Positionner proprement (avec détection auto fixed vs abs) - setTooltipViewportPosition(x, y); + // Force reflow + void tip.offsetWidth; + positionTooltipAnchored(el, { anchorBelow: true }); } function showTimelinePopover(e, el) {