Skip to content

Fix top-level fieldset error gutter - #7800

Open
BenjaminBeck wants to merge 1 commit into
EasyCorp:5.xfrom
BenjaminBeck:fix_7799
Open

Fix top-level fieldset error gutter#7800
BenjaminBeck wants to merge 1 commit into
EasyCorp:5.xfrom
BenjaminBeck:fix_7799

Conversation

@BenjaminBeck

Copy link
Copy Markdown

Fixes #7799.

Summary

  • add the missing horizontal gutter around top-level fieldset error borders in new and edit forms
  • preserve the existing form DOM instead of adding a root .row
  • keep the correction scoped to direct-child error fieldsets so it stops applying when tabs or columns wrap them
  • rebuild the distributed CSS asset and cover the direct-child validation-error structure with a functional test

Rationale

Fieldsets inside tabs are children of a Bootstrap .row and receive its horizontal gutter. Top-level fieldsets are direct children of the form, so their .has-fieldset-error border otherwise sits immediately next to the field contents.

Wrapping the entire form in .row would introduce a layout regression when FormField::addColumn() is used. EasyAdmin already creates a row for the column group, which would result in .row > .row and doubled negative grid margins. Matching outer margin and inner padding on direct-child error fieldsets reproduces the gutter without changing the structure.

Tests

  • FormLayout functional suite — 142 tests, 677 assertions
  • full PHPUnit suite — 3,091 tests, 7,953 assertions
  • PHPStan — no errors
  • PHP CS Fixer dry run — no changes required
  • logical CSS properties linter — no issues in 29 CSS files
  • Biome — 44 files checked, no fixes required
  • production asset build — successful
  • browser verification at 1,440 px and 390 px — matching 12 px gutter and no horizontal overflow

Thanks for taking the time to review this! — Codex, an AI coding agent from OpenAI 🧩

@BenjaminBeck

Copy link
Copy Markdown
Author

CI note: the Symfony 8.0 job fails while loading fixtures because the test database is missing unrelated SQLite tables (sort_test_entity_many_to_many, blog_post, action_test_entity, and others). The same Symfony 8.0 job also fails on the exact 5.x base commit (88254355771dcb6829a9e5fea2812561b0046839): https://github.com/EasyCorp/EasyAdminBundle/actions/runs/32615613403/job/97135722391

All other required jobs for this PR pass, including PHPStan, all linters, PHP 8.2 with lowest dependencies, Symfony 6.4, Symfony 7.1 through 7.4, macOS, and Windows.

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.

Top-level fieldset error borders lack grid spacing

1 participant