8000 Redesigned the web debug toolbar by javiereguiluz · Pull Request #15160 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Redesigned the web debug toolbar #15160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Jul 31, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c2fcadc
Redesigned the web debug toolbar
javiereguiluz Jul 1, 2015
b6f413f
First batch of fixes
javiereguiluz Jul 2, 2015
4eee931
Restored all the code removed by mistake
javiereguiluz Jul 2, 2015
64b8f38
A new batch of updates
javiereguiluz Jul 8, 2015
2735346
Fixed a minor markup error that broke the toolbar
javiereguiluz Jul 8, 2015
51a79c9
Reorder toolbar panels
javiereguiluz Jul 8, 2015
ef53850
More fixes and tweaks
javiereguiluz Jul 8, 2015
fac5391
Lots of minor improvements
javiereguiluz Jul 8, 2015
acee052
Finished the Ajax panel redesign
8000 javiereguiluz Jul 8, 2015
af3dcb2
Minor Ajax tweaks
javiereguiluz Jul 8, 2015
041d424
Improved the Security toolbar panel
javiereguiluz Jul 9, 2015
77d522a
Tweaked the translation panel
javiereguiluz Jul 9, 2015
c0bee9b
Tweaked the Twig panel
javiereguiluz Jul 9, 2015
2bccdd4
Minor CSS fixes
javiereguiluz Jul 9, 2015
b25b6dd
Finished "dump" panel and other minor tweaks
javiereguiluz Jul 9, 2015
9d89841
Finished the toolbar redesign
javiereguiluz Jul 9, 2015
e14fb6d
Fixed a minor syntax issue
javiereguiluz Jul 9, 2015
7c35d25
Fixed another insignificant syntax issue
javiereguiluz Jul 9, 2015
23dc884
Fixed a potential issue in the request panel
javiereguiluz Jul 9, 2015
e28f895
A very high z-index value is required to avoid issues in the profiler…
javiereguiluz Jul 9, 2015
cd53210
Fixed another z-index issue
javiereguiluz Jul 10, 2015
0dfcb60
Fixed an issue with the Config panel in the Profiler view
javiereguiluz Jul 10, 2015
9e38a8a
Minor CSS tweaks and made font sizes bigger
javiereguiluz Jul 10, 2015
f087ac0
More vertical aligning fixes
javiereguiluz Jul 10, 2015
3ab2e20
fixed all vertical aligning issues and tweaked icons
javiereguiluz Jul 14, 2015
9b585b9
Made the close icon a bit smaller
javiereguiluz Jul 14, 2015
e94a6a0
Smaller font sizes for smartphones, fixed request status padding issue
javiereguiluz Jul 20, 2015
002dda5
Fixed toolbar issues when displaying it inside the profiler
javiereguiluz Jul 20, 2015
a0e03f6
Minor tweaks
javiereguiluz Jul 20, 2015
1847285
Pass the toolbar version number from the controller, to ease transiti…
javiereguiluz Jul 20, 2015
ebb44e4
Added some styles to make old panels look better in the new design
javiereguiluz Jul 20, 2015
972a92e
Misc. tweaks and improvements
javiereguiluz Jul 22, 2015
084cca6
Minor JavaScript optimizations
javiereguiluz Jul 22, 2015
7ec1cd4
Reverted the feature to display different toolbar versions
javiereguiluz Jul 27, 2015
2fb3319
Removed an unused import
javiereguiluz Jul 30, 2015
5070861
Added a new profiler_markup_version to improve BC of the new toolbar
javiereguiluz Jul 30, 2015
22f6bc5
Removed an useless CSS class and added styles for <hr>
javiereguiluz Jul 30, 2015
9df0f8b
Added some upgrade notes about the new toolbar design
javiereguiluz Jul 31, 2015
597637e
Tweaks and bug fixes
javiereguiluz Jul 31, 2015
7d92cb8
Restored the old behavior for toolbars with lots of elements
javiereguiluz Jul 31, 2015
b438ee5
Redesigned "abbr" elements
javiereguiluz Jul 31, 2015
b3ad83d
Removed an unused media query
javiereguiluz Jul 31, 2015
f237ff1
Increased the z-index of .sf-toolbar-info
javiereguiluz Jul 31, 2015
5a571b6
Reordered the toolbar elements via service priorities
javiereguiluz Jul 31, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
A new batch of updates
  • Loading branch information
javiereguiluz committed Jul 30, 2015
commit 64b8f38ddf954ae686b6e6ee9e4142077b54cac0
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}

{% block toolbar %}

{# Symfony Information #}
{% if 'unknown' == collector.symfonyState %}
{% set block_status = '' %}
{% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %}
Expand All @@ -21,83 +19,84 @@
{% endif %}

{% set icon %}
{% if collector.applicationname %}
<span class="sf-toolbar-label">{{ collector.applicationname }}</span>
<span class="sf-toolbar-value">{{ collector.applicationversion }}</span>
{% elseif collector.symfonyState is defined %}
{% if collector.symfonyState is defined %}
<a href="https://symfony.com/" title="{{ symfony_version_status }}">
<span class="sf-toolbar-label">symfony</span>
<span class="sf-toolbar-label">
{{ include('@WebProfiler/Icon/symfony.svg.twig') }}
</span>
<span class="sf-toolbar-value">{{ collector.symfonyversion }}</span>
</a>
{% elseif collector.applicationname %}
<span class="sf-toolbar-label">{{ collector.applicationname }}</span>
<span class="sf-toolbar-value">{{ collector.applicationversion }}</span>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the link may end up empty here, which looks weird

{% endset %}

{% set text %}
{% if collector.symfonyversion is defined %}
<div class="sf-toolbar-info-piece">
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
Read Symfony {{ collector.symfonyversion }} Docs
</a>
</div>
{% endif %}

{% if collector.applicationname %}
<div class="sf-toolbar-info-piece">
{{ collector.applicationname }} <b>{{ collector.applicationversion }}</b>
</div>
{% endif %}

<div class="sf-toolbar-info-piece">
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
Read Symfony {{ collector.symfonyversion }} Docs
</a>
<b>Profiler token</b>
<span>
{% if profiler_url %}
<a href="{{ profiler_url }}">{{ collector.token }}</a>
{% else %}
{{ collector.token }}
{% endif %}
</span>
</div>

{% if 'n/a' != collector.appname %}
<div class="sf-toolbar-info-piece">
<b>Kernel name</b>
<span>{{ collector.appname }}</span>
</div>
{% endif %}

{% if 'n/a' != collector.env %}
<div class="sf-toolbar-info-piece">
<b>Environment</b>
<span>{{ collector.env }}</span>
</div>
{% endif %}

{% if 'n/a' != collector.debug %}
<div class="sf-toolbar-info-piece">
<b>Debug</b>
<span class="{{ debug_status_class }}">{{ collector.debug ? 'en' : 'dis' }}abled</span>
<span class="{{ debug_status_class }}">{{ collector.debug ? 'enabled' : 'disabled' }}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still have a way to access the phpinfo page anywhere ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I've readded it as a link next to the PHP version:

phpinfo

</div>
{% endif %}

<div class="sf-toolbar-info-piece sf-toolbar-info-php">
<b>PHP version</b>
<span>{{ collector.phpversion }}</span>
</div>

<div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
<b>PHP Extensions</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
</div>

<div class="sf-toolbar-info-piece">
<b>Profiler token</b>
<span>
{% if profiler_url %}
<a href="{{ profiler_url }}">{{ collector.token }}</a>
{% else %}
{{ collector.token }}
{% endif %}
</span>
<b>PHP SAPI</b>
<span>{{ collector.sapiName }}</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false, 'block_name': 'config-symfony', 'block_status': block_status } %}

{# PHP Information #}
{% set icon %}
<a href="{{ path('_profiler_phpinfo') }}">
<span class="sf-toolbar-label">php</span>
<span class="sf-toolbar-value">{{ collector.phpversion }}</span>
</a>
{% endset %}
{% set text %}
{% spaceless %}
<div class="sf-toolbar-info-piece sf-toolbar-info-php">
<b>PHP</b>
<span>{{ collector.phpversion }}</span>
</div>
<div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
<b>PHP Extensions</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
</div>
<div class="sf-toolbar-info-piece">
<b>PHP SAPI</b>
<span>{{ collector.sapiName }}</span>
</div>
{% endspaceless %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false, 'block_name': 'config-php' } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }}
{% endblock %}

{% block menu %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</span>
{% endset %}

{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': collector.data.nb_errors ? 'red' : '' } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: collector.data.nb_errors ? 'red' : '' }) }}
{% endif %}
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
{% endif %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': status_color } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endif %}
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
<span>{{ collector.memoryLimit == -1 ? '&infin;' : '%.1f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false, 'block_status': status_color } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: status_color }) }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</div>
{% endspaceless %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
{% endblock %}

{% block menu %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<span>{{ duration }} ms</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': status_color } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endblock %}

{% block menu %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</div>
{% endif %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': status_color } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endif %}
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<span>{{ collector.macrocount }}</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
{% endblock %}

{% block menu %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
.sf-toolbar-block a:hover {
text-decoration: none;
}
.sf-toolbar-block-config-symfony,
.sf-toolbar-block-config-php {
.sf-toolbar-block-config {
float: right;
margin-left: 0;
margin-right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

Sfjs.setPreference('toolbar/displayState', 'block');
">
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><path fill="#FFFFFF" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M20 7.5 c-0.6 0-1-0.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svg.twig') }}
</a>
</div>
<style>
{% include '@WebProfiler/Profiler/toolbar.css.twig' with { 'position': position, 'floatable': true } %}
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
</style>
<div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 38px;"></div>
{% endif %}
Expand All @@ -43,7 +43,7 @@
document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
Sfjs.setPreference('toolbar/displayState', 'none');
">
<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path fill="#AAA" d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z" /></svg>
{{ include('@WebProfiler/Icon/close.svg.twig') }}
</a>
{% endif %}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="sf-toolbar-block sf-toolbar-block-{{ block_name|default(name) }} sf-toolbar-status-{{ block_status|default('normal') }}">
{% if link %}<a href="{{ path('_profiler', { 'token': token, 'panel': name }) }}"{% endif %}
<div class="sf-toolbar-block sf-toolbar-block-{{ name }} sf-toolbar-status-{{ status|default('normal') }}">
{% if link %}<a href="{{ path('_profiler', { token: token, panel: name }) }}"{% endif %}
<div class="sf-toolbar-icon">{{ icon|default('') }}</div>
<div class="sf-toolbar-info">{{ text|default('') }}</div>
{% if link %}</a>{% endif %}
Expand Down
0