Skip to content

Commit 7baa29e

Browse files
javiereguiluzfabpot
authored andcommitted
[WebProfilerBundle] Update the search links in the profiler layout
1 parent 78c6ceb commit 7baa29e

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ public function searchBarAction(Request $request): Response
195195
'end' => $request->query->get('end', $session?->get('_profiler_search_end')),
196196
'limit' => $request->query->get('limit', $session?->get('_profiler_search_limit')),
197197
'request' => $request,
198-
'render_hidden_by_default' => false,
199198
'profile_type' => $request->query->get('type', $session?->get('_profiler_search_type', 'request')),
200199
]),
201200
200,

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,10 @@
2828
<div id="sidebar-shortcuts">
2929
{% block sidebar_shortcuts_links %}
3030
<div class="shortcuts">
31-
<a class="btn btn-link" href="{{ path('_profiler_search', { limit: 10, type: profile_type }) }}">Last 10</a>
31+
<a class="btn btn-link" href="{{ path('_profiler_search', { limit: 10, type: profile_type }) }}">{{ source('@WebProfiler/Icon/search.svg') }} Search profiles</a>
3232
<a class="btn btn-link" href="{{ path('_profiler', { token: 'latest', type: profile_type }|merge(request.query.all)) }}">Latest</a>
33-
34-
<a class="sf-toggle btn btn-link" data-toggle-selector="#sidebar-search" {% if tokens is defined or about is defined %}data-toggle-initial="display"{% endif %}>
35-
{{ source('@WebProfiler/Icon/search.svg') }} <span class="hidden-small">Search</span>
36-
</a>
3733
</div>
3834
{% endblock sidebar_shortcuts_links %}
39-
40-
{{ render(controller('web_profiler.controller.profiler::searchBarAction', query={type: profile_type }|merge(request.query.all))) }}
4135
</div>
4236

4337
{% if templates is defined %}

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ tr.status-warning td {
14161416
------------------------------------------------------------------------- #}
14171417
#sidebar #sidebar-shortcuts {
14181418
color: var(--gray-500);
1419-
padding: 10px 15px;
1419+
padding: 5px 8px;
14201420
}
14211421
#sidebar #sidebar-shortcuts .sf-tabs .tab-navigation {
14221422
margin: 5px 0 15px;
@@ -1431,15 +1431,21 @@ tr.status-warning td {
14311431
display: flex;
14321432
align-items: center;
14331433
font-size: 13px;
1434+
padding: 5px 7px;
14341435
}
1435-
#sidebar #sidebar-shortcuts:hover .btn-link {
1436-
color: var(--menu-color);
1436+
#sidebar #sidebar-shortcuts .btn-link:hover {
1437+
background: var(--menu-active-background);
1438+
color: var(--menu-active-color);
1439+
text-decoration: none;
14371440
}
14381441
#sidebar-shortcuts .shortcuts svg {
14391442
height: 16px;
14401443
width: 16px;
14411444
margin-right: 4px;
14421445
}
1446+
#sidebar #sidebar-shortcuts form {
1447+
padding: 5px 7px;
1448+
}
14431449

14441450
{# Sidebar Search (the colors of this element don't change based on the selected theme)
14451451
------------------------------------------------------------------------- #}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
{% endblock %}
3636

3737
{% block sidebar_search_css_class %}{% endblock %}
38-
{% block sidebar_shortcuts_links %}{% endblock %}
38+
{% block sidebar_shortcuts_links %}
39+
{{ render(controller('web_profiler.controller.profiler::searchBarAction', query={type: profile_type }|merge(request.query.all))) }}
40+
{% endblock %}
3941

4042
{% block panel %}
4143
<div class="sf-tabs" data-processed="true">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div id="sidebar-search" class="{{ (render_hidden_by_default ?? true) ? 'hidden' }}">
1+
<div id="sidebar-search">
22
<form action="{{ path('_profiler_search') }}" method="get">
33
<div class="form-group">
44
<label for="ip">

0 commit comments

Comments
 (0)