|
53 | 53 | margin-bottom: 2rem;
|
54 | 54 | }
|
55 | 55 | .twig-component-render {
|
56 |
| - /*box-shadow: 0 0 0 1px var(--table-border-color);*/ |
57 | 56 | margin-left: calc(var(--render-depth) * .5rem);
|
58 | 57 | width: calc(100% - calc(var(--render-depth) * .5rem));
|
59 | 58 | }
|
|
83 | 82 | opacity: .85;
|
84 | 83 | transition: all 250ms ease-in-out;
|
85 | 84 | }
|
86 |
| - .twig-component-render tbody th { |
87 |
| - font-weight: normal; |
88 |
| - } |
89 |
| -
|
90 | 85 | .twig-component-render th:first-child,
|
91 | 86 | .twig-component-render tr:first-child {
|
92 | 87 | width: 25%;
|
93 | 88 | }
|
94 |
| - .twig-component-render th { |
| 89 | + .twig-component-render th, |
| 90 | + .twig-component-render tbody th { |
95 | 91 | font-weight: normal;
|
96 | 92 | }
|
97 | 93 | .twig-component-render th:first-child {
|
|
227 | 223 | <td>{{ component.name }}</td>
|
228 | 224 | <td>
|
229 | 225 | {% if component.class == 'Symfony\\UX\\TwigComponent\\AnonymousComponent' %}
|
230 |
| - <pre class="sf-dump"><span class="text-muted">AnonymousComponent</span></pre> |
| 226 | + <pre class="sf-dump"><span class="text-muted">[Anonymous]</span></pre> |
231 | 227 | {% else %}
|
232 | 228 | {{ profiler_dump(component.class_stub) }}
|
233 | 229 | {% endif %}
|
|
252 | 248 |
|
253 | 249 | {% block table_renders %}
|
254 | 250 | <div class="twig-component-renders">
|
| 251 | + {% set _memory = null %} |
255 | 252 | {% for render in collector.renders %}
|
256 | 253 | <table class="twig-component-render" style="--render-depth:{{ render.depth }};">
|
257 |
| - <thead class="sf-toggle {{ loop.index == 1 ? 'sf-toggle-on' : 'sf-toggle-off' }}" |
258 |
| - data-toggle-selector="#render-{{ loop.index }}--details" |
259 |
| - data-toggle-initial="{{ loop.index == 1 ? 'display' }}" |
| 254 | + <thead |
| 255 | + class="sf-toggle {{ loop.index == 1 ? 'sf-toggle-on' : 'sf-toggle-off' }}" |
| 256 | + data-toggle-selector="#render-{{ loop.index }}--details" |
| 257 | + data-toggle-initial="{{ loop.index == 1 ? 'display' }}" |
260 | 258 | >
|
261 | 259 | <tr>
|
262 | 260 | <th class="key">{{ render.depth ? source('@TwigComponent/Collector/chevron-down.svg') }}{{ render.name }}</th>
|
263 | 261 | <th>
|
264 | 262 | {% if render.class == 'Symfony\\UX\\TwigComponent\\AnonymousComponent' %}
|
265 |
| - <pre class="sf-dump"><span class="text-muted">[Anonymous] {{ render.name }}</span></pre> |
| 263 | + <pre class="sf-dump"><span class="text-muted">[Anonymous]</span></pre> |
266 | 264 | {% else %}
|
267 | 265 | {{ render.class }}
|
268 | 266 | {% endif %}
|
269 | 267 | </th>
|
270 | 268 | <th class="cell-right renderTime">
|
271 |
| - {% if render.render_memory %} |
272 |
| - {{ (render.render_memory / 1024 / 1024)|number_format(1) }} |
273 |
| - <span class="text-muted text-small">MiB</span> |
274 |
| - {% endif %} |
| 269 | + {% set _render_memory = render.render_memory|default(0) / 1024 / 1024 %} |
| 270 | + <span class="{{ _render_memory == _memory ? 'text-muted' }}"> |
| 271 | + {{- _render_memory|number_format(1) -}} |
| 272 | + </span> |
| 273 | + <span class="text-muted text-small">MiB</span> |
| 274 | + {% set _memory = _render_memory %} |
275 | 275 | </th>
|
276 | 276 | <th class="cell-right renderTime">
|
277 | 277 | {{ render.render_time|number_format(2) }}
|
278 | 278 | <span class="text-muted text-small">ms</span>
|
279 | 279 | </th>
|
280 | 280 | <th class="cell-right">
|
281 | 281 | <button class="btn btn-link toggle-button" type="button" aria-label="Toggle details">
|
282 |
| - {{ source('@WebProfiler/Icon/chevron-down.svg', true) }} |
283 | 282 | {{ source('@TwigComponent/Collector/chevron-down.svg') }}
|
284 | 283 | </button>
|
285 | 284 | </th>
|
|
0 commit comments