Skip to content

Commit 13ecd61

Browse files
authored
Merge pull request #114 from StanFromIreland/tachyon-opcodes-jump
Fix shift when selecting
2 parents ede0f79 + f838c5d commit 13ecd61

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

Lib/profiling/sampling/_heatmap_assets/heatmap.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,13 +722,23 @@
722722
color: var(--text-muted);
723723
transition: color var(--transition-fast);
724724
white-space: nowrap;
725+
display: inline-flex;
726+
flex-direction: column;
725727
}
726728

727729
.toggle-switch .toggle-label.active {
728730
color: var(--text-primary);
729731
font-weight: 600;
730732
}
731733

734+
/* Reserve space for bold text to prevent layout shift on toggle */
735+
.toggle-switch .toggle-label::after {
736+
content: attr(data-text);
737+
font-weight: 600;
738+
height: 0;
739+
visibility: hidden;
740+
}
741+
732742
.toggle-switch.disabled {
733743
opacity: 0.4;
734744
pointer-events: none;

Lib/profiling/sampling/_heatmap_assets/heatmap_pyfile_template.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@
7171
<div class="legend-separator" aria-hidden="true"></div>
7272
<div class="legend-controls">
7373
<div class="toggle-switch" id="toggle-color-mode" title="Toggle between self time and total time coloring">
74-
<span class="toggle-label active">Self Time</span>
74+
<span class="toggle-label active" data-text="Self Time">Self Time</span>
7575
<div class="toggle-track"></div>
76-
<span class="toggle-label">Total Time</span>
76+
<span class="toggle-label" data-text="Total Time">Total Time</span>
7777
</div>
7878
<div class="toggle-switch" id="toggle-cold" title="Toggle visibility of lines with zero samples">
79-
<span class="toggle-label active">Show All</span>
79+
<span class="toggle-label active" data-text="Show All">Show All</span>
8080
<div class="toggle-track"></div>
81-
<span class="toggle-label">Hot Only</span>
81+
<span class="toggle-label" data-text="Hot Only">Hot Only</span>
8282
</div>
8383
<div class="toggle-switch" id="toggle-spec-view" title="Color lines by specialization level (requires bytecode data)">
84-
<span class="toggle-label active">Heat</span>
84+
<span class="toggle-label active" data-text="Heat">Heat</span>
8585
<div class="toggle-track"></div>
86-
<span class="toggle-label">Specialization</span>
86+
<span class="toggle-label" data-text="Specialization">Specialization</span>
8787
</div>
8888
<div class="legend-separator" aria-hidden="true"></div>
8989
<button class="bytecode-expand-all" id="toggle-all-bytecode" title="Expand/collapse all bytecode panels (keyboard: b)">

0 commit comments

Comments
 (0)