8000 minor #51640 [WebProfilerBundle] Fix Form profiler toggles (smnandre) · symfony/symfony@253370a · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 253370a

Browse files
committed
minor #51640 [WebProfilerBundle] Fix Form profiler toggles (smnandre)
This PR was merged into the 6.4 branch. Discussion ---------- [WebProfilerBundle] Fix Form profiler toggles | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix | License | MIT Following: #51621 * Reuse the chervron in the filetree * Remove the not-togglin-toggle present on the error zone | before | after | - | - | ![before](https://github.com/symfony/symfony/assets/1359581/da92dba8-9b51-451d-8e58-7b78ceec848c) | ![after](https://github.com/symfony/symfony/assets/1359581/21fdd60d-100b-4ee5-b611-5ccdef469210) | Commits ------- 0dbab84 Fix Form profiler toggles
2 parents 30a35e4 + 0dbab84 commit 253370a

File tree

1 file changed

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

1 file changed

+15
-17
lines changed

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

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,8 @@
9797
9898
.toggle-icon {
9999
display: inline-block;
100-
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' data-icon-name='icon-tabler-square-plus' width='24' height='24' viewBox='0 0 24 24' stroke-width='2px' stroke='currentColor' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Crect x='4' y='4' width='16' height='16' rx='2'%3E%3C/rect%3E%3Cline x1='9' y1='12' x2='15' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='9' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E") no-repeat;
101-
background-size: 18px 18px;
102100
}
103101
.closed .toggle-icon, .closed.toggle-icon {
104-
background-position: bottom left;
105-
}
106-
.toggle-icon.empty {
107-
background-image: none;
108102
}
109103
110104
.tree .tree-inner {
@@ -118,11 +112,19 @@
118112
width: 16px;
119113
height: 16px;
120114
margin-left: -18px;
115+
display: inline-grid;
116+
place-content: center;
117+
background: none;
118+
border: none;
119+
transition: transform 200ms;
121120
}
122-
.tree .toggle-icon {
123-
width: 18px;
124-
height: 18px;
125-
vertical-align: bottom;
121+
.tree .toggle-button.closed svg {
122+
transform: rotate(-90deg);
123+
}
124+
.tree .toggle-button svg {
125+
transform: rotate(0deg);
126+
width: 16px;
127+
height: 16px;
126128
}
127129
.tree .toggle-icon.empty {
128130
width: 5px;
@@ -406,7 +408,9 @@
406408
{% endif %}
407409

408410
{% if data.children is not empty %}
409-
<a class="toggle-button" data-toggle-target-id="{{ data.id }}-children" href="#"><span class="toggle-icon"></span></a>
411+
<button class="toggle-button" data-toggle-target-id="{{ data.id }}-children">
412+
{{ source('@WebProfiler/Icon/chevron-down.svg') }}
413+
</button>
410414
{% else %}
411415
<div class="toggle-icon empty"></div>
412416
{% endif %}
@@ -496,12 +500,6 @@
496500
{% macro render_form_errors(data) %}
497501
{% if data.errors is defined and data.errors|length > 0 %}
498502
<div class="errors">
499-
<h3>
500-
<a class="toggle-button" data-toggle-target-id="{{ data.id }}-errors" href="#">
501-
Errors <span class="toggle-icon"></span>
502-
</a>
503-
</h3>
504-
505503
<table id="{{ data.id }}-errors">
506504
<thead>
507505
<tr>

0 commit comments

Comments
 (0)
0