Repository navigation
Conversation
…age header The form's container followed .page-header with no margin, so the form card touched the header's action buttons. Its .card-body wrapper has no padding outside a .card, where --tblr-card-spacer-y is undefined. Wrap the form in .page-body like the index grid, and give the form error alert the same top margin so every gap is the page padding. The alert also compares the form validity strictly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On create and update pages, the form card sits flush against the page header: the bottom of the "Cancel" / "Create" buttons touches the card's top border.
The form's
.container-xlfollows.page-headerwith no margin. The.card-bodywrapping the form looks like it should add spacing, but it is not inside a.card, so--tblr-card-spacer-yis undefined there and its padding resolves to 0. Index pages don't have the problem becausegrid.html.twigwraps the grid in.page-body, whose top margin is--tblr-page-padding-y.This PR:
.page-body, like the index grid. The componentattributesmove to that new root element, soTalkFormComponentand other live forms keep a single root;mt-4and the alertmb-0..page-wrapperis a flex column, so margins don't collapse; without this, the alert would still touch the header and sit 40px above the form;is same as(false)rather than== false).===would need Twig 3.23, and the bundle still allows Twig 2.15.Valid form
Before
After
Invalid form (error alert)
Before
After
Measured gaps:
No SCSS change, so
public/app.cssis not rebuilt. Functional tests select the alert by[data-test-form-error-alert], which is unchanged.The markup changes, so an app that overrides only
form_error_alertkeeps an alert that touches the header and gets a 40px gap above the form, and an app that patched the gap with CSS such as.page-header + .container-xlnow applies it to the alert alone.🤖 Generated with Claude Code