Skip to content

[TwigBridge] Using bootstrap 5 offset classes to indent input fields to prevent rendering empty label blocks #48070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

davidhoelzel
Copy link

using bootstrap 5 offset classes to indent input fields to prevent rendering empty label blocks

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #46508
License MIT

Instead of rendering empty div blocks when no label exists, the bootstrap offset classes are used to indent form-fields when using bootstrap 5 table layout with col-* classes.

davidhoelzel added 2 commits October 28, 2022 15:43
using bootstrap 5 offset classes to indent input fields to prevent rendering empty label blocks
adding offset class only when no label exists
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@derrabus
Copy link
Member

derrabus commented Nov 2, 2022

Thank you for your contribution. Please find a PR title that tells me what the PR does. The title will be used as a change log entry.

@davidhoelzel davidhoelzel changed the title Issue 46508 Using bootstrap 5 offset classes to indent input fields to prevent rendering empty label blocks Nov 2, 2022
@carsonbot carsonbot changed the title Using bootstrap 5 offset classes to indent input fields to prevent rendering empty label blocks [TwigBridge] Using bootstrap 5 offset classes to indent input fields to prevent rendering empty label blocks Nov 5, 2022
Copy link
Contributor

@dbrumann dbrumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I am not sure if replacing the empty divs is a BC break. Assuming this was just unintentional behavior as suggested in #46508 (comment) I would say it's fine

Failing Pipeline looks unrelated to me.

@xabbuh
Copy link
Member

xabbuh commented Nov 19, 2022

I am afraid that this change would break use cases where someone overrode the now changed blocks as they would now have to update their custom form themes to not have forms being rendered incorrectly.

@xabbuh
Copy link
Member

xabbuh commented Dec 31, 2022

closing as explained, thanks David for giving it a try anyway

@xabbuh xabbuh closed this Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants