Commit graph

142 commits

Author SHA1 Message Date
2a41c36854 chore(files): remove text175.png
Owner indicated the uploaded text175.png image is not needed after all.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 19:59:41 +01:00
e190c8cae3 chore(files): update left/right header logos, add text175.png
Owner's own image changes in the theme's files/ folder (uploaded 2026-11-27):
logo-left.png and logo-right.png replaced, text175.png added.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 19:57:20 +01:00
3e370322e7 fix(header): exact logo-top margin (0px touches top); menu texts on their own header row
- nav_bar.twig: header split into two rows — row 1 .survey-nav-logo-row holds
  all logos (left far left, center absolutely centered in the row, right
  ms-auto far right) so they align; row 2 #navbar holds the menu texts
  (language changer, save/clear all, question index) full-width, right-aligned
- sass/plain.sass (leading): #survey-nav align-items:flex-start, container
  stretch, .survey-nav-logo-row relative/w-100, .logo-container and its img
  padding-top:0, .logo-center top:0 translateX(-50%); dropped .logo-right
  margin-left:0 (ms-auto now on the element)
- css/plain.css: compiled from sass with dart-sass (export guard green)
- custom_header.twig: <pos>logotopmargin now emitted as margin-top on the
  .logo-*.logo-container, so the value is the EXACT distance from the top of
  the header to the logo (0px = logo touches the top of the page)
- README.md: header layout + logo-top-distance sections updated

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 19:56:11 +01:00
dc2f09e73c fix(options): Page background tab in two col-md-6 columns; option wrappers full column width
Row 163/164: the Page background pane used three col-md-4 columns with an
empty third, and its option wrappers rendered col-12 col-md-<width> inside
the slot columns (bImagesPane was missing from the wrapClass condition), so
each option only used the left part of its column. Now two col-md-6 columns
under the full-width h2/p intro, wrappers plain col-12; config.xml widths
of the 6 Page background options 4 -> 6 (width = pane column width).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:40:45 +01:00
d05b5ce226 refactor(options): rename the 'Top of the page' tab to 'Header'
Row 161. Tab label and config.xml category both become 'Header' (standing
rule row 160: category = tab label), so the core options renderer also
shows a 'Header' tab. The tab id stays 'top-of-page' so stored tab
preferences and the options.js #top-of-page hook keep working.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:17:57 +01:00
cafa8fe116 refactor(config): order and width of options now mirror the options.twig layout
Row 160 (standing rule): config.xml stays analogue to options.twig —
categories in the tab-row order, options within a category in the exact
render order of the pane (aTopOfPageKeys/aImagesPaneKeys/aGroupKeys), and
width = the pane column width (Groups 6, three-column panes 4, fonts
colors row 3, full-width rows 12), so the core options renderer
(optionspage=core) lays out the same structure. No option values changed.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:15:30 +01:00
cbcf3c75bd refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
030974054a Deleted two superflous image files. 2026-11-27 03:02:59 +01:00
71396c3cb9 fix(options): rename 'Font for group titles' to singular 'Font for group title'
Row 158: matches the singular wording of column 2 ('Font for group
description') in the Groups tab.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 02:53:07 +01:00
956324775b feat(options): Groups tab with intro and two columns; group colors become color choosers; font options Normal|Bold|Italic|Bold italic
Row 157. Groups pane gets a full-width h2 'Groups' + explanatory text and a
two-column slot layout: col 1 = group title options (font, color, custom,
size, font options), col 2 = same for the group description (singular wording).
grouptitletextcolor/groupdescriptiontextcolor switch from the old 4-way
dropdown to the row-135 color chooser (6 modes, default 'Default font color',
swatch chips, grayed-out custom picker unless 'other'); legacy stored modes
primary/secondary and raw hex migrate client-side (options.js) and in the views.
The old *fontweight keys (400|700) become *fontoptions (normal|bold|italic|
bolditalic), mapped to font-weight/font-style in custom_header.twig with a
legacy 400/700 fallback until theme reset. build.php migrates variant jsons
(chooser hex/modes + fontweight keys). OPTIONS_JS_TOKEN 20261127.1.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 02:50:06 +01:00
d6889067c0 chore: commit owner's README title/description tweak and placeholder logos
README.md: theme title line "Vanilla Respondage — LimeSurvey theme (version 6/7
compatible), extension of the core Vanilla theme by Respondage" and intro wording;
plus the placeholder files/logo-left.png and files/logo-right.png (default left
and right header logos).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 21:13:59 +01:00
90a65b3d65 chore(variants): add bodybackgroundcolor to build.php chooser migration (row 149)
Missed in the row-149 commit: the legacy-hex -> mode "other" + <key>custom
migration list now also covers bodybackgroundcolor, matching aColorChooserKeys
in options.js/options.twig.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 21:09:06 +01:00
8fad17f56d fix(options): move the upload facility into column 2 of the Page background tab
The "Upload an image" widget (with its scope-dependent help text) now renders
inside column 2, under the background image options, instead of full-width at
the bottom of the tab. Column 2 carries option-visibility on the
backgroundimage switch, so the upload only appears when the background image
is on. The full-width hr at the bottom of the pane is removed; the in-column
hr in column 1 stays.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 21:03:32 +01:00
7bf5437596 feat(options): rebuild Page background tab layout; overall background color becomes a color chooser
Page background tab (config.xml "Images" category), new layout:
- full-width h2 "Page background (behind the body of the page)" + intro text
  "Set the page background here. Either just a solid color or an image."
- three columns: col 1 = Overall background color + custom picker, an in-column
  hr, then Background image on/off; col 2 = background image file / fixed-or-scroll /
  display, hidden as a whole column when the image is off (the column itself carries
  option-visibility on backgroundimage); col 3 empty
- full-width hr, then the image upload facility full width with the same
  scope-dependent help text as in the Top of the page tab

bodybackgroundcolor is now a color-chooser dropdown (modes default|
defaultbackgroundcolor|color1|color2|color3|other) with a bodybackgroundcolorcustom
child; its default is "Default background color". Added to aColorChooserKeys in
options.twig/options.js and to the legacy-hex migration in variants/build.php;
custom_header.twig resolves the mode via the cm() macro (raw hex still passes through).
OPTIONS_JS_TOKEN -> 20261126.19.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:57:07 +01:00
efa2cf53f3 feat(options): rename "Simple options" tab to "Other options" and move it to the end
The config.xml "Simple options" category now renders as the "Other options" tab,
appended after all other category tabs (tab id kept as category-simple-options
so the stored tab preference stays valid).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:42:11 +01:00
11a617a29b feat(options): rename Images tab to "Page background" after Top of the page; new "Groups" tab
Tab order is now: Default fonts and colors > Top of the page > Page background
(the config.xml "Images" category, tab id kept as category-images so the stored
tab preference stays valid) > Groups > Simple options > Questions.

The new "Groups" tab (id "groups") contains all ten group-related options that
lived in the Questions tab: grouptitlefont, grouptitletextcolor(+custom),
groupdescriptionfont, groupdescriptiontextcolor(+custom), grouptitlefontsize,
grouptitlefontweight, groupdescriptionfontsize, groupdescriptionfontweight.
They are excluded from the Questions pane; values are stored per option key, so
no theme reset is needed and stored values are untouched.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:39:44 +01:00
c6bc8f1451 fix(options): shorten custom color picker labels to "(for 'Other ...')"
All five *custom colorpicker child option titles in config.xml changed from
"(used when 'Other ...' is chosen)" to "(for 'Other ...')".

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:30:10 +01:00
3a12bb6b7d fix(options): make both parts of the custom color picker exactly equal height
Setting the height only on the inner input[type=color] (1.5em) did not equalize
the bar in the real admin page. Now BOTH direct children of the picker input
group — the swatch part (.style__colorpicker) and the text input
(.selector__color-picker) — get the same explicit height
calc(1.5rem + 0.75rem + 2px) (the .form-control line box incl. padding and
border), with box-sizing: border-box. The selector specificity beats any
framework .form-control / .input-group-text rule, so the equality holds
regardless of which Bootstrap build wins on the admin page.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:27:25 +01:00
94a203a133 fix(options): render newline in button optionlabels as <br> (Base font size "XLarge / (20 px)")
The fontsize option label "XLarge&#10;(20 px)" in config.xml survived XML
parsing as a real newline, but gT() html-escapes LF to &#10; (HTMLEscape),
so splitting the gT()'d label on "\n" was a no-op and the entity printed
literally. Split the raw label first, then gT() each part separately.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:21:33 +01:00
02e9babe7c fix(options): custom color picker group — equal-height parts, no third "effective" swatch
Row 143: the input group of a color-chooser's custom picker (shown when "Other
..." is chosen) had three parts and two problems:
1. The text input was lower than the swatch part (.input-group-text holding
   input[type=color], whose default height exceeds the form-control line box).
   Fixed in the inline <style> of options.twig: the color input is set to the
   same line box as .form-control (height: 1.5em), so swatch part and text
   input are both calc(1.5em + 0.75rem + 2px) tall.
2. The third part — the appended "effective color" swatch
   (.color-mode-effective) — is removed entirely (options.js refreshEffective /
   effectiveColor deleted, CSS rule deleted). The group is now just swatch +
   text input.
OPTIONS_JS_TOKEN -> 20261126.18. Verified: render tc=663 (no color-mode-effective
in the page, options.js?v=20261126.18), jsdom 7/7 incl. new pins (no third part
in the DOM at load or after mode changes; equal-height rule present; stale rule
gone), export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:09:56 +01:00
cd62f2f752 feat(options): rename navbarfontcolor to "Text color in header"; re-measure header alignment on tab show
Row 142, two changes:
1. The navbarfontcolor option is renamed "Menu item color in header" ->
   "Text color in header" (child: "Custom text color in header ..."). Labels
   are read live from config.xml, no reset needed.
2. The header background color column alignment (row 136) is now re-measured
   when the Top-of-page tab is shown (shown.bs.tab) and on window resize, and
   after the stored-tab restore (row 133) when that tab is Top-of-page. Reason:
   at page load the Top-of-page pane is usually hidden (display:none), where
   getBoundingClientRect returns 0 — so the one-shot measurement in run()
   computed a 0 offset and the background column was never lowered on the real
   page. OPTIONS_JS_TOKEN -> 20261126.17. Verified: render tc=663 (new label,
   old label gone, options.js?v=20261126.17), jsdom 7/7 incl. new pins (padding
   re-applied on shown.bs.tab, label renamed), export exit 0. Variants not
   rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 20:04:33 +01:00
53a11e14e1 feat(options): scope-dependent translatable help text under the upload widget
Row 141: the help text under the upload facility in the Top-of-page tab now
depends on where the options page is shown (bInherit = sid/gsid present):
- global theme settings: "Upload here the files for logos and background. You
  are in global settings now, so files that you upload here are available for
  all surveys. If you want a file to be available only for your specific
  survey, upload it at the theme settings options page for that specific
  survey."
- survey / survey-group settings: "Upload here the files for logos and
  background. You are in the settings for your specific survey now, so files
  that you upload here are available for this survey only. If you want a file
  to be available for all surveys, upload it at the global theme settings
  options page."
Both variants go through gT() (translatable via the message catalogs / DB
message tables). Typos in the request were corrected ("Your are" -> "You are",
"you specific" -> "your specific", "only for surveys" -> "for all surveys").

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:58:19 +01:00
33f359f12c feat(options): translatable help text under the upload widget in Top of the page
Row 140: under the upload-a-file row (added in row 139 under the logos row of
the "Top of the page" tab) a help text is now rendered:
"Here you can upload logo images for use in your surveys." — wrapped in
.form-text and passed through gT(), so it is translatable via the usual
message catalogs (gettext .mo files or the lime_source_message/lime_message
tables), like every other string on the options page.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:49:47 +01:00
4f19b1a26f feat(options): upload-a-file facility also under the logos row of Top of the page
Row 139: the "Upload an image" widget is no longer tied to the Images tab —
a new row with a single element (the upload control + progress bar) is
rendered directly under the logos row of the "Top of the page" tab, with its
own ids (#upload_image_frontend_top / #upload_progress_frontend_top).
options.js binds a second BindUpload instance on the same shared
#upload_frontend form for those ids, so both widgets upload and both feed
addUploadedImageToSelectors (a fresh upload becomes selectable in the image
dropdowns immediately). The original Images-tab widget is unchanged.
OPTIONS_JS_TOKEN -> 20261126.16. Verified: render tc=648 (new ids exactly
once, original id once, widget sits after logo-columns-hr, divs 324/324,
options.js?v=20261126.16), jsdom 7/7 incl. new pins (id uniqueness, position
under the logos row, change handler bound on BOTH file inputs), export
exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:46:18 +01:00
1d0161374b feat(theme): default logos left/center/right + 30px top margin + 90px header bar
Row 138: default look of the mother theme:
- brandlogofile default -> ./files/logo-left.png (left)
- centerlogofile default -> ./files/logo.png (center, was "off")
- rightlogofile default -> ./files/logo-right.png (right, was "off")
  so all three logos are visible by default
- brand/center/rightlogotopmargin defaults 15 -> 30 (px added in the view)
- new option headerheight (Top of the page tab, col 3 next to the sticky
  checkboxes, default 90) applied in custom_header.twig as min-height on
  #survey-nav (min-height so taller logos can still grow the bar; the sticky
  body padding in scripts/custom.js follows the real nav height)
- sticky defaults were already computer on / tablet on / mobile off (unchanged)

Core normalizes ./files/x on theme reset to image::theme::files/x, so the
config defaults keep the ./files/ style like the existing one. The PNG files
logo-left.png / logo-right.png remain the owner's untracked files (Prompt PL).
Verified: options render tc=633 (headerheight field present, logo dropdowns
list all three files, divs balanced); live survey 282267 with the defaults
applied to the DB row: three logo imgs (logo-left/logo/logo-right),
padding-top 30px on all logo imgs, min-height 90px on #survey-nav, fixed-top
media queries only for computer+tablet (mobile non-sticky) — DB row restored
afterwards; jsdom 7/7; export exit 0. Theme reset needed for the new defaults
to land in the DB. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:41:12 +01:00
8f46af54d6 fix(options): rename "Extra large (20 px)" button label to "XLarge (20 px)"
Row 137: the Base font size option (column 3 of the top row of the
"Default fonts and colors" tab) had the button label "Extra large (20 px)";
renamed to "XLarge (20 px)" in config.xml optionlabels. Labels are read live
from config.xml on the options page, so no theme reset is needed.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:27:43 +01:00
f812268ffa feat(options): header row of Top-of-page tab — font+color in col 1, background in col 2
Row 136: in the "Top of the page" tab the header section columns are swapped:
column 1 now holds the header font (headerfont) with the menu item color
(navbarfontcolor + custom picker) stacked below it; column 2 holds the header
background color (headerbackgroundcolor + custom). Slot mapping changed
accordingly (headerfont/navbarfontcolor(+custom) = h1 = row+col 1, header
background = h2 = col 2, sticky = h3 = col 3) and aTopOfPageKeys reordered.

The header background color in column 2 is lowered to align with the color
option in column 1: a new alignHeaderColumns step in options.js measures the
vertical offset between the navbarfontcolor block and the background column
(getBoundingClientRect, no hardcoded px) and applies it as padding-top on the
background column. OPTIONS_JS_TOKEN -> 20261126.15. Verified: render tc=633
(col1 = headerfont+navbarfontcolor, col2 = headerbackgroundcolor, divs 312/312,
options.js?v=20261126.15), jsdom 7/7 incl. new pins (header row order in raw
HTML; measured padding-top applied with a faked getBoundingClientRect), export
exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:25:22 +01:00
cfbb4c983b feat(options): roll the color-chooser scheme out to 4 more options (row 135)
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
<key>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 <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
57c7009ec2 fix(options): mark the default color choice with [ ] in the dropdown, not bold
Row 134: bolding <option> text is not rendered by every browser (native
dropdown popups ignore it), so the default entry of a color-chooser dropdown
is now enclosed in square brackets instead — e.g. "[Default font color]
[#444444]". The brackets live in config.xml on the <option data-default="1">
(navbarfontcolor + the five <el>textcolor dropdowns), so they show even before
JS runs; options.js strips and re-adds them idempotently while appending the
live hexcode. Removed from the dropdown list: the <b> wrap (row 129), the
inline font-weight (row 132), the CSS option[data-default] rule and the
:has() closed-select rule. The bold REMAINS only on the swatch label below the
swatch (.color-chip-label.is-default), where it renders reliably.
OPTIONS_JS_TOKEN -> 20261126.13. Verified: render tc=618 (raw option
"[Default font color]", served options.js?v=20261126.13), jsdom 6/6 incl.
pins (label "[Default font color] [#444444]", no <b>/inline bold/stale CSS
rules, non-default not bracketed, swatch label still bold), export exit 0.
Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 18:51:41 +01:00
1b6ae85f83 feat(options): return to the options tab you were on after Save
Row 133: after changing an option on a non-first tab and saving, the page
reloaded on the first tab. The active tab button id is now stored in
sessionStorage on every tab click (keyed per options-page URL: pathname +
sid/gsid scope, so global and per-survey pages don't clash and volatile
redirect params cannot change the key), and on page load the stored tab is
re-activated by class toggling (nav-link active/aria-selected + pane
active/show) — no Bootstrap API needed. OPTIONS_JS_TOKEN -> 20261126.12.
Verified: render tc=618 (served options.js?v=20261126.12), jsdom 6/6 incl.
new pins (tab click stores the id; a fresh load with the id pre-seeded
activates the stored tab and pane, first tab inactive), export exit 0.
Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 18:45:16 +01:00
4d5dd1e746 fix(options): bold the default color choice through every browser mechanism
Row 132: after cache clear + theme reset + hard refresh the default entry of
the color-chooser dropdown still was not bold in the owner's browser — not
every browser applies font-weight to <option> elements (Safari ignores option
styling entirely; the closed select box often ignores it too), even though
the data-default attribute and <b> were in the DOM. Now stacked:
1. CSS rule select option[data-default="1"] { font-weight: 700 } (existing),
2. a real <b> around the default label (row 129, existing),
3. inline style font-weight:700 on the default <option> (new in options.js),
4. .action_update_options_string_form select:has(option[data-default="1"]:checked)
   { font-weight: 700 } — bolds the CLOSED select box when the default choice
   is selected (new in options.twig inline <style>),
5. the swatch chip label of the default stays bold via .is-default (row 126).
Also: the default mode is now read with a fallback chain (data-default option
-> data-inheritvalue -> first non-inherit option) so the swatch label bold
cannot silently disappear. OPTIONS_JS_TOKEN -> 20261126.11. Verified: render
tc=618 (served as options.js?v=20261126.11, :has rule present in HTML), jsdom
6/6 incl. new pins (inline font-weight on the default option only, :has rule
in the inline style), export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 16:59:01 +01:00
1a60918630 feat(options): color-chooser option texts with live hexcodes, default bold
Row 131: the navbarfontcolor dropdown entries now read exactly "Default font
color", "Default background color", "Color 1", "Color 2", "Color 3",
"Other ..." (config.xml options/optionlabels/dropdownoptions renamed from
"Same as default font color" / "Other…"). options.js appends each entry's
chosen hexcode in brackets — presets from their color option fields,
"Other ..." from the custom picker's value (navbarfontcolorcustom) — and the
entry marked data-default="1" stays bold via a real <b> (row 129) plus CSS.
Rendered list example: bold "Default font color [#444444]", "Default
background color [#ffffff]", "Color 1 [#5e1c64]", ..., "Other ... [#444444]".
OPTIONS_JS_TOKEN -> 20261126.10. Verified: render tc=603 (raw option texts
match the list), jsdom 6/6 incl. new pins (exact label texts, hex on
"Other ..." and "Default background color" entries, <b> only on default),
export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 16:49:35 +01:00
f26ee734d4 fix(options): inserted h2 section headers at 24px instead of h1-sized
Row 128 made the section headers ("Header", "Logos", "Default font",
"Default colors", "Progress bar") exactly h1-sized (2.5rem at desktop),
which turned out too big — row 130 fixes them at a flat 24px. The modal
title h2.modal-title stays excluded. No options.js change ->
OPTIONS_JS_TOKEN stays 20261126.9. Verified: render tc=588 (rule in served
HTML), jsdom 6/6 incl. updated pin (24px rule present, no stale calc/2.5rem
rule), export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 16:36:11 +01:00
920f0347c7 fix(options): default choice in the color dropdown bold via a real <b> element
Row 126 marked the default choice with data-default="1" and bolded it via
CSS (select option[data-default="1"]), but not every browser applies
font-weight to <option> elements, so the entry could still render non-bold.
refreshLabels in options.js now wraps the default option's label (including
its live hex) in a real <b> element, on top of the CSS rule — bold in every
browser. Non-default options stay plain. OPTIONS_JS_TOKEN -> 20261126.9.
Verified: render tc=588 (served as options.js?v=20261126.9), jsdom 6/6 incl.
new pins (default option contains <b> with its label, color1 has no <b>),
export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 15:59:46 +01:00
6170efc7a8 feat(options): inserted h2 section headers as big as the h1 header
Row 128: the section headers this options page inserts inside the tab panes
("Header", "Logos", "Default font", "Default colors", "Progress bar")
were Bootstrap h2-sized. The inline <style> of options.twig now applies to
.tab-content h2:not(.modal-title) the exact same rule Bootstrap applies to
h1 — font-size: calc(1.375rem + 1.5vw), 2.5rem at >=1200px — so they render
just as big as the h1 page header at every viewport. The modal title
h2.modal-title is outside .tab-content and explicitly excluded. No options.js
change -> OPTIONS_JS_TOKEN stays 20261126.8. Verified: render tc=588, jsdom
6/6 incl. a new pin (calc rule + 2.5rem media rule present, modal-title
excluded); export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 15:55:28 +01:00
6b75739d2b feat(options): labels above option fields at 16px (checkbox labels untouched)
Row 127: the .form-label elements ABOVE the option controls were rendering
at 14px — the same size as the option texts. The inline <style> of
options.twig now sets .action_update_options_string_form .form-label to
font-size: 16px. Labels NEXT TO checkboxes (.form-check-label) are
deliberately not covered by the rule. No options.js change, so
OPTIONS_JS_TOKEN stays 20261126.8. Verified: render tc=588 (rule present
in the served page), jsdom 6/6 incl. a new pin asserting the 16px rule
exists and that no rule sets 16px on .form-check-label; export exit 0.
Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 15:52:43 +01:00
6300beaa88 feat(options): show the default choice of a color-chooser in bold (data-default marker)
The 5 named color choices were already in the requested order (row 125):
Default font color | Default background color | Color 1 | Color 2 | Color 3
('Other…' stays as the 6th dropdown entry that opens the custom picker).

New: the option's default choice is now visually marked. config.xml marks
the default <option data-default="1"> of every color-chooser dropdown
(navbarfontcolor + the five <el>textcolor dropdowns); options.twig's inline
<style> renders those options bold (select option[data-default="1"]) and
options.js adds .is-default (bold) to the matching swatch label, reading the
default from the DOM so any future chooser gets it automatically. For
navbarfontcolor the default is 'default' = 'Same as default font color'.
OPTIONS_JS_TOKEN -> 20261126.8. Verified: render tc=588 (dropdown order
default,defaultbackgroundcolor,color1,color2,color3,other with
data-default on 'default'; served as options.js?v=20261126.8), jsdom 6/6
incl. 4 new row-126 pins, export_public.sh exit 0. No view changes, live
survey unaffected. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 15:50:28 +01:00
2f08e86335 feat(options): Default background color as 2nd choice; label 'Menu item color in header'; per-option default
- navbarfontcolor dropdown reordered to default|defaultbackgroundcolor|
  color1|color2|color3|other (options attr, optionlabels, dropdownoptions),
  and the swatch chips follow the same order (presets map key order in
  options.js) — 'Default background color' is now the second choice.
- Label of navbarfontcolor changed to 'Menu item color in header' (child
  navbarfontcolorcustom -> 'Custom menu item color ...').
- Per-option default mechanism made explicit: the config.xml <default> of a
  color-chooser dropdown is that option's default choice (stored on theme
  reset); navbarfontcolor keeps default 'default' = 'Same as default font
  color'. The JS no-value fallback no longer hardcodes 'default' but falls
  back to data-inheritvalue / the first non-inherit dropdown entry, so a
  future chooser (e.g. questiontitlebackgroundcolor defaulting to color1)
  can set its own default. custom_header.twig mapping unchanged.
- OPTIONS_JS_TOKEN -> 20261126.7. Verified: render tc=573 (dropdown order
  default,defaultbackgroundcolor,color1,color2,color3,other; label; divs
  balanced; served as options.js?v=20261126.7), jsdom 6/6 incl. new pins
  (dropdown order + chip order, Default background color 2nd), live survey
  282267 with stored mode 'default' renders navbar menu color = fontcolor
  #444444, export_public.sh exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 15:13:45 +01:00
12ec2820da feat(options): 'Default background color' as 4th column of the colors row + 5th swatch preset
New colorpicker option defaultbackgroundcolor (category Fonts, default
#ffffff), rendered as column 1 of the second row of the 'Default fonts and
colors' tab — that colors row is now 4 columns (col-md-3 each; the top row
stays 3 x col-md-4). The experimental color chooser (navbarfontcolor dropdown
+ swatch chips) gains this color as a 5th preset: dropdown option
'defaultbackgroundcolor', 5 swatch chips with live hex labels, presets map in
options.js extended, and custom_header.twig maps the mode to the option value.
OPTIONS_JS_TOKEN -> 20261126.6. Verified: render tc=558 (colors row =
defaultbackgroundcolor|primarycolor|secondarycolor|tertiarycolor in 4 col-md-3,
top row unchanged, divs balanced, dropdown has 6 options), jsdom suite 6/6
(5 chips pinned), live survey 282267 with mode defaultbackgroundcolor ->
#aabbcc (DB row restored), export 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:57:25 +01:00
8a6cf1f919 fix(options): swatch-click outline moves even if a change handler throws
Row 122 follow-up: the outline followed dropdown changes (delegated document
handler, native events bubble) but not swatch clicks — the click handler did
sel.val(mode).trigger('change'); refreshAll();, and when the synthetic change
chain throws on the real page, jQuery aborts the rest of the click handler, so
refreshAll() never ran. Now the click handler sets the value and refreshes
FIRST, then fires trigger('change') inside try/catch. OPTIONS_JS_TOKEN ->
20261126.5. jsdom regression test: a throwing change handler on the select + chip
click still moves the outline (plus the existing dropdown/other assertions).
Suite 6/6, export 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:46:19 +01:00
1c89032339 fix(options): active-swatch outline follows the choice immediately
The outline around the chosen swatch (.color-chip.active) only updated on page
load/save, not when the dropdown choice changed: the refresh was bound as a
direct change handler on the select, and on the real page an earlier direct
handler in the chain can throw, which aborts jQuery's dispatch so the refresh
never ran (native user events still bubble, synthetic triggers do not). Fixes:
the chip click handler now calls refreshAll() directly after triggering change,
and a delegated document-level change handler on select[name=navbarfontcolor]
acts as a backup that still fires for real user changes. OPTIONS_JS_TOKEN ->
20261126.4. jsdom test pins: outline moves on chip click and on dropdown
change, and no preset is outlined in mode 'other'. Suite 6/6, export 0.
Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:29:50 +01:00
a9e79512ce style(options): double swatch height, hex label full swatch width
Owner request (row 121): the swatches were fine after the caching fix, but make
them double as high (1.6rem -> 3.2rem) and the hexcode label below each swatch
as large as the swatch — the label now spans the full swatch width (width:100%)
at font-size 1rem (was 0.65rem, easy to miss). Styles live in the inline
<style> block of options/options.twig (options-page-only UI). No options.js
change, token stays 20261126.3. jsdom test asserts the new sizes against the
rendered inline style; suite 6/6, export 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:23:36 +01:00
665939dcd9 fix(options): drop '(should contrast with…)' from the navbarfontcolor label
Owner request (row 120): the parenthetical in the option title is noise now that
the dropdown offers presets + Other. Title is now simply 'Menu item text color
in the top bar'. Titles are read live from config.xml for the options page, so
no theme reset is needed. Variants not rebuilt (deferred, row 116).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:20:59 +01:00
75ff90ab85 fix(options): move options-page chip styles inline into options.twig
The admin options page (themeOptions/update) does NOT load the theme's
css/plain.css — that file is registered for survey pages only — so the swatch
chip styles added there never applied on the options page: with the new JS
(hex label element) but old/absent CSS the swatches collapsed to tiny buttons
with the hex beside them. The chip/disable-mode styles are options-page-only
UI, so they now live in an inline <style> block in options/options.twig (always
rendered with the page, twig auto_reload — no asset cache involved) and were
removed from css/plain.css (sass source kept in sync). No options.js change, so
OPTIONS_JS_TOKEN stays 20261126.3. jsdom test now asserts gap:10px and the
column layout against the inline <style>; suite 6/6, export 0. Variants not
rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:20:21 +01:00
f2316d1a5d fix(options): readable swatch chips + re-enable color swatch on 'Other'
Two fixes for the navbarfontcolor working example: (1) the hex value inside the
swatch chips was unreadable and obscured the color — chips are now plain color
swatches with the hex in a small label BELOW each swatch (.color-chip-label),
and the chips row uses gap: 10px so the swatches stand out. (2) The visible
color swatch input (navbarfontcolorcustom_picker) never re-enabled when
choosing 'Other…' from the dropdown: it lacked data-parent/selector_radio_childfield,
so updateChild/updateAllChildren never touched it and it stayed disabled
(server-side rendered disabled) — the text field was enabled but the swatch
the user actually clicks stayed grayed out. The swatch now gets the child
classes when parented, so it follows the mode like the text field (also fixes
the same latent bug for the per-element <el>textcolorcustom pickers).
OPTIONS_JS_TOKEN -> 20261126.3. jsdom test extended: swatch enabled in mode
'other'/disabled otherwise, hex below swatch, chip gap 10px asserted against
css/plain.css; suite 6/6, export 0. Variants intentionally not rebuilt.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:15:09 +01:00
dc27d63de5 fix(options): keep navbarfontcolorcustom in column 2, full-width swatch chips
The new navbarfontcolorcustom picker fell into the generic 'rest' slot of the
Top-of-the-page layout, which opened a NEW col-md-4 — so the picker landed in
column 3 next to the sticky checkboxes and left the divs unbalanced. Map the
key to slot h2 so it stays in column 2 under the navbarfontcolor dropdown,
rendered col-12 (full column width); column 3 is the sticky block again and
the pane markup is balanced (89/89 divs). The swatch chips under the dropdown
were tiny inline squares — make the chips row full column width with taller
flex chips showing the hex value (options.js chip.text). OPTIONS_JS_TOKEN
bumped to 20261126.2 (options.js changed). Layout pinned by jsdom assertions
(picker in the same col-md-4 as the dropdown, wrapper col-12); suite 6/6,
export 0. Variants intentionally not rebuilt (owner: deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 14:05:18 +01:00
f2ebf24270 feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.

NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:55:30 +01:00
7939f3de3f fix(options): isolate startup steps so a throwing step can never kill saving again
Hardening against the 2026-11-25 regression (unguarded JSON.parse of
#optionCssFiles="inherit" at global level killed the whole options.js:
no handlers bound, Save silently posted stale JSON). run() now executes
each startup step through safeStep() (try/catch + console.ls.error) and
ALWAYS calls bind(), so the save/change handlers exist even if a prepare
step fails. OPTIONS_JS_TOKEN bumped to 20261125.5.

Regression guard added in variants/tests/options_save_global.test.js
(local-only, gitignored): loads the page with optionCssFiles="inherit"
(the global-page condition) and asserts the save button has a click
handler, pickers have input+change handlers, a swatch color change
reaches the saved options JSON on Save, and the label layout (checkbox
box before label; d-block label above btn-groups). Verified the test
FAILS on the pre-fix options.js and PASSES on the fixed one; full suite
5/5.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 21:28:43 +01:00
44e0e871d4 fix(options): guard JSON.parse of optionCssFiles so the options page works at global level
On the GLOBAL theme options page the hidden #optionCssFiles holds the
literal string "inherit" (not JSON). options.js did an unguarded
JSON.parse($('#optionCssFiles').val()) in the ThemeOptions constructor,
which threw and meant run() never executed: no change handlers and no
save handler were bound, so Save posted the stale options JSON and
nothing changed in the UI (e.g. colors on the Default fonts and colors
tab) was saved. Fall back to an empty file list on parse failure.
OPTIONS_JS_TOKEN bumped to 20261125.4.

Verified against the live page (themeOptions/update&id=497, where
optionCssFiles="inherit"): constructor no longer throws, picker
input/change handlers bind, and the save click writes the new color
into TemplateConfiguration[options]; real HTTP POST confirmed the
value lands in lime_template_configuration.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 21:25:25 +01:00
588199086a fix(options): checkbox box before label, labels above controls, live color-swatch sync
- checkboxes (incl. the 9 logo show-on boxes): back to classic .form-check
  with the input BEFORE the label (label right of the box); label keeps id
  lbl_simple_edit_options_<key> so JS/test anchors are unchanged
- all other option types: label gets d-block so it sits above the control
  even next to an inline-flex btn-group (Simple options / Questions tabs)
- options.js: color swatch syncs on 'input' as well as 'change', so a color
  picked in the native popup is already in the saved JSON when Save is
  clicked (browsers fire 'change' only when the popup closes);
  OPTIONS_JS_TOKEN bumped to 20261125.3

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 21:05:01 +01:00