From 7baa29e076e542459583586d9af3823f9261fd05 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 27 Mar 2024 15:12:04 +0100 Subject: [PATCH] [WebProfilerBundle] Update the search links in the profiler layout --- .../Controller/ProfilerController.php | 1 - .../Resources/views/Profiler/layout.html.twig | 8 +------- .../Resources/views/Profiler/profiler.css.twig | 12 +++++++++--- .../Resources/views/Profiler/results.html.twig | 4 +++- .../Resources/views/Profiler/search.html.twig | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 23895f70bb6e..dfaeacdce27e 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -195,7 +195,6 @@ public function searchBarAction(Request $request): Response 'end' => $request->query->get('end', $session?->get('_profiler_search_end')), 'limit' => $request->query->get('limit', $session?->get('_profiler_search_limit')), 'request' => $request, - 'render_hidden_by_default' => false, 'profile_type' => $request->query->get('type', $session?->get('_profiler_search_type', 'request')), ]), 200, diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig index 6b804a2e3278..2d35e72ab7d0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -28,16 +28,10 @@ {% if templates is defined %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig index cc87aae4d0ae..3c54b9f41e5f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -1416,7 +1416,7 @@ tr.status-warning td { ------------------------------------------------------------------------- #} #sidebar #sidebar-shortcuts { color: var(--gray-500); - padding: 10px 15px; + padding: 5px 8px; } #sidebar #sidebar-shortcuts .sf-tabs .tab-navigation { margin: 5px 0 15px; @@ -1431,15 +1431,21 @@ tr.status-warning td { display: flex; align-items: center; font-size: 13px; + padding: 5px 7px; } -#sidebar #sidebar-shortcuts:hover .btn-link { - color: var(--menu-color); +#sidebar #sidebar-shortcuts .btn-link:hover { + background: var(--menu-active-background); + color: var(--menu-active-color); + text-decoration: none; } #sidebar-shortcuts .shortcuts svg { height: 16px; width: 16px; margin-right: 4px; } +#sidebar #sidebar-shortcuts form { + padding: 5px 7px; +} {# Sidebar Search (the colors of this element don't change based on the selected theme) ------------------------------------------------------------------------- #} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig index d97de65c447a..551178a2da11 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig @@ -35,7 +35,9 @@ {% endblock %} {% block sidebar_search_css_class %}{% endblock %} -{% block sidebar_shortcuts_links %}{% endblock %} +{% block sidebar_shortcuts_links %} + {{ render(controller('web_profiler.controller.profiler::searchBarAction', query={type: profile_type }|merge(request.query.all))) }} +{% endblock %} {% block panel %}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig index 70cc96139dee..749ac490c7be 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig @@ -1,4 +1,4 @@ -