Skip to content

Make horizontal form column layout configurable via global Twig variables#1293

Merged
jbtronics merged 7 commits intomasterfrom
copilot/configure-form-column-layout
Mar 7, 2026
Merged

Make horizontal form column layout configurable via global Twig variables#1293
jbtronics merged 7 commits intomasterfrom
copilot/configure-form-column-layout

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

Hardcoded col-sm-3/col-sm-9 Bootstrap grid classes were scattered across 27+ templates, making global layout adjustments impossible without a mass find-replace.

Approach

Three global Twig variables defined in config/packages/twig.yaml:

globals:
    col_label:    'col-sm-3 col-lg-2'
    col_input:    'col-sm-9 col-lg-10'
    offset_label: 'offset-sm-3 offset-lg-2'
  • extended_bootstrap_layout.html.twigform_label_class / form_group_class blocks now reference col_label / col_input, propagating to all Symfony Form-rendered horizontal fields automatically
  • 26 manually-coded templates — replaced hardcoded col-sm-3, col-sm-9, offset-sm-3 occurrences with the new variables (modals, admin panels, filters, EDA forms, label system dialogs, 2FA settings, etc.)

Layout change

On lg+ screens labels narrow to 2/12 columns (col-lg-2) and inputs widen to 10/12 (col-lg-10). The sm/md breakpoint behaviour is unchanged.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
Copilot AI changed the title [WIP] Make form column layout configurable with global twig variables Make horizontal form column layout configurable via global Twig variables Mar 7, 2026
…l, offset_col

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
@jbtronics
Copy link
Copy Markdown
Member

@copilot Rename label_col to col_label, input_col to col_input and offset_col to offset_label

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 7, 2026

@copilot Rename label_col to col_label, input_col to col_input and offset_col to offset_label

Done in 17e83a9. The three globals are now col_label, col_input, and offset_label across all 34 affected files.

@jbtronics jbtronics marked this pull request as ready for review March 7, 2026 15:14
@jbtronics jbtronics merged commit e84bae2 into master Mar 7, 2026
23 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.53%. Comparing base (e8d9048) to head (ebcda8b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1293      +/-   ##
============================================
- Coverage     55.54%   55.53%   -0.01%     
  Complexity     8271     8271              
============================================
  Files           611      611              
  Lines         26556    26556              
============================================
- Hits          14750    14748       -2     
- Misses        11806    11808       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants