Skip to content

Commit

Permalink
added CSS class .tracy-dump-seamless
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 7, 2024
1 parent e7af752 commit c290a54
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/Tracy/Bar/assets/bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ body#tracy-debug { /* in popup window */
display: inline;
}

#tracy-debug .tracy-dump {
#tracy-debug .tracy-dump:where(:not(.tracy-dump-seamless .tracy-dump)) {
margin: 0;
padding: 2px 5px;
}
Expand Down
12 changes: 2 additions & 10 deletions src/Tracy/BlueScreen/assets/bluescreen.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ html.tracy-bs-visible body {
font: 9pt/1.5 Consolas, monospace !important;
}

#tracy-bs pre,
#tracy-bs pre:not(.tracy-dump-seamless pre),
#tracy-bs table {
background: #FDF5CE;
padding: .4em .7em;
Expand All @@ -106,13 +106,6 @@ html.tracy-bs-visible body {
overflow: auto;
}

#tracy-bs table pre {
padding: 0;
margin: 0;
border: none;
box-shadow: none;
}

#tracy-bs table {
border-collapse: collapse;
width: 100%;
Expand All @@ -134,8 +127,7 @@ html.tracy-bs-visible body {
width: 20%;
}

#tracy-bs tr:nth-child(2n),
#tracy-bs tr:nth-child(2n) pre {
#tracy-bs tr:nth-child(2n) {
background-color: #F7F0CB;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Tracy/BlueScreen/assets/section-cli.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (!Helpers::isCli()) {
<?php if (isset($_SERVER['argv'])): ?>
<h3>Arguments</h3>
<div class="tracy-pane">
<table>
<table class="tracy-dump-seamless">
<?php foreach ($_SERVER['argv'] as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand Down
8 changes: 4 additions & 4 deletions src/Tracy/BlueScreen/assets/section-environment.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $constants = get_defined_constants(true)['user'] ?? [];

<div>
<div class="tracy-tab-panel tracy-pane tracy-active">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($_SERVER as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -52,7 +52,7 @@ $constants = get_defined_constants(true)['user'] ?? [];
<?php if ($_SESSION ?? null): ?>
<div class="tracy-tab-panel">
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($_SESSION as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $k === '__NF' ? '<i>Nette Session</i>' : $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -63,7 +63,7 @@ $constants = get_defined_constants(true)['user'] ?? [];
<?php if (!empty($_SESSION['__NF']['DATA'])):?>
<h3>Nette Session</h3>
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($_SESSION['__NF']['DATA'] as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -77,7 +77,7 @@ $constants = get_defined_constants(true)['user'] ?? [];

<?php if ($constants): ?>
<div class="tracy-tab-panel tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($constants as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand Down
10 changes: 5 additions & 5 deletions src/Tracy/BlueScreen/assets/section-http.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (Helpers::isCli()) {

<?php if ($httpHeaders): ?>
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($httpHeaders as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -49,7 +49,7 @@ if (Helpers::isCli()) {
<p><i>empty</i></p>
<?php else: ?>
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($_GET as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -70,7 +70,7 @@ if (Helpers::isCli()) {
<?php else: ?>
<h3>$_POST</h3>
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($_POST as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -84,7 +84,7 @@ if (Helpers::isCli()) {
<p><i>empty</i></p>
<?php else: ?>
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach ($_COOKIE as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
Expand All @@ -98,7 +98,7 @@ if (Helpers::isCli()) {
<h3>Code: <?= Helpers::escapeHtml(http_response_code()) ?></h3>
<?php if (headers_list()): ?>
<div class="tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
<?php foreach (headers_list() as $s): $s = explode(':', $s, 2); ?>
<tr><th><?= Helpers::escapeHtml($s[0]) ?></th><td><?= $dump(trim($s[1]), $s[0]) ?></td></tr>
<?php endforeach ?>
Expand Down
2 changes: 1 addition & 1 deletion src/Tracy/BlueScreen/assets/section-stack-callStack.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (!$stack) {


<?php if (!empty($row['args'])): ?>
<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<?php
try {
$r = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']);
Expand Down
7 changes: 7 additions & 0 deletions src/Tracy/Dumper/assets/dumper-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
white-space: pre-wrap;
}

.tracy-dump-seamless .tracy-dump {
padding: 0;
margin: 0;
border: none;
background: transparent;
}

.tracy-dump.tracy-dark div {
padding-left: 2.5ex;
}
Expand Down
7 changes: 7 additions & 0 deletions src/Tracy/Dumper/assets/dumper-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
white-space: pre-wrap;
}

.tracy-dump-seamless .tracy-dump {
padding: 0;
margin: 0;
border: none;
background: transparent;
}

.tracy-dump.tracy-light div {
padding-left: 2.5ex;
}
Expand Down
9 changes: 1 addition & 8 deletions src/Tracy/assets/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,10 @@ tracy-div:not(a b) .tracy-dump div div:hover {
border-left-color: rgba(0, 0, 0, .25);
}

tracy-div:not(a b) .tracy-dump {
tracy-div:not(a b) .tracy-dump:where(:not(.tracy-dump-seamless .tracy-dump)) {
background: #FDF5CE;
padding: .4em .7em;
border: 1px dotted silver;
overflow: auto;
}

tracy-div:not(a b) table .tracy-dump.tracy-dump { /* overwrite .tracy-dump.tracy-light etc. */
padding: 0;
margin: 0;
border: none;
}

tracy-div:not(a b) .tracy-dump-location {
Expand Down
10 changes: 5 additions & 5 deletions tests/Tracy/expected/Debugger.error-in-eval.expect
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="tracy-callstack-additional tracy-collapsed">


<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$message</th><td><pre class="tracy-dump tracy-light"
><span class="tracy-dump-string" title="12 characters"><span>'</span>The my error<span>'</span></span></pre>
</td></tr>
Expand Down Expand Up @@ -87,7 +87,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$user</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-string" title="4 characters"><span>'</span>root<span>'</span></span></pre>
</td></tr>
<tr><th>$pass</th><td><pre class="tracy-dump tracy-light" data-tracy-dump='{"text":"***** (string)"}'></pre>
Expand Down Expand Up @@ -125,7 +125,7 @@

<div>
<div class="tracy-tab-panel tracy-pane tracy-active">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
%A%
</table>
</div>
Expand All @@ -135,7 +135,7 @@


<div class="tracy-tab-panel tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
%A%
</table>
</div>
Expand Down Expand Up @@ -186,7 +186,7 @@
<div class="tracy-tab-panel">
<h3>Code: %d%</h3>
<div class="tracy-pane">
<table class="tracy-sortable">%A%</table>
<table class="tracy-sortable tracy-dump-seamless">%A%</table>
</div>


Expand Down
10 changes: 5 additions & 5 deletions tests/Tracy/expected/Debugger.exception.fiber.html.expect
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light" data-tracy-dump='[[0,1],[1,2],[2,3]]'></pre>
</td></tr>
</table>
Expand All @@ -83,7 +83,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-bool">true</span></pre>
</td></tr>
<tr><th>$arg2</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-bool">false</span></pre>
Expand All @@ -102,7 +102,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light" data-tracy-dump='{"ref":%d%}'></pre>
</td></tr>
<tr><th>$arg2</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-string" title="10 characters"><span>'</span>any string<span>'</span></span></pre>
Expand Down Expand Up @@ -134,7 +134,7 @@
<div class="tracy-callstack-additional">
<pre title="Ctrl-Click to open in editor" data-tracy-href="%a%" class='tracy-code'>%A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$value</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-number">123</span></pre>
</td></tr>
</table>
Expand All @@ -151,7 +151,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" data-tracy-href="%a%" class='tracy-code'>%A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$a</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-number">123</span></pre>
</td></tr>
</table>
Expand Down
6 changes: 3 additions & 3 deletions tests/Tracy/expected/Debugger.exception.generator.html.expect
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light" data-tracy-dump='[[0,1],[1,2],[2,3]]'></pre>
</td></tr>
</table>
Expand All @@ -83,7 +83,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-bool">true</span></pre>
</td></tr>
<tr><th>$arg2</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-bool">false</span></pre>
Expand All @@ -102,7 +102,7 @@
<div class="tracy-callstack-additional tracy-collapsed">
<pre title="Ctrl-Click to open in editor" %A%</pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light" data-tracy-dump='{"ref":%d%}'></pre>
</td></tr>
<tr><th>$arg2</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-string" title="10 characters"><span>'</span>any string<span>'</span></span></pre>
Expand Down
12 changes: 6 additions & 6 deletions tests/Tracy/expected/Debugger.exception.html.expect
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<span class='tracy-line'>%d%:</span> function </span>third<span class='tracy-code-keyword'>(</span><span class='tracy-code-var'>$arg1</span><span class='tracy-code-keyword'>)
</span></code></div></pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light" data-tracy-dump='[[0,1],[1,2],[2,3]]'></pre>
</td></tr>
</table>
Expand Down Expand Up @@ -116,7 +116,7 @@
<span class='tracy-line'>%d%:</span> function </span>second<span class='tracy-code-keyword'>(</span><span class='tracy-code-var'>$arg1</span><span class='tracy-code-keyword'>, </span><span class='tracy-code-var'>$arg2</span><span class='tracy-code-keyword'>)
</span></code></div></pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-bool">true</span></pre>
</td></tr>
<tr><th>$arg2</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-bool">false</span></pre>
Expand Down Expand Up @@ -146,7 +146,7 @@
</span><span class='tracy-line-highlight'>%d%: first(10, 'any string');</span>
</code></div></pre>

<table class="tracy-callstack-args">
<table class="tracy-callstack-args tracy-dump-seamless">
<tr><th>$arg1</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-number">10</span></pre>
</td></tr>
<tr><th>$arg2</th><td><pre class="tracy-dump tracy-light"><span class="tracy-dump-string" title="10 characters"><span>'</span>any string<span>'</span></span></pre>
Expand Down Expand Up @@ -189,7 +189,7 @@

<div>
<div class="tracy-tab-panel tracy-pane tracy-active">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
%A%
</table>
</div>
Expand All @@ -199,7 +199,7 @@


<div class="tracy-tab-panel tracy-pane">
<table class="tracy-sortable">
<table class="tracy-sortable tracy-dump-seamless">
%A%
</table>
</div>
Expand Down Expand Up @@ -250,7 +250,7 @@
<div class="tracy-tab-panel">
<h3>Code: %d%</h3>
<div class="tracy-pane">
<table class="tracy-sortable">%A%</table>
<table class="tracy-sortable tracy-dump-seamless">%A%</table>
</div>


Expand Down
Loading

0 comments on commit c290a54

Please sign in to comment.