Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
arkste wants to merge11 commits intosymfony:3.4fromarkste:spaceless-bootstrap-fix
Closed

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

arkste wants to merge11 commits intosymfony:3.4fromarkste:spaceless-bootstrap-fix

Conversation

@arkste
Copy link
Contributor

@arkstearkste commentedOct 28, 2017
edited by nicolas-grekas
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#24711
LicenseMIT
Doc PR-

As discussed in#24711 i reverted the change i did inbootstrap_3_layout.html.twig (which caused an unnecessary empty div-container in the vertical-layout), added thecheckbox_row block to thebootstrap_3_horizontal_layout.html.twig and removedspaceless (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 theform_label_class &form_group_class blocks to the top ofbootstrap_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 thecheckbox_row block to bootstrap 4 too.

ping@fabpot@nicolas-grekas

@arkste
Copy link
ContributorAuthor

I've added tests to make sure the checkbox row doesn't break again in bootstrap 3 & 4.

TwigBridge tests were failing because of the changes made in#24703, so i fixed them as well.

Tests are still failing, but this is related due to the timezone changes.

Please let me know if there's anything else i can do to get this merged.

{%spaceless %}
{%iflabelissame as(false) %}
<divclass="{{block('form_label_class') }}"></div>
{%else %}
Copy link
Member

Choose a reason for hiding this comment

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

these tags are missing the whitespace control to remove indentation spaces

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

changed. please review the recent commit, thanks!

@arkste
Copy link
ContributorAuthor

Status: Needs Review

@arkste
Copy link
ContributorAuthor

@stof i've added more whitespace control tags to remove indentation spaces.

@nicolas-grekasnicolas-grekas changed the title[Bridge\Twig] fix bootstrap checkbox_row to render properly & remove …[Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spacelessOct 30, 2017
@nicolas-grekas
Copy link
Member

deps=low tests should not fail: Form's lowest dep for the bridge should be bumped (or vice-versa, didn't look precisely)

@arkste
Copy link
ContributorAuthor

@nicolas-grekas not sure what to do now, the deps are already on~3.4|~4.0.

@nicolas-grekas
Copy link
Member

should be~3.4-beta2|~4.0

@arkste
Copy link
ContributorAuthor

correct me if i'm wrong, but even changing the deps wont make the tests running green on deps=low, since travis runs the bridge tests from the vendor-folder (like/home/travis/build/symfony/symfony/src/Symfony/Bridge/Twig/vendor/symfony/form/Tests/AbstractLayoutTest.php:84) and the fixed tests are only in this PR.

@nicolas-grekas
Copy link
Member

it will: the CI builds per PR packages for that situation

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneOct 30, 2017

{%blockform_label_class -%}
col-sm-2
{%-endblockform_label_class %}
Copy link
Member

Choose a reason for hiding this comment

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

Can you move back this snippet to where it was before? That would ease merging older branches. Thanks.


{%blockform_group_class -%}
col-sm-10
{%-endblockform_group_class %}
Copy link
Member

Choose a reason for hiding this comment

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

Same for this one. We try to not move snippets of code around as it makes merging branches more difficult.

@arkste
Copy link
ContributorAuthor

@fabpot i reverted the change for bootstrap 3 & 4.

{%blockcheckbox_widget -%}
{%-setparent_label_class=parent_label_class|default(label_attr.class|default('')) -%}
{%if'checkbox-inline'inparent_label_class %}
{%-if'checkbox-inline'inparent_label_class-%}
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure those added- are needed? Does they make a difference as there are already- signs at the end of the line before and at the beginning of the next line?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

actually they're not needed, but i tried to keep it similar to the bs4 layout, will remove them in both templates.

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

the diff should be reduced to the strict minimum (there are some added "-" that are not needed)

{{- form_errors(form) -}}
</div>{#--#}
</div>
{%-endblockcheckbox_row %}

Choose a reason for hiding this comment

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

missing end of line

@fabpot
Copy link
Member

Thank you@arkste.

fabpot added a commit that referenced this pull requestOct 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-grekasCommits-------f84749f [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless
@arkste
Copy link
ContributorAuthor

seems like i pushed the EOL's while this was supposed to be merged. anything i should do now@fabpot ?

@fabpot
Copy link
Member

@arkste all is fine :) Thank you.

@arkste
Copy link
ContributorAuthor

ok :)

@arkstearkste closed thisOct 30, 2017
@arkstearkste deleted the spaceless-bootstrap-fix branchOctober 30, 2017 19:15
This was referencedOct 30, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@stofstofstof requested changes

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@arkste@nicolas-grekas@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp