Skip to content

Commit da26e42

Browse files
bug symfony#61422 [WebProfilerBundle] Hide WDT clearer when it is hidden (MatTheCat)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [WebProfilerBundle] Hide WDT clearer when it is hidden | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#61416 | License | MIT The `sf-toolbar-clearer` allows for the WDT not to hide content by reserving a space for it, so it should be hidden when the toolbar is closed. Given a page with a black footer when you scroll to the bottom, Before: <img width="450" height="70" alt="Screenshot 2025-08-14 at 16-05-35 SensioLabs Jobs" src="https://github.com/user-attachments/assets/2c372015-543a-44bb-83d4-8abc8a97dd54" /> After: <img width="450" height="70" alt="Screenshot 2025-08-14 at 16-06-04 SensioLabs Jobs" src="https://github.com/user-attachments/assets/8017ceb4-e112-48b9-a578-e7a7db616e44" /> The toggler’s `title` attribute has also been moved to its icons so that it depends on the WDT’s state. Commits ------- d7d737e [WebProfilerBundle] Hide WDT clearer when it is hidden
2 parents afe3e3f + d7d737e commit da26e42

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@
113113
background: var(--sf-toolbar-gray-700);
114114
}
115115

116+
.sf-toolbar.sf-toolbar-closed .sf-toolbar-clearer {
117+
display: none;
118+
}
116119
.sf-toolbar.sf-toolbar-closed .sf-toolbarreset .sf-toolbar-block {
117120
display: none;
118121
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
</div>
3333
{% endif %}
3434

35-
<button class="sf-toolbar-toggle-button" type="button" id="sfToolbarToggleButton-{{ token }}" title="Close Toolbar" accesskey="D" aria-expanded="true" aria-controls="sfToolbarMainContent-{{ token }}">
36-
<i class="sf-toolbar-icon-opened">{{ source('@WebProfiler/Icon/close.svg') }}</i>
37-
<i class="sf-toolbar-icon-closed">{{ source('@WebProfiler/Icon/symfony.svg') }}</i>
35+
<button class="sf-toolbar-toggle-button" type="button" id="sfToolbarToggleButton-{{ token }}" accesskey="D" aria-expanded="true" aria-controls="sfToolbarMainContent-{{ token }}">
36+
<i class="sf-toolbar-icon-opened" title="Close Toolbar">{{ source('@WebProfiler/Icon/close.svg') }}</i>
37+
<i class="sf-toolbar-icon-closed" title="Open Toolbar">{{ source('@WebProfiler/Icon/symfony.svg') }}</i>
3838
</button>
3939
</div>

0 commit comments

Comments
 (0)