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
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
Finished the Ajax panel redesign
  • Loading branch information
javiereguiluz committed Jul 30, 2015
commit acee052b686403ee84904c8ade376e9304304f22
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

{% block toolbar %}
{% set icon %}
{{ include('@WebProfiler/Icon/ajax.svg.twig') }}
<span class="sf-toolbar-value sf-toolbar-ajax-requests">0</span>
<span class="sf-toolbar-label">ajax</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 @@ -24,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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
{% set request_handler %}
{% if collector.controller.class is defined %}
{% set link = collector.controller.file|file_link(collector.controller.line) %}
{% if link %}<a href="#" onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;">{% endif %}

<span class="sf-toolbar-info-class">
{{ collector.controller.class|abbr_class }}
</span>

{% if collector.controller.method %}
<span class="sf-toolbar-info-class sf-toolbar-info-with-next-pointer">{{ collector.controller.class|abbr_class }}</span>
<span class="sf-toolbar-info-method"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>
<span class="sf-toolbar-info-method">
{{ collector.controller.method }}
</span>
{% else %}
<span class="sf-toolbar-info-class"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>{{ collector.controller.class|abbr_class }}</span>
{% endif %}

{% if link %}</a>{% endif %}
{% else %}
<span class="sf-toolbar-info-class">{{ collector.controller }}</span>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %}
{% set icon %}
<span>
<img height="28" alt="Twig" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAcCAYAAACOGPReAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAbElEQVRIx2NgGAXUBowMDAwMaWlp/6ll4KxZsxhZYJy0tDRqGMjAwMDAwEQL77OgCxSXlJBsSG9PDwqfJi6lj/fRvTJ4XYocUTBXE4q8oRtRRBnKwsw8RFw6fA0lKkd1dnYOIpfCCthRMIIAAI0IFu9Hxh7ZAAAAAElFTkSuQmCC" />
{{ include('@WebProfiler/Icon/twig.html.twig') }}
<span class="sf-toolbar-value">{{ time }}</span>
<span class="sf-toolbar-label">ms</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
tbody.appendChild(rows);

if (infoSpan) {
var text = requestStack.length + ' call' + (requestStack.length > 1 ? 's' : '');
var text = requestStack.length + ' AJAX request' + (requestStack.length > 1 ? 's' : '');
infoSpan.textContent = text;
}
} else {
Expand All @@ -181,15 +181,16 @@
requestCounter[0].textContent = requestStack.length;

var className = 'sf-toolbar-ajax-requests sf-toolbar-value';
requestCounter[0].className = className;

var ajaxToolbarPanel = document.querySelectorAll('.sf-toolbar-block-ajax');
Copy link
Member

Choose a reason for hiding this comment

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

you should avoid querying twice for this block. and you should move the DOM traversal before the DOM changes done above as done elsewhere to invalidate the DOM only once

if (state == 'ok') {
className += ' sf-toolbar-status-green';
ajaxToolbarPanel.className = 'sf-toolbar-status-green';
} else if (state == 'error') {
className += ' sf-toolbar-status-red';
ajaxToolbarPanel.className = 'sf-toolbar-status-red';
} else {
className += ' sf-ajax-request-loading';
ajaxToolbarPanel.className = 'sf-ajax-request-loading';
}

requestCounter[0].className = className;
};

var addEventListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@
.sf-toolbar-block-config svg {
padding-right: 4px;
}
.sf-toolbar-block-time {
margin-right: 0;
}
.sf-toolbar-block-ajax {
display: none;
}

.sf-toolbar-block span {
display: inline-block;
Expand Down Expand Up @@ -140,7 +134,7 @@
}

.sf-toolbar-block .sf-toolbar-info-piece a {
color: #75D1EA;
color: #99CDD8;
text-decoration: underline;
}
.sf-toolbar-block .sf-toolbar-info-piece a:hover {
Expand Down Expand Up @@ -288,17 +282,13 @@
margin-top: 0;
}

.sf-toolbar-block .sf-toolbar-info-method {
.sf-toolbar-block-time .sf-toolbar-icon {
padding-right: 5px;
}

.sf-toolbar-block .sf-toolbar-info-method[onclick=""] {
border-bottom: none;
cursor: inherit;
.sf-toolbar-block-memory .sf-toolbar-icon {
padding-left: 5px;
}

.sf-toolbar-info-php {}
.sf-toolbar-info-php-ext {}

.sf-toolbar-info-php-ext .sf-toolbar-status + .sf-toolbar-status {
margin-left: 4px;
}
Expand Down Expand Up @@ -339,21 +329,39 @@
overflow-y: auto;
}

.sf-toolbar-ajax-requests th, .sf-toolbar-ajax-requests td {
border-bottom: 1px solid #ddd;
padding: 0 4px;
color: #2f2f2f;
background-color: #fff;
.sf-toolbar-info-piece b.sf-toolbar-ajax-info {
color: #F5F5F5;
}
.sf-toolbar-ajax-requests {
width: 100%;
}

.sf-toolbar-ajax-requests td {
background-color: #444;
border-bottom: 1px solid #777;
color: #F5F5F5;
font-size: 12px;
padding: 4px;
}
.sf-toolbar-ajax-requests th {
background-color: #eee;
background-color: #222;
border-bottom: 0;
color: #AAA;
font-size: 11px;
padding: 4px;
}
.sf-ajax-request-url {
max-width: 300px;
line-height: 9px;
overflow: hidden;
text-overflow: ellipsis;
}
.sf-toolbar-ajax-requests .sf-ajax-request-url a {
text-decoration: none;
}
.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover {
text-decoration: underline;
}
.sf-ajax-request-duration {
text-align: right;
}
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy