8000 bug #17561 [WebProfilerBundle] Fix design issue in profiler when havi… · symfony/symfony@bd588a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd588a3

Browse files
committed
bug #17561 [WebProfilerBundle] Fix design issue in profiler when having errors in forms (Pierstoval)
This PR was squashed before being merged into the 2.8 branch (closes #17561). Discussion ---------- [WebProfilerBundle] Fix design issue in profiler when having errors in forms | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a This error occurs mostly when having long form field names or types, **Before:** ![before](https://cloud.githubusercontent.com/assets/3369266/12610913/89bddfd8-c4ea-11e5-9372-2b7740d8c4b3.png) **After:** ![after](https://cloud.githubusercontent.com/assets/3369266/12610915/8ae22a4a-c4ea-11e5-94ce-9257a9409b4a.png) That said, I don't know what to do about z-index, whether the error count prevails on the type or *vice-versa* 😕 @javiereguiluz, an idea ? Commits ------- 76e1c0a [WebProfilerBundle] Fix design issue in profiler when having errors in forms
2 parents aadaeec + 76e1c0a commit bd588a3

File tree

1 file changed

+4
-4
lines changed
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

1 file changed

+4
-4
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,17 @@
427427
{% import _self as tree %}
428428
<li>
429429
<div class="tree-inner" data-tab-target-id="{{ data.id }}-details">
430+
{% if data.errors is defined and data.errors|length > 0 %}
431+
<div class="badge-error">{{ data.errors|length }}</div>
432+
{% endif %}
433+
430434
{% if data.children is not empty %}
431435
<a class="toggle-button" data-toggle-target-id="{{ data.id }}-children" href="#"><span class="toggle-icon"></span></a>
432436
{% else %}
433437
<div class="toggle-icon empty"></div>
434438
{% endif %}
435439

436440
{{ name|default('(no name)') }} {% if data.type_class is defined and data.type is defined %}[<abbr title="{{ data.type_class }}">{{ data.type|split('\\')|last }}</abbr>]{% endif %}
437-
438-
{% if data.errors is defined and data.errors|length > 0 %}
439-
<div class="badge-error">{{ data.errors|length }}</div>
440-
{% endif %}
441441
</div>
442442

443443
{% if data.children is not empty %}

0 commit comments

Comments
 (0)
0