Skip to content

Commit

Permalink
feature #15160 Redesigned the web debug toolbar (javiereguiluz)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.8 branch.

Discussion
----------

Redesigned the web debug toolbar

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

In my opinion, the design of the current Web Debug Toolbar suffers from two problems: it looks outdated and it lacks polishing on some parts. Symfony has always introduced a big update in this toolbar for each big release, so I propose to do the same for Symfony 3.

Let's see the new proposed toolbar in action:

-----

**This is the default toolbar** (click on the image to enlarge it)

![default](https://cloud.githubusercontent.com/assets/73419/8449444/cb4be4ea-1fd1-11e5-9358-332449375531.png)

As you can see, if some panel doesn't provide any information, we don't show it (e.g. 0 queries, 0 forms, 0 logs, 0 ajax requests).

-----

Let's compare some panels in detail:

**Symfony Panel**

![symfony-old-panel](https://cloud.githubusercontent.com/assets/73419/8449504/407302b2-1fd2-11e5-80da-a49dc99e68f5.png) ![symfony-new-panel](https://cloud.githubusercontent.com/assets/73419/8449505/41698e20-1fd2-11e5-8ced-e2717716c2d3.png)

**Request Panel**

![request-old-panel](https://cloud.githubusercontent.com/assets/73419/8449531/7d6888ea-1fd2-11e5-829e-93c9e50b7b64.png) ![request-new-panel](https://cloud.githubusercontent.com/assets/73419/8449532/7e359da8-1fd2-11e5-87e6-f194d824254c.png)

-----

When needed, more panels are displayed, such as the SQL information:  (click on the image to enlarge it)

![sql_panel](https://cloud.githubusercontent.com/assets/73419/8449554/b6abc1d0-1fd2-11e5-8450-13eae5bc3c50.png)

As you can see, the new toolbar provides more information than the old one and it takes less space.

Some of the new panels include more information in the extended info, such as the Doctrine one showing that the second level cache is disabled:

![sql_old_panel](https://cloud.githubusercontent.com/assets/73419/8449573/fc288aae-1fd2-11e5-9823-46b33fa9d998.png) ![sql_new_panel](https://cloud.githubusercontent.com/assets/73419/8449572/fab6244c-1fd2-11e5-9e14-28045de0b143.png)

-----

**Errors and warnings** now stand out more clearly because all the panel background is changed.

For example, if there are i18n errors: (click on the image to enlarge it)

![i18n_panel_error](https://cloud.githubusercontent.com/assets/73419/8449590/20708786-1fd3-11e5-8ad7-6bd3b3f4b933.png)

If the page is loading too slowly: (click on the image to enlarge it)

![slow_page](https://cloud.githubusercontent.com/assets/73419/8449597/2bc0c6e6-1fd3-11e5-9a9e-55bfe07ac170.png)

If Symfony version is deprecated: (click on the image to enlarge it)

![deprecated_symfony](https://cloud.githubusercontent.com/assets/73419/8449605/3cfa9860-1fd3-11e5-8dbd-9915597970f4.png)

-----

HTTP Errors also stand out more clearly: (click on the image to enlarge it)

![error_404](https://cloud.githubusercontent.com/assets/73419/8449617/56a4ccb8-1fd3-11e5-9638-322f1840937c.png)

![error_500](https://cloud.githubusercontent.com/assets/73419/8449618/57a79294-1fd3-11e5-8383-2598dee73fc6.png)

-----

Some questions that you may be wondering:

  * **Why use a dark toolbar instead of maintaining the light toolbar?** Because a dark toolbar stands out more from most of the web designs. It's more probable that your applications display a light background than a dark background, so the Symfony Toolbar stands out more if it's designed in dark.
  * **What about the profiler?** If this proposal is approved I'll also update the design of the profiler to match this new dark and modern look-and-feel.
  * **What about smaller screens?** This is a proposal, so I haven't finished it. Tweaking the design for smaller screens will be the next step. Anyway, as you can see the new toolbar already takes much less space than the current one, so it won't be hard to adapt it.

Commits
-------

5a571b6 Reordered the toolbar elements via service priorities
f237ff1 Increased the z-index of .sf-toolbar-info
b3ad83d Removed an unused media query
b438ee5 Redesigned "abbr" elements
7d92cb8 Restored the old behavior for toolbars with lots of elements
597637e Tweaks and bug fixes
9df0f8b Added some upgrade notes about the new toolbar design
22f6bc5 Removed an useless CSS class and added styles for <hr>
5070861 Added a new profiler_markup_version to improve BC of the new toolbar
2fb3319 Removed an unused import
7ec1cd4 Reverted the feature to display different toolbar versions
084cca6 Minor JavaScript optimizations
972a92e Misc. tweaks and improvements
ebb44e4 Added some styles to make old panels look better in the new design
1847285 Pass the toolbar version number from the controller, to ease transition and keep BC
a0e03f6 Minor tweaks
002dda5 Fixed toolbar issues when displaying it inside the profiler
e94a6a0 Smaller font sizes for smartphones, fixed request status padding issue and make too long panels always be displayed at the leftmost part of browser window
9b585b9 Made the close icon a bit smaller
3ab2e20 fixed all vertical aligning issues and tweaked icons
f087ac0 More vertical aligning fixes
9e38a8a Minor CSS tweaks and made font sizes bigger
0dfcb60 Fixed an issue with the Config panel in the Profiler view
cd53210 Fixed another z-index issue
e28f895 A very high z-index value is required to avoid issues in the profiler view
23dc884 Fixed a potential issue in the request panel
7c35d25 Fixed another insignificant syntax issue
e14fb6d Fixed a minor syntax issue
9d89841 Finished the toolbar redesign
b25b6dd Finished "dump" panel and other minor tweaks
2bccdd4 Minor CSS fixes
c0bee9b Tweaked the Twig panel
77d522a Tweaked the translation panel
041d424 Improved the Security toolbar panel
af3dcb2 Minor Ajax tweaks
acee052 Finished the Ajax panel redesign
fac5391 Lots of minor improvements
ef53850 More fixes and tweaks
51a79c9 Reorder toolbar panels
2735346 Fixed a minor markup error that broke the toolbar
64b8f38 A new batch of updates
4eee931 Restored all the code removed by mistake
b6f413f First batch of fixes
c2fcadc Redesigned the web debug toolbar
  • Loading branch information
fabpot committed Jul 31, 2015
2 parents 2655072 + 5a571b6 commit 251314e
Show file tree
Hide file tree
Showing 31 changed files with 694 additions and 514 deletions.
61 changes: 61 additions & 0 deletions UPGRADE-2.8.md
Expand Up @@ -136,3 +136,64 @@ DependencyInjection
<service id="foo" class="stdClass" shared="false" />
</services>
```

Web Development Toolbar
-----------------------

The web development toolbar has been completely redesigned. This update has
introduced some changes in the HTML markup of the toolbar items.

Before:

Information was wrapped with simple `<span>` elements:

```twig
{% block toolbar %}
{% set icon %}
<span>
<svg ...></svg>
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
</span>
{% endset %}
{% endblock %}
```

After:

Information is now semantically divided into values and labels according to
the `class` attribute of each `<span>` element:

```twig
{% block toolbar %}
{% set icon %}
<svg ...></svg>
<span class="sf-toolbar-value">
{{ '%.1f'|format(collector.memory / 1024 / 1024) }}
</span>
<span class="sf-toolbar-label">MB</span>
{% endset %}
{% endblock %}
```

Most of the blocks designed for the previous toolbar will still be displayed
correctly. However, if you want to support both the old and the new toolbar,
it's better to make use of the new `profiler_markup_version` variable passed
to the toolbar templates:

```twig
{% block toolbar %}
{% set profiler_markup_version = profiler_markup_version|default(1) %}
{% set icon %}
{% if profiler_markup_version == 1 %}
{# code for the original toolbar #}
{% else %}
{# code for the new toolbar (Symfony 2.8+) #}
{% endif %}
{% endset %}
{% endblock %}
```
Expand Up @@ -5,17 +5,17 @@

{% if dumps_count %}
{% set icon %}
<svg width="21" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 21 28" enable-background="new 0 0 21 28" xml:space="preserve"><path fill="#3F3F3F" d="M21 14h-1c-0.3-4.8-4.1-8.7-9-9V4h-1v1c-4.8 0.3-8.7 4.1-9 9H0v1h1c0.3 4.8 4.1 8.7 9 9v1h1v-1 c4.8-0.3 8.7-4.1 9-9h1V14z M11 22v-4h-1v4c-3.7-0.2-6.7-3.2-7-7h4v-1H3c0.2-3.7 3.2-6.7 7-7v4h1V7c3.7 0.2 6.7 3.2 7 7h-4v1h4 C17.7 18.7 14.7 21.7 11 22z"/></svg>
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ dumps_count }}</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M12,22.6c-5.8,0-10.5-4.7-10.5-10.5C1.5,6.3,6.2,1.5,12,1.5s10.5,4.7,10.5,10.5C22.5,17.9,17.8,22.6,12,22.6z M12,4.5c-4.2,0-7.5,3.4-7.5,7.5c0,4.2,3.4,7.5,7.5,7.5s7.5-3.4,7.5-7.5C19.5,7.9,16.2,4.5,12,4.5z"/>
<path fill="#AAAAAA" d="M12,9.1c-0.8,0-1.5-0.7-1.5-1.5v-6c0-0.8,0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5v6C13.5,8.4,12.8,9.1,12,9.1zM13.5,22.4v-6c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5v6c0,0.8,0.7,1.5,1.5,1.5S13.5,23.2,13.5,22.4z M23.9,12c0-0.8-0.7-1.5-1.5-1.5h-6c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h6C23.2,13.5,23.9,12.8,23.9,12z M9.1,12c0-0.8-0.7-1.5-1.5-1.5h-6c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h6C8.4,13.5,9.1,12.8,9.1,12z"/>
</svg>
<span class="sf-toolbar-value">{{ dumps_count }}</span>
{% endset %}

{% set text %}
<div class="sf-toolbar-info-piece">
<b>dump()</b>
</div>
{% for dump in collector.getDumps('html') %}
<div class="sf-toolbar-info-piece">
in
<span>
{% if dump.file %}
{% set link = dump.file|file_link(dump.line) %}
{% if link %}
Expand All @@ -26,14 +26,15 @@
{% else %}
{{ dump.name }}
{% endif %}
line {{ dump.line }}:
</span>
<span class="sf-toolbar-file-line">line {{ dump.line }}</span>
{{ dump.data|raw }}
</div>
{% endfor %}
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onload="var h = this.parentNode.innerHTML, rx=/<script>(.*?)<\/script>/g, s; while (s = rx.exec(h)) {eval(s[1]);};" />
{% endset %}

{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': true } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
{% endif %}
{% endblock %}

Expand Down
Expand Up @@ -17,17 +17,17 @@

<services>
<service id="data_collector.config" class="%data_collector.config.class%" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/config.html.twig" id="config" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/config.html.twig" id="config" priority="-255" />
<call method="setKernel"><argument type="service" id="kernel" on-invalid="ignore" /></call>
</service>

<service id="data_collector.request" class="%data_collector.request.class%">
<tag name="kernel.event_subscriber" />
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="260" />
</service>

<service id="data_collector.ajax" class="Symfony\Bundle\FrameworkBundle\DataCollector\AjaxDataCollector" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="256" />
</service>

<service id="data_collector.exception" class="%data_collector.exception.class%" public="false">
Expand All @@ -46,13 +46,13 @@
</service>

<service id="data_collector.time" class="%data_collector.time.class%" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/time.html.twig" id="time" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/time.html.twig" id="time" priority="259" />
<argument type="service" id="kernel" on-invalid="ignore" />
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
</service>

<service id="data_collector.memory" class="%data_collector.memory.class%" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/memory.html.twig" id="memory" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/memory.html.twig" id="memory" priority="258" />
</service>

<service id="data_collector.router" class="%data_collector.router.class%" >
Expand Down
Expand Up @@ -2,39 +2,47 @@

{% block toolbar %}
{% if collector.tokenClass %}
{% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %}
{% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %}
{% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %}
{% set is_authenticated = collector.enabled and collector.authenticated %}
{% set color_code = is_authenticated ? '' : 'yellow' %}
{% else %}
{% set color_code = collector.enabled ? 'red' : 'black' %}
{% set color_code = collector.enabled ? 'red' : '' %}
{% endif %}

{% set icon %}
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M21,20.4V22H3v-1.6c0-3.7,2.4-6.9,5.8-8c-1.7-1.1-2.9-3-2.9-5.2c0-3.4,2.7-6.1,6.1-6.1s6.1,2.7,6.1,6.1c0,2.2-1.2,4.1-2.9,5.2C18.6,13.5,21,16.7,21,20.4z"/>
</svg>
<span class="sf-toolbar-value">{{ collector.user|default('n/a') }}</span>
{% endset %}

{% set text %}
{% if collector.tokenClass %}
<div class="sf-toolbar-info-piece">
<b>Logged in as</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
<span>{{ collector.user }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Authenticated</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ authentication_color_code }}">{{ authentication_color_text }}</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ is_authenticated ? 'green' : 'red' }}">{{ is_authenticated ? 'Yes' : 'No' }}</span>
</div>
{% if collector.tokenClass != null %}
<div class="sf-toolbar-info-piece">
<b>Token class</b>
{{ collector.tokenClass|abbr_class }}
<span>{{ collector.tokenClass|abbr_class }}</span>
</div>
{% endif %}
{% elseif collector.enabled %}
You are not authenticated.
<div class="sf-toolbar-info-piece">
<span>You are not authenticated.</span>
</div>
{% else %}
The security is disabled.
<div class="sf-toolbar-info-piece">
<span>The security is disabled.</span>
</div>
{% endif %}
{% endset %}
{% set icon %}
<svg width="24" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 24 28" enable-background="new 0 0 24 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M8.6 14.6c0-0.4 0-0.6 0-0.9c0.2-0.1 0.5-0.6 0.5-1.1c0.1 0 0.3-0.1 0.4-0.6c0-0.3-0.1-0.4-0.2-0.5 c0.2-0.6 0.6-2.6-0.8-2.8C8.4 8.4 8 8.3 7.5 8.3c-2 0-2.2 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toolbar_item.html.twig' with { 'link': profiler_url } %}

{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }}
{% endblock %}

{% block menu %}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
Expand Up @@ -79,7 +79,7 @@
<service id="twig.profile" class="Twig_Profiler_Profile" />

<service id="data_collector.twig" class="Symfony\Bridge\Twig\DataCollector\TwigDataCollector" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="257" />
<argument type="service" id="twig.profile" />
</service>

Expand Down
Expand Up @@ -11,13 +11,13 @@

namespace Symfony\Bundle\WebProfilerBundle\Controller;

use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Profiler\Profiler;
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/**
Expand Down Expand Up @@ -207,6 +207,7 @@ public function toolbarAction(Request $request, $token)
'templates' => $this->getTemplateManager()->getTemplates($profile),
'profiler_url' => $url,
'token' => $token,
'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar
)), 200, array('Content-Type' => 'text/html'));
}

Expand Down
Expand Up @@ -72,6 +72,7 @@ public function getName(Profile $profile, $panel)
public function getTemplates(Profile $profile)
{
$templates = $this->getNames($profile);

foreach ($templates as $name => $template) {
$templates[$name] = $this->twig->loadTemplate($template);
}
Expand Down
Expand Up @@ -2,15 +2,13 @@

{% block toolbar %}
{% set icon %}
<span>
<svg width="24" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 24 28" enable-background="new 0 0 24 28" xml:space="preserve"><polygon fill="#3F3F3F" points="18.4,3.8 12.8,9.4 16.3,9.4 16.3,21.1 14.1,21.1 9.9,25.3 16.3,25.3 20.5,25.3 20.5,21.1 20.5,9.4 23.9,9.4"/><polygon fill="#3F3F3F" points="5.6,25.3 11.2,19.7 7.7,19.7 7.7,8 9.9,8 14.1,3.8 7.7,3.8 3.5,3.8 3.5,8 3.5,19.7 0.1,19.7"/></svg>
<span class="sf-toolbar-ajax-requests">0</span>
</span>
{{ include('@WebProfiler/Icon/ajax.svg') }}
<span class="sf-toolbar-value sf-toolbar-ajax-requests">0</span>
{% endset %}

{% set text %}
<div class="sf-toolbar-info-piece">
<b>AJAX requests</b>
<span class="sf-toolbar-ajax-info"></span>
<b class="sf-toolbar-ajax-info"></b>
</div>
<div class="sf-toolbar-info-piece">
<table class="sf-toolbar-ajax-requests">
Expand All @@ -26,5 +24,6 @@
</table>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}

{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }}
{% endblock %}

0 comments on commit 251314e

Please sign in to comment.