Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit91a2d75

Browse files
committed
minor#28906 Redesigned the log message filter (javiereguiluz)
This PR was merged into the 4.2-dev branch.Discussion----------Redesigned the log message filter| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | - <!-- required for new features -->In 4.2 we've added a log filter that looks like this:![filter-before](https://user-images.githubusercontent.com/73419/47091585-71d1d500-d225-11e8-9090-fa36defa598d.png)I propose a complete redesign to make it more subtle, but still useful. Filter is now displayed like this:![filter-overview](https://user-images.githubusercontent.com/73419/47091639-857d3b80-d225-11e8-87ba-beaa5bf5c83b.png)When you click on each level, only the messages of that and higher levels are displayed ... and the other levels look disabled:| Initial | Selected| --- | ---| ![filter-initial](https://user-images.githubusercontent.com/73419/47091706-ac3b7200-d225-11e8-84c3-bb5ef9fcabc5.png) | ![filter-selected](https://user-images.githubusercontent.com/73419/47091717-b198bc80-d225-11e8-972b-6f03cdbbd0ab.png)The icons display an "up arrow" and "down arrow" depending on the level to try to explain that you are rising or reducing the current level:![filter-in-action](https://user-images.githubusercontent.com/73419/47091827-ec9af000-d225-11e8-96cf-383e93688b29.gif)Commits-------2271a3b Redesigned the log message filter
2 parentsbcff647 +2271a3b commit91a2d75

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@
694694
var bullet=document.createElement('li');
695695
bullet.innerText= level;
696696
bullet.setAttribute('data-log-level',String(i));
697+
bullet.setAttribute('title','Show logs of level'+ level+' or higher');
697698
bullets.appendChild(bullet);
698699
addEventListener(bullet,'click',function() {
699700
if (i===this.parentNode.querySelectorAll('.active').length-1) {

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

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,9 @@ tr.status-warning td {
892892
background-color: var(--base-5);
893893
color: var(--base-2);
894894
}
895+
.tab-content {
896+
position: relative;
897+
}
895898
.tab-content > *:first-child {
896899
margin-top: 0;
897900
}
@@ -957,11 +960,43 @@ table.logs .metadata {
957960
}
958961
table.logs tr td:last-child { width: 100%; }
959962

960-
.log-levels { width: 100%; margin: 0; padding: 0; display: flex; align-items: center; list-style: none; }
961-
.log-levels li { width: 100%; padding: 3px; margin: 0; cursor: pointer; text-align: center; border: 2px dashed #e0e0e0; border-radius: 5px; color: #888; }
962-
.log-levels li + li { margin-left: 10px; }
963-
.log-levels li.active { background: #eee; color: #666; border-style: solid; border-width: 1px; padding: 4px; border-color: #aaa; }
964-
.log-levels li.last-active { cursor: not-allowed; }
963+
.log-levels { position: absolute; right: 5px; top: 33px; }
964+
.log-levels { border: var(--border); box-shadow: var(--shadow); margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; }
965+
.log-levels:before {
966+
content: "Filter";
967+
cursor: pointer;
968+
/* "filter" icon provided by FontAwesome - CC BY 4.0 License
969+
https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt */
970+
background: var(--table-background) no-repeat url('data:image/svg+xml;utf8,<svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"><pathfill="%23999"d="M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"class=""></path></svg>');
971+
background-position: 6px 6px;
972+
background-size: 14px 14px;
973+
padding: 4px 10px 4px 24px;
974+
position: absolute;
975+
top: -28px;
976+
}
977+
.log-levels:hover li { display: inline-flex; }
978+
.log-levels li {
979+
background: var(--tab-disabled-background);
980+
border-bottom: var(--border);
981+
color: var(--tab-disabled-color);
982+
cursor: s-resize;
983+
display: none;
984+
list-style: none;
985+
margin: 0;
986+
padding: 5px 10px;
987+
text-align: left;
988+
width: 100%;
989+
}
990+
.log-levels li.active {
991+
background: var(--tab-background);
992+
color: var(--tab-color);
993+
cursor: n-resize;
994+
}
995+
.log-levels li.last-active {
996+
background: var(--tab-active-background);
997+
color: var(--tab-active-color);
998+
cursor: unset;
999+
}
9651000

9661001
{# Doctrine panel
9671002
=========================================================================#}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp