feat(options): Questions tab 'Question title and body' section with 6-way color choosers (row 178 plan P2)

config.xml: new section keys questiontitlefont/textcolor(+custom)/fontsize/
fontoptions + legacy fontcolor (col 1), questiontitlebackgroundcolor(+custom)
(col 2), questionbackgroundcolor(+custom) (col 3); old width-12 Prompt-U keys
and plain colorpickers replaced; questiontitlefontweight -> questiontitlefontoptions.
options.twig: title section slots (were prepared in P1), 3 keys join
aColorChooserKeys, OPTIONS_JS_TOKEN 20261129.1. options.js: same 3 keys in its
aColorChooserKeys. Views: choosers resolved via cm() (chooser wins; legacy hex
and primary/secondary modes pass through; legacy picker used when the mode key
is absent); fontoptions mapped to weight/style with legacy fontweight fallback.
build.php: chooser migration list + questiontitle fontweight migration.
All 3 variants rebuilt (defensie legacy hex -> other+custom), example config synced.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-29 14:45:57 +01:00
commit 14eb1c2a99

View file

@ -410,25 +410,71 @@
Previous/Next/Submit buttons). NOT house-style (structural). -->
<questiondistance type="text" category="Questions" width="6" title="Distance between two questions (px or rem)">30px</questiondistance>
<questiondistancebottom type="text" category="Questions" width="6" title="Distance between last question and buttons at bottom of page (px or rem)">30px</questiondistancebottom>
<!-- Row 178 plan P2: section "Question title and body" (options.twig) — three
col-md-4 columns (width 4). Col 1 = Font chooser / color chooser for the question
title (fontselect + 6-way text-color mode + custom + size + font options), plus
the legacy plain font-color picker. Col 2 = title background color chooser
(default mode color1 = Color 1). Col 3 = question body background color chooser
(default mode defaultbackgroundcolor). A "chooser" = 6-way mode dropdown +
"Other ..." custom colorpicker child, exactly like the Groups tab text colors /
Header background color. In the views (custom_header.twig) the CHOOSER wins;
questiontitlefontcolor stays visible as a legacy picker. HOUSE-STYLE: the color
defaults below are house-style specific (set per variant json; build.php migrates
legacy hex/mode values). -->
<questiontitlefont type="fontselect" category="Questions" width="4" title="Font for question titles">base</questiontitlefont>
<questiontitletextcolor type="dropdown" category="Questions" width="4" title="Text color for question titles" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">other
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor">Default background color</option>
<option value="color1">Color 1</option>
<option value="color2">Color 2</option>
<option value="color3">Color 3</option>
<option value="other" data-default="1">[Other ...]</option>
</dropdownoptions></questiontitletextcolor>
<questiontitletextcolorcustom type="colorpicker" category="Questions" width="4" title="Custom text color for question titles (for 'Other ...')" parent="questiontitletextcolor">#ffffff</questiontitletextcolorcustom>
<questiontitlefontsize type="buttons" category="Questions" width="4" title="Question title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</questiontitlefontsize>
<questiontitlefontoptions type="buttons" category="Questions" width="4" title="Question title font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">bold</questiontitlefontoptions>
<questiontitlefontcolor type="colorpicker" category="Questions" width="4" title="Text color for question titles (legacy picker)" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
<questiontitlebackgroundcolor type="dropdown" category="Questions" width="4" title="Question title background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">color1
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor">Default background color</option>
<option value="color1" data-default="1">[Color 1]</option>
<option value="color2">Color 2</option>
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></questiontitlebackgroundcolor>
<questiontitlebackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question title background color (for 'Other ...')" parent="questiontitlebackgroundcolor">#5e1c64</questiontitlebackgroundcolorcustom>
<questionbackgroundcolor type="dropdown" category="Questions" width="4" title="Question body background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor" data-default="1">[Default background color]</option>
<option value="color1">Color 1</option>
<option value="color2">Color 2</option>
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></questionbackgroundcolor>
<questionbackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question body background color (for 'Other ...')" parent="questionbackgroundcolor">#ffffff</questionbackgroundcolorcustom>
<!-- Questions
HOUSE-STYLE: the colorpicker options in this section (question
title/background/help/help-font/border/checkbox colors) are house-style
colors. NOT house-style (structural, same for all variants):
questionborder, questionborderstyle, the borderradius values,
questiondropdown and questionhelptextposition.
Prompt R: order = the three columns of the Questions tab (options.twig
renders them in this order): col1 colors+help, col2 border + its
conditional children, col3 checkbox color. All width=12 — inside the
pane each option stacks as col-12 in its column. The border children
Row 178/179 plan: order = the sections of the Questions tab as rendered by
options.twig (aQSections/aQSlots): first the "Overall question" section
(width 6 = the single col-md-6), then the "Question title and body"
section (three col-md-4 columns, width 4): col1 title font chooser/color
chooser + legacy picker, col2 title background chooser, col3 body
background chooser; then the remaining legacy columns (help, border,
checkbox color), then the rest full-width (width 12). Inside a pane
column each option stacks as col-12. The border children
carry parent="questionborder"; the show-values "box|top" cannot be an
XML attribute (core passes only `parent` through), so the multi-value
list lives in options.twig (aShowIfValues) and lands as
data-show-if-value="box|top". questionhelpfontcolor (NEW) is applied
data-show-if-value="box|top". questionhelpfontcolor is applied
in custom_header.twig on .question-help-container. -->
<!-- Questions -->
<questiontitlebackgroundcolor type="colorpicker" category="Questions" width="4" title="Question title background color" options="on|off" optionlabels="Yes|No">#5e1c64</questiontitlebackgroundcolor>
<questiontitlefontcolor type="colorpicker" category="Questions" width="4" title="Question title font color" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
<questionbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question background color (not title)" options="on|off" optionlabels="Yes|No">#ffffff</questionbackgroundcolor>
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
<questionhelpfontcolor type="colorpicker" category="Questions" width="4" title="Question help font color" options="on|off" optionlabels="Yes|No">#444444</questionhelpfontcolor>
<questionhelptextposition type="buttons" category="Questions" width="4" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
@ -441,7 +487,8 @@
<questionborderradiusBL type="duration" category="Questions" width="4" title="Border radius bottom left" parent="questionborder">5px</questionborderradiusBL>
<questionborderradiusBR type="duration" category="Questions" width="4" title="Border radius bottom right" parent="questionborder">5px</questionborderradiusBR>
<checkboxcolor type="colorpicker" category="Questions" width="4" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
<!-- Per-element font+color combos (Prompt U). Each element gets:
<!-- Per-element font+color combos (Prompt U; row 178 plan P3/P6 move the
answers/buttons ones into their own sections/tab). Each element gets:
- <el>font (type "fontselect"): the SAME choices as the base "font"
dropdown above (bundled + variant-custom + browser fonts), plus a
first option "Same as base font" (value "base" = no extra class, the
@ -453,15 +500,6 @@
color fontcolor). Resolved to an inline style="color: …" in the views.
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
= "other" (parent show-value "other"). -->
<questiontitlefont type="fontselect" category="Questions" width="12" title="Font for question titles">base</questiontitlefont>
<questiontitletextcolor type="dropdown" category="Questions" width="12" title="Text color for question titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
<dropdownoptions>
<option value="default" data-default="1">[Default font color]</option>
<option value="primary">Primary color</option>
<option value="secondary">Secondary color</option>
<option value="other">Other…</option>
</dropdownoptions></questiontitletextcolor>
<questiontitletextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for question titles" parent="questiontitletextcolor">#444444</questiontitletextcolorcustom>
<answersfont type="fontselect" category="Questions" width="12" title="Font for answers and help texts">base</answersfont>
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
<dropdownoptions>
@ -480,8 +518,6 @@
<option value="other">Other…</option>
</dropdownoptions></buttonstextcolor>
<buttonstextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for the buttons (Previous/Next/Submit)" parent="buttonstextcolor">#444444</buttonstextcolorcustom>
<questiontitlefontsize type="buttons" category="Questions" width="12" title="Question title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</questiontitlefontsize>
<questiontitlefontweight type="buttons" category="Questions" width="12" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
<!-- Colors: no tab in the custom options page yet (Prompt T) — these two stay in core mode only. -->
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>