feat(options): Questions tab starts with 'Overall question' section + 2 distance options (plan P1)

Questions pane now has h2 'Questions' + intro paragraph, then an h3
'Overall question' section rendered as ONE col-md-6 column holding two new
text options — questiondistance ('Distance between two questions') and
questiondistancebottom ('Distance between last question and buttons at
bottom of page'), both default 30px and accepting px or rem — followed by a
full-width hr before the existing 3-column grid. custom_header.twig applies
them as CSS: .question-container margin-bottom and #navigator-container
margin-top, guarded to ^<number>(px|rem)$ with fallback 30px. config.xml:
both keys first in the Questions category, width=6 (row 160 rule). All
variants rebuilt + example config synced. jsdom: new row-179 assertions,
suite 8/8; live survey page emits both rules at 30px.

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

View file

@ -293,6 +293,9 @@
{% set aQuestionsCol1 = ['questiontitlebackgroundcolor', 'questiontitlefontcolor', 'questionbackgroundcolor', 'questionhelpbackgroundcolor', 'questionhelpfontcolor', 'questionhelptextposition'] %}
{% set aQuestionsCol2 = ['questionborder', 'questionbordercolor', 'questionborderstyle', 'questiondropdown', 'questionborderradiusTL', 'questionborderradiusTR', 'questionborderradiusBL', 'questionborderradiusBR'] %}
{% set aQuestionsCol3 = ['checkboxcolor'] %}
{# row 179 / plan P1: the "Overall question" section at the top of the Questions
pane — qCol 4, rendered as ONE col-md-6 column, followed by a full-width hr #}
{% set aQuestionsOverall = ['questiondistance', 'questiondistancebottom'] %}
{# row 147: all group-related options of the "Questions" category — they are
pulled out of the Questions tab into a dedicated "Groups" tab (aGroupsTab below).
@ -449,6 +452,13 @@
<p>{{ gT("Groups are more or less the same as pages. In the survey settings you can decide to show or hide the group title and the group description. Here you choose how they look when shown.") }}</p>
</div></div>
{% endif %}
{% if tab.category == 'Questions' %}
{# row 179 / plan P1: h2 + intro of the Questions tab #}
<div class="row action_hide_on_inherit questions-intro"><div class="col-12">
<h2>{{ gT("Questions") }}</h2>
<p>{{ gT("Questions are the core of a survey. Here you create your own design of how questions are displayed to your respondent.") }}</p>
</div></div>
{% endif %}
<div class="row action_hide_on_inherit">
{% set qLastCol = 0 %}
{% set fLastSlot = 0 %}
@ -657,11 +667,16 @@
{% elseif key not in aLogoKeys %}
{% set bQuestionsPane = tab.category == 'Questions' %}
{% if bQuestionsPane %}
{% set qCol = key in aQuestionsCol1 ? 1 : (key in aQuestionsCol2 ? 2 : (key in aQuestionsCol3 ? 3 : 0)) %}
{# row 179: qCol 4 = the "Overall question" section (one
col-md-6), leaving it emits a full-width hr; border-start
only between the grid columns 1-3 #}
{% set qCol = key in aQuestionsOverall ? 4 : (key in aQuestionsCol1 ? 1 : (key in aQuestionsCol2 ? 2 : (key in aQuestionsCol3 ? 3 : 0))) %}
{% if qCol != qLastCol %}
{% if qLastCol > 0 %}</div>{% endif %}
{% if qCol > 0 %}
<div class="col-md-4{% if qLastCol > 0 %} border-start{% endif %} questions-col-{{ qCol }}">
{% if qLastCol == 4 %}</div></div><div class="row action_hide_on_inherit"><div class="col-12"><hr class="questions-section-hr"></div></div>
{% elseif qLastCol > 0 %}</div>{% endif %}
{% if qCol == 4 %}<div class="row action_hide_on_inherit questions-section-intro"><div class="col-12"><h3>{{ gT("Overall question") }}</h3></div></div><div class="row action_hide_on_inherit questions-overall-row"><div class="col-md-6 questions-col-overall">
{% elseif qCol > 0 %}
<div class="col-md-4{% if qLastCol in [1, 2, 3] %} border-start{% endif %} questions-col-{{ qCol }}">
{% endif %}
{% set qLastCol = qCol %}
{% endif %}
@ -916,7 +931,7 @@
{% elseif fLastSlot == 'bg1' %}</div>
{% endif %}
{% endif %}
{% if tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
{% if tab.category == 'Questions' and qLastCol == 4 %}</div></div>{% elseif tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
{# row 157: close the open Groups column (each groups slot opens exactly
one div: the col-md-6) #}
{% if tab.id == 'groups' and fLastSlot in ['g1', 'g2'] %}</div>{% endif %}