From cfbb4c983beb8e153460ccd25d38d213d721cf00 Mon Sep 17 00:00:00 2001 From: Tammo ter Hark Date: Thu, 26 Nov 2026 19:14:47 +0100 Subject: [PATCH] feat(options): roll the color-chooser scheme out to 4 more options (row 135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- config.xml | 61 +++++++++++-- options/options.js | 106 ++++++++++++++--------- options/options.twig | 29 +++++-- variants/build.php | 21 +++-- views/subviews/header/custom_header.twig | 30 ++++++- 5 files changed, 184 insertions(+), 63 deletions(-) diff --git a/config.xml b/config.xml index a1a876c..d95d9ab 100644 --- a/config.xml +++ b/config.xml @@ -205,8 +205,27 @@ - #ffffff + default white #ffffff. EXCEPTION (row 135): the HEADER background color + is part of the color-chooser scheme below — default "Default background + color". --> + + defaultbackgroundcolor + + + + + + + + + #ffffff + color1 + + + + + + + + + #5e1c64 + defaultbackgroundcolor + + + + + + + + + #eeeeee + default + + + + + + + + + #ffffff lightyellow