From 0f57fb89207b9b1e0299541f0cc573f5dc0182d8 Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Mon, 16 Mar 2026 23:37:11 +0100 Subject: [PATCH] [fix](trx-frontend-http): fix axis bookmark chip positioning after name span addition querySelectorAll("span") was picking up the inner .spectrum-bookmark-name spans added in the previous commit, causing chips[i] to map to the wrong element during left-position assignment. Switch to :scope > span to select only direct-child chip spans. Also revert axis bar from height:auto (which breaks the CSS transition and collapses the bar) to height:38px with overflow:visible to accommodate two-line labels while keeping the open/close animation intact. Co-authored-by: Claude Sonnet 4.6 Signed-off-by: Stanislaw Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 2 +- .../trx-frontend/trx-frontend-http/assets/web/style.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 939c483..6dfd413 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -8734,7 +8734,7 @@ function updateBookmarkAxis(range) { // Always recompute horizontal positions (pan/zoom changes frac every frame). const axisWidth = axisEl.clientWidth || 0; const edgePad = 8; - const spans = axisEl.querySelectorAll("span"); + const spans = axisEl.querySelectorAll(":scope > span"); visBookmarks.forEach((bm, i) => { const span = spans[i]; if (!span) return; diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css index 2ad1bbf..fe196b9 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css @@ -2901,8 +2901,8 @@ button:focus-visible, input:focus-visible, select:focus-visible { transition: height 80ms ease; } #spectrum-bookmark-axis.bm-axis-visible { - min-height: 26px; - height: auto; + height: 38px; + overflow: visible; } .spectrum-bookmark-chip { position: absolute;