memlnaut-nisps/src/components/visual/heatmap-strip.css
monkey-w1n5t0n c147df55f2 feat: implement param popup with curve drag, range sliders, and freeze toggle (f15)
Add ParamPopup component with full parameter controls:
- Curve canvas with vertical drag to adjust response curve
- Dual min/max range sliders with visual fill bar
- Freeze/unfreeze toggle that captures current value
- Param override system in ML store with curve/range/freeze state
- 19 Playwright e2e tests covering VAL-PARAM-001 through VAL-PARAM-004

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 21:44:09 +02:00

298 lines
5.3 KiB
CSS

/* ---- Heatmap strip (top) — interactive bars ---- */
.heatmap-strip {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 22px;
z-index: 20;
background: rgba(13, 13, 13, 0.5);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
display: flex;
align-items: flex-end;
padding: 2px 4px;
}
.heatmap-cells {
display: flex;
flex-direction: row;
flex: 1;
height: 16px;
gap: 1px;
border-radius: 3px;
overflow: hidden;
align-items: stretch;
}
.heatmap-cell {
flex: 1;
min-width: 0;
position: relative;
cursor: pointer;
height: 16px;
background: rgba(255, 255, 255, 0.04);
overflow: hidden;
}
.heatmap-cell.dragging {
cursor: ew-resize;
}
.heatmap-cell-bar {
height: 100%;
border-radius: 0 1px 1px 0;
transition: width 0.15s;
pointer-events: none;
}
.heatmap-cell:hover .heatmap-cell-bar {
filter: brightness(1.3);
}
.heatmap-tooltip {
position: fixed;
top: 32px;
padding: 4px 10px;
background: rgba(0, 0, 0, 0.85);
border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
border-radius: 6px;
font-size: 12px;
color: var(--text, #e0e0e8);
pointer-events: none;
opacity: 0;
transition: opacity 0.15s;
z-index: 25;
white-space: nowrap;
}
.heatmap-tooltip.visible {
opacity: 1;
}
/* Param popup */
.param-popup {
position: fixed;
z-index: 30;
background: rgba(13, 13, 20, 0.92);
border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
border-radius: 8px;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
padding: 10px 12px;
min-width: 200px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.15s;
pointer-events: none;
font-family: var(--font-mono, 'JetBrains Mono', monospace);
}
.param-popup.visible {
opacity: 1;
pointer-events: auto;
}
/* Header: param name + value + close button */
.pp-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.pp-name {
font-size: 12px;
font-weight: 600;
flex: 1;
}
.pp-value {
font-size: 11px;
color: var(--accent, #00d4ff);
font-variant-numeric: tabular-nums;
}
.pp-close {
background: none;
border: none;
color: #888;
font-size: 16px;
cursor: pointer;
padding: 0 2px;
line-height: 1;
font-family: inherit;
}
.pp-close:hover {
color: #fff;
}
/* Body: controls */
.pp-body {
display: flex;
flex-direction: column;
gap: 6px;
}
/* Generic row layout */
.pp-row {
display: flex;
align-items: center;
gap: 8px;
}
.pp-label {
font-size: 10px;
color: rgba(255, 255, 255, 0.5);
min-width: 36px;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.pp-val {
font-size: 10px;
color: rgba(255, 255, 255, 0.6);
font-variant-numeric: tabular-nums;
min-width: 48px;
text-align: right;
}
/* Curve canvas */
.pp-curve-canvas {
width: 36px;
height: 36px;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: ns-resize;
touch-action: none;
}
/* Range slider wrap (dual min/max) */
.pp-range-wrap {
flex: 1;
position: relative;
height: 20px;
display: flex;
align-items: center;
}
.pp-range-fill {
position: absolute;
height: 4px;
background: var(--accent, #00d4ff);
border-radius: 2px;
opacity: 0.4;
pointer-events: none;
top: 50%;
transform: translateY(-50%);
}
.pp-range-input {
position: absolute;
width: 100%;
height: 4px;
-webkit-appearance: none;
appearance: none;
background: transparent;
pointer-events: none;
margin: 0;
top: 50%;
transform: translateY(-50%);
}
.pp-range-input::-webkit-slider-thumb {
-webkit-appearance: none;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--accent, #00d4ff);
cursor: pointer;
pointer-events: auto;
border: none;
}
.pp-range-input::-moz-range-thumb {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--accent, #00d4ff);
cursor: pointer;
pointer-events: auto;
border: none;
}
.pp-range-input.pp-range-min::-webkit-slider-thumb {
background: #ff6a00;
}
.pp-range-input.pp-range-max::-webkit-slider-thumb {
background: #00ccff;
}
.pp-range-input.pp-range-min::-moz-range-thumb {
background: #ff6a00;
}
.pp-range-input.pp-range-max::-moz-range-thumb {
background: #00ccff;
}
/* Freeze row */
.pp-freeze-row {
gap: 6px;
}
.pp-freeze-btn {
font-size: 10px;
padding: 3px 8px;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.15);
background: rgba(255, 255, 255, 0.05);
color: rgba(255, 255, 255, 0.6);
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: inherit;
transition: all 0.15s;
}
.pp-freeze-btn:hover {
background: rgba(255, 255, 255, 0.1);
color: #fff;
}
.pp-freeze-btn.frozen {
background: rgba(0, 212, 255, 0.15);
border-color: rgba(0, 212, 255, 0.4);
color: #00d4ff;
}
.pp-val-slider {
flex: 1;
height: 4px;
-webkit-appearance: none;
appearance: none;
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
outline: none;
}
.pp-val-slider::-webkit-slider-thumb {
-webkit-appearance: none;
width: 10px;
height: 10px;
border-radius: 50%;
background: #00d4ff;
cursor: pointer;
border: none;
}
.pp-val-slider::-moz-range-thumb {
width: 10px;
height: 10px;
border-radius: 50%;
background: #00d4ff;
cursor: pointer;
border: none;
}