Skip to content

Add d-block to bootstrap 4 alerts #26870

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 5 commits into from
Apr 14, 2018
Merged

Conversation

normisg
Copy link

@normisg normisg commented Apr 9, 2018

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #26869
License MIT
Doc PR N/A

@xabbuh xabbuh added this to the 3.4 milestone Apr 9, 2018
nicolas-grekas and others added 2 commits April 9, 2018 15:40
…alar argument (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Improve error message for non-autowirable scalar argument

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

Commits
-------

7f39811 [DI] Improve error message for non-autowirable scalar argument
@chapterjason
Copy link
Contributor

Is there any reason why a span is used to display the alerts? When I look at the docs of bootstrap, I can clearly see that the div tag are used for that.

https://getbootstrap.com/docs/4.0/components/alerts/

Using d-block is for me really odd.

@normisg
Copy link
Author

normisg commented Apr 11, 2018

Yes, it was changed in 5dcaaad to "Make sure form errors is valid HTML".
Seems unnecessary to me too.

@vudaltsov
Copy link
Contributor

The reason for this is that now error blocks might appear inside <label> tags. You cannot have <div> inside a label.

@@ -283,7 +283,7 @@

{% block form_errors -%}
{%- if errors|length > 0 -%}
<span class="{% if form is not rootform %}invalid-feedback d-block{% else %}alert alert-danger{% endif %}">
<span class="{% if form is not rootform %}invalid-feedback d-block{% else %}alert alert-danger d-block{% endif %}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move the d-block class outside the {% if %} statement to have it only once in the line

nicolas-grekas and others added 2 commits April 14, 2018 08:14
…ns in tests (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Dont create mock cookie for new sessions in tests

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

@romainneutron can you please check if this fixes your issue?

Commits
-------

86b850e [HttpKernel] Dont create mock cookie for new sessions in tests
@nicolas-grekas nicolas-grekas changed the base branch from master to 3.4 April 14, 2018 14:54
@nicolas-grekas
Copy link
Member

Thank you @normisg.

@nicolas-grekas nicolas-grekas merged commit 40bd8bd into symfony:3.4 Apr 14, 2018
nicolas-grekas added a commit that referenced this pull request Apr 14, 2018
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #26870).

Discussion
----------

Add d-block to bootstrap 4 alerts

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

Commits
-------

40bd8bd Add d-block to bootstrap 4 alerts
This was referenced Apr 30, 2018
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.

7 participants