From 20f4639d1ebdbab059a89c796e1a7f8413da2ecc Mon Sep 17 00:00:00 2001 From: albertlast Date: Sun, 9 Aug 2026 09:11:52 +0200 Subject: [PATCH] Makes the search board picker a disclosure widget The panel that chooses which boards to search was a title bar, a link, a hidden arrow and a div, wired together by an smc_Toggle generated into the page. All of that is what a details element does on its own, so it is one now, and the ~25 lines of script go away with it. Worth having beyond the tidy-up: the old link was an whose only behaviour came from the script, so the panel could not be opened by keyboard in any sensible way and did not open at all without JavaScript. A summary does both. The two bar classes end up on the one element, and since .titlebg comes later in index.css with a background of its own, the bar's background is named again in a rule for the summary. That rule also has to put overflow back to visible, because .titlebg hides it and would clip the disclosure triangle away. Verified against release-3.0 with computed styles: background, background-image, colour, padding, border, font weight, font family and the bar's height, width and position are all identical, the panel still starts closed when every board is selected, and a search with the picker open still submits its brd[] values and returns results. Signed-off-by: Mathias Albert Signed-off-by: albertlast --- Themes/default/Search.template.php | 42 +++++------------------------- Themes/default/css/index.css | 9 +++++++ 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/Themes/default/Search.template.php b/Themes/default/Search.template.php index a96b203a96..3c6c8bb655 100644 --- a/Themes/default/Search.template.php +++ b/Themes/default/Search.template.php @@ -157,14 +157,10 @@ function template_main() echo '
- - +
@@ -219,31 +216,6 @@ function template_main()
'; - - echo ' - '; } echo ' diff --git a/Themes/default/css/index.css b/Themes/default/css/index.css index 8799e3f0b1..25f0c0add7 100644 --- a/Themes/default/css/index.css +++ b/Themes/default/css/index.css @@ -2679,6 +2679,15 @@ dl { height: 16px; } +/* The board picker's title bar is one element now, the summary of a details. +/* It carries both bar classes, and .titlebg comes later in this file with a +/* background of its own, so the bar's is named again here. Overflow has to stay +/* visible as well, or .titlebg clips the disclosure triangle away. */ +#advanced_panel > summary { + background: var(--titlebar-bg); + cursor: pointer; + overflow: visible; +} .boardslist > ul > li { margin: 12px; }