Skip to content

[TwigBridge] Re-add Bootstrap 3 Checkbox Layout #24711

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

Merged
merged 1 commit into from
Oct 28, 2017
Merged

[TwigBridge] Re-add Bootstrap 3 Checkbox Layout #24711

merged 1 commit into from
Oct 28, 2017

Conversation

arkste
Copy link
Contributor

@arkste arkste commented Oct 27, 2017

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #24702
License MIT
Doc PR

@Simperfit
Copy link
Contributor

AppVeyor error seems unrelated

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Oct 28, 2017
@nicolas-grekas
Copy link
Member

Thank you @arkste.

@nicolas-grekas nicolas-grekas merged commit 8ac8f9d into symfony:3.4 Oct 28, 2017
nicolas-grekas added a commit that referenced this pull request Oct 28, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Re-add Bootstrap 3 Checkbox Layout

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24702
| License       | MIT
| Doc PR        |

Commits
-------

8ac8f9d [TwigBridge] Re-add Bootstrap 3 Checkbox Layout
@arkste arkste deleted the issue-24702 branch October 28, 2017 17:13
@@ -123,10 +123,15 @@
{%- endblock datetime_row %}

{% block checkbox_row -%}
{% spaceless %}
Copy link
Member

Choose a reason for hiding this comment

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

Is spaceless here really needed? It makes the block much slower and we removed them everywhere when not needed. I can see some more usages, but we should consider removing them if not strictly needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right, it's not needed, but spaceless was there when the template was added back in 2014 and got copy-pasted over the time for other row-blocks.

to make sure this gets merged asap and to avoid possible BC breaks, i only re-added the old code with spaceless.

but... after reviewing the code myself today, i noticed that i made a mistake:

the code should've been re-added to the bootstrap_3_horizontal_layout.html.twig (where it was removed) instead of replacing the checkbox_row-block in the the bootstrap_3_layout.html.twig (it causes an unnecessary empty container in the vertical layout now).

i'll prepare a new PR where i'll fix this when #24727 gets merged to avoid conflicts.

fabpot added a commit that referenced this pull request Oct 30, 2017
…y & remove spaceless (arkste)

This PR was squashed before being merged into the 3.4 branch (closes #24728).

Discussion
----------

[Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24711
| License       | MIT
| Doc PR        | -

As discussed in #24711 i reverted the change i did in `bootstrap_3_layout.html.twig` (which caused an unnecessary empty div-container in the vertical-layout), added the `checkbox_row` block to the `bootstrap_3_horizontal_layout.html.twig` and removed `spaceless` (as proposed in #24727).

since i added `{#--#}` in bootstrap 3, i did the same for the same horizontal blocks in bootstrap 4 as well.

I moved the `form_label_class` & `form_group_class` blocks to the top of `bootstrap_3_horizontal_layout.html.twig` & `bootstrap_4_horizontal_layout.html.twig`, this should improve DX as they were spreaded across the file.

#24702 affected the bootstrap 4 horizontal layout as well, so i added the `checkbox_row` block to bootstrap 4 too.

ping @fabpot @nicolas-grekas

Commits
-------

f84749f [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless
This was referenced Oct 30, 2017
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