From 8e5a2cf49f498321a089d01341aab80fd30f2269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 30 Oct 2026 03:20:07 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20a=20CI=20job's=20log=20?= =?UTF-8?q?bar=20shows=20its=20previous=20and=20next=20match=20arrows=20on?= =?UTF-8?q?ly=20while=20the=20log=20search=20has=20matches,=20instead=20of?= =?UTF-8?q?=20two=20arrows=20that=20did=20nothing=20before=20a=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/forge-web/assets/nav.js | 3 +++ style/main.scss | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/crates/forge-web/assets/nav.js b/crates/forge-web/assets/nav.js index 16a1c9e..d4e6cb6 100644 --- a/crates/forge-web/assets/nav.js +++ b/crates/forge-web/assets/nav.js @@ -2115,11 +2115,14 @@ pre._ci.hit = -1; } + // Writes the match counter. The previous and next buttons show only while there are matches. function logCount(text, none) { var out = document.querySelector('[data-log-count]'); if (!out) { return; } out.textContent = text; out.classList.toggle('ci-none', !!none); + var bar = out.closest('.ci-logbar'); + if (bar) { bar.classList.toggle('has-hits', !!text && !none); } } // Highlights every match of `q` (case-insensitive) in the log and selects the one at `keep`. diff --git a/style/main.scss b/style/main.scss index 4d8f27e..65f8ef6 100644 --- a/style/main.scss +++ b/style/main.scss @@ -4914,6 +4914,12 @@ button.ci-mini { font-size: 0.8125rem; } +// The log's previous and next match buttons show only while a search has matches. +.ci-logbar:not(.has-hits) [data-log-prev], +.ci-logbar:not(.has-hits) [data-log-next] { + display: none; +} + // The config keys this forge ignored, above the timeline. .ci-warnings { margin: 8px 0 12px;