feat(options): Questions tab 'Question help' section; help background becomes a 6-way color chooser (row 178 plan P4)
New section (h3 + first col-md-4 of a 3-column grid, only it used): questionhelpbackgroundcolor as 6-way chooser (default 'other' + custom #fff3cd, look unchanged) + questionhelpbackgroundcolorcustom, the plain help font color picker (stays plain per row-178 decision 8) and the help text position; keys moved between the answers block and the border options, legacy col 1 is empty now. questionhelpbackgroundcolor joined aColorChooserKeys (twig + js, OPTIONS_JS_TOKEN 20261129.3) and the build.php chooser migration; custom_header.twig resolves it via cm() (legacy hex passes through). Variants rebuilt, example config synced. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
82ce4284ad
commit
ff998489b9
2 changed files with 61 additions and 22 deletions
|
|
@ -273,13 +273,14 @@ foreach ($logoPositions as $pos) {
|
|||
// progressbarfontcolor, bodybackgroundcolor, grouptitletextcolor,
|
||||
// groupdescriptiontextcolor; row 180 plan P2 adds questiontitletextcolor,
|
||||
// questiontitlebackgroundcolor, questionbackgroundcolor; row 184 plan P3 adds
|
||||
// answerstextcolor) became mode dropdowns
|
||||
// answerstextcolor; row 186 plan P4 adds questionhelpbackgroundcolor) became mode
|
||||
// dropdowns
|
||||
// (default|defaultbackgroundcolor|color1|color2|color3|other) with a <key>custom
|
||||
// colorpicker child. A legacy HEX value in the json means "custom color": map it
|
||||
// to mode "other" and move the hex into the <key>custom child, so the variant
|
||||
// default stays valid for the dropdown. A legacy mode "primary"/"secondary"
|
||||
// (old 4-way textcolor dropdown) maps to "color1"/"color2".
|
||||
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor'];
|
||||
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor', 'questionhelpbackgroundcolor'];
|
||||
$colorChooserLegacyModes = ['primary' => 'color1', 'secondary' => 'color2'];
|
||||
foreach ($colorChooserKeys as $ck) {
|
||||
if (isset($definition['options'][$ck])
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<version>3.3.0</version>
|
||||
<apiVersion>3</apiVersion>
|
||||
<description><strong>Example variant of Respondage Vanilla</strong><br>Public example of a build output: only a few house-style option values differ, all views, CSS and JS are inherited from the mother theme via extends.</description>
|
||||
<lastUpdate>2026-11-29 14:06:42</lastUpdate>
|
||||
<lastUpdate>2026-11-29 14:13:44</lastUpdate>
|
||||
<extends>vanilla_respondage</extends>
|
||||
</metadata>
|
||||
<compatibility>
|
||||
|
|
@ -353,6 +353,16 @@
|
|||
<answerstextcolor type="dropdown" category="Questions" width="4" title="Text color for answers and subquestions" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
|
||||
<dropdownoptions><option value="default" data-default="1">[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">Other ...</option></dropdownoptions></answerstextcolor>
|
||||
<answerstextcolorcustom type="colorpicker" category="Questions" width="4" title="Custom text color for answers and subquestions (for 'Other ...')" parent="answerstextcolor">#444444</answerstextcolorcustom>
|
||||
<!-- Row 178 plan P4 (row 186): section "Question help" (options.twig) — a
|
||||
three-column grid (col-md-4, width 4) of which only the first column is
|
||||
used: help background color CHOOSER (6-way + custom, default "other" with
|
||||
custom #fff3cd so the look stays as before), the help font color (stays a
|
||||
plain picker per row-178 decision 8) and the help text position. -->
|
||||
<questionhelpbackgroundcolor type="dropdown" category="Questions" width="4" title="Question help background color" 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></questionhelpbackgroundcolor>
|
||||
<questionhelpbackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question help background color (for 'Other ...')" parent="questionhelpbackgroundcolor">#fff3cd</questionhelpbackgroundcolorcustom>
|
||||
<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>
|
||||
<!-- Questions
|
||||
HOUSE-STYLE: the colorpicker options in this section (question
|
||||
title/background/help/help-font/border/checkbox colors) are house-style
|
||||
|
|
@ -367,8 +377,11 @@
|
|||
background chooser, col3 body background chooser; then (P3/row 184) the
|
||||
"Answer options and subquestions" section (width 4, first col-md-4 of a
|
||||
three-column grid, only it used): answers font + 6-way color chooser +
|
||||
custom; then the remaining legacy columns (help, border,
|
||||
checkbox color), then the rest full-width (width 12). Inside a pane
|
||||
custom; then (P4/row 186) the "Question help" section (width 4, first
|
||||
col-md-4 of a three-column grid, only it used): help background chooser +
|
||||
custom, plain help font color picker, help text position; then the
|
||||
remaining legacy columns (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
|
||||
|
|
@ -376,9 +389,6 @@
|
|||
data-show-if-value="box|top". questionhelpfontcolor is applied
|
||||
in custom_header.twig on .question-help-container. -->
|
||||
<!-- Questions -->
|
||||
<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>
|
||||
<questionborder type="buttons" category="Questions" width="4" title="Question border" options="box|top|none" optionlabels="Box around|Top and bottom|None">box</questionborder>
|
||||
<questionbordercolor type="colorpicker" category="Questions" width="4" title="Question border color" options="on|off" optionlabels="Yes|No" parent="questionborder">#cccccc</questionbordercolor>
|
||||
<questionborderstyle type="buttons" category="Questions" width="4" title="Question border line style" options="solid|dotted|dashed" optionlabels="Solid|Dotted|Dashed" parent="questionborder">solid</questionborderstyle>
|
||||
|
|
|
|||
Loading…
Reference in a new issue