Major graph editor improvements: standalone features, touch, docking, UX
Graph standalone features: - Clone button on all entity nodes (copy icon, watches for new entity) - Scene preset activation button (play icon, calls /activate API) - Automation enable/disable via start/stop toggle (PUT enabled) - Add missing entity types: sync_clock, scene_preset, pattern_template - Fix edit/delete handlers for cspt, sync_clock - CSPT added to test/preview button kinds - Bulk delete with multi-select + Delete key confirmation - Undo/redo framework with toolbar buttons (disabled when empty) - Keyboard shortcuts help panel (? key, draggable, anchor-persisted) - Enhanced search: type:device, tag:production filter syntax - Tags passed through to all graph nodes for tag-based filtering - Filter popover with grouped checkboxes replaces flat pill row Touch device support: - Pinch-to-zoom with 2-finger gesture tracking - Double-tap zoom toggle (1.0x ↔ 1.8x) - Multi-touch pointer tracking with pinch-to-pan - Overlay buttons and port labels visible on selected (tapped) nodes - Larger touch targets for ports (@media pointer: coarse) - touch-action: none on SVG canvas - 10px dead zone for touch vs 4px for mouse Visual improvements: - Port pin labels shown outside node on hover/select (outlined text) - Hybrid active edge flow: thicker + glow + animated dots - Test/preview icon changed to flask (matching card tabs) - Clone icon scaled down to 60% for compact overlay buttons - Monospace font for metric values (stable-width digits) - Hide scrollbar on graph tab (html:has override) Toolbar docking: - 8-position dock system (4 corners + 4 side midpoints) - Vertical layout when docked to left/right sides - Dock position indicators shown during drag (dots with highlight) - Snap animation on drop - Persisted dock position in localStorage Resize handling: - View center preserved on fullscreen/window resize (ResizeObserver) - All docked panels re-anchored on container resize - Zoom inertia for wheel and toolbar +/- buttons Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -804,9 +804,10 @@ ul.section-tip li {
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
color: var(--primary-text-color);
|
||||
font-family: var(--font-mono, monospace);
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
|
||||
@@ -159,10 +159,11 @@
|
||||
}
|
||||
|
||||
.dashboard-metric-value {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 700;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--primary-text-color);
|
||||
line-height: 1.2;
|
||||
font-family: var(--font-mono, monospace);
|
||||
}
|
||||
|
||||
.dashboard-metric-label {
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
/* ── Graph Editor ─────────────────────────────────────── */
|
||||
|
||||
/* Full viewport: hide footer & scroll-to-top when graph is active */
|
||||
#tab-graph {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Hide the global scrollbar when graph tab is active */
|
||||
html:has(#tab-graph.active) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tab-graph #graph-editor-content {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@@ -42,12 +51,66 @@
|
||||
margin-right: 2px;
|
||||
padding-right: 2px;
|
||||
letter-spacing: -1px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.graph-toolbar-drag:active {
|
||||
.graph-toolbar-drag:active,
|
||||
.graph-toolbar-drag.dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
/* Vertical toolbar (docked to left/right side) */
|
||||
.graph-toolbar.vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.graph-toolbar.vertical .graph-toolbar-drag {
|
||||
width: auto;
|
||||
height: 16px;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
margin-right: 0;
|
||||
margin-bottom: 2px;
|
||||
padding-right: 0;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.graph-toolbar.vertical .graph-toolbar-sep {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.graph-toolbar.vertical .graph-zoom-label {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Dock position indicators during toolbar drag */
|
||||
.graph-dock-indicators {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
z-index: 19;
|
||||
}
|
||||
|
||||
.graph-dock-dot {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-left: -5px;
|
||||
margin-top: -5px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-muted);
|
||||
opacity: 0.25;
|
||||
transition: opacity 0.15s, transform 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.graph-dock-dot.nearest {
|
||||
opacity: 1;
|
||||
background: var(--primary-color);
|
||||
transform: scale(1.6);
|
||||
box-shadow: 0 0 8px var(--primary-color);
|
||||
}
|
||||
|
||||
.graph-toolbar .btn-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
@@ -72,6 +135,12 @@
|
||||
color: var(--primary-contrast);
|
||||
}
|
||||
|
||||
.graph-toolbar .btn-icon:disabled {
|
||||
opacity: 0.25;
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.graph-toolbar-sep {
|
||||
width: 1px;
|
||||
background: var(--border-color);
|
||||
@@ -361,11 +430,38 @@
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.graph-node:hover .graph-port {
|
||||
.graph-node:hover .graph-port,
|
||||
.graph-node.selected .graph-port {
|
||||
r: 5;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Larger touch targets for ports on touch devices */
|
||||
@media (pointer: coarse) {
|
||||
.graph-port { r: 6; }
|
||||
.graph-node:hover .graph-port,
|
||||
.graph-node.selected .graph-port { r: 7; }
|
||||
}
|
||||
|
||||
/* Port labels — hidden by default, shown on node hover, positioned outside node */
|
||||
.graph-port-label {
|
||||
font-size: 9px;
|
||||
font-weight: 600;
|
||||
fill: var(--text-color);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
paint-order: stroke fill;
|
||||
stroke: var(--bg-color);
|
||||
stroke-width: 3px;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.graph-node:hover .graph-port-label,
|
||||
.graph-node.selected .graph-port-label {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Port output cursor: draggable */
|
||||
.graph-port-out {
|
||||
cursor: crosshair;
|
||||
@@ -441,18 +537,22 @@
|
||||
.graph-edge-scene { stroke: #CE93D8; color: #CE93D8; }
|
||||
.graph-edge-default { stroke: var(--text-muted); color: var(--text-muted); }
|
||||
|
||||
/* Animated flow dots on active edges */
|
||||
.graph-edge-flow {
|
||||
fill: none;
|
||||
stroke-width: 0;
|
||||
pointer-events: none;
|
||||
/* ── Active edge flow (hybrid: thicker + saturated + animated dash) ── */
|
||||
|
||||
.graph-edge.graph-edge-active {
|
||||
opacity: 1;
|
||||
stroke-width: 2.5;
|
||||
filter: drop-shadow(0 0 3px currentColor);
|
||||
}
|
||||
|
||||
.graph-edge-flow circle {
|
||||
r: 3;
|
||||
opacity: 0.85;
|
||||
filter: drop-shadow(0 0 2px currentColor);
|
||||
}
|
||||
/* Clear dash patterns on active edges so glow looks clean */
|
||||
.graph-edge-clock.graph-edge-active,
|
||||
.graph-edge-template.graph-edge-active { stroke-dasharray: none; }
|
||||
.graph-edge-nested.graph-edge-active { stroke-dasharray: none; }
|
||||
|
||||
/* Flow dots on active edges */
|
||||
.graph-edge-flow { pointer-events: none; }
|
||||
.graph-edge-flow circle { filter: drop-shadow(0 0 2px currentColor); }
|
||||
|
||||
/* ── Drag connection preview ── */
|
||||
|
||||
@@ -513,7 +613,8 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.graph-node:hover .graph-node-overlay {
|
||||
.graph-node:hover .graph-node-overlay,
|
||||
.graph-node.selected .graph-node-overlay {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -727,11 +828,8 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.graph-filter-pills {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.graph-filter-actions {
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.graph-filter-pill {
|
||||
@@ -757,11 +855,116 @@
|
||||
border-color: var(--pill-color, var(--primary-color));
|
||||
}
|
||||
|
||||
.graph-filter-sep {
|
||||
width: 1px;
|
||||
height: 16px;
|
||||
background: var(--border-color);
|
||||
margin: 0 2px;
|
||||
/* ── Types button + popover ── */
|
||||
|
||||
.graph-filter-types-btn {
|
||||
background: transparent;
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--text-muted);
|
||||
border-radius: 12px;
|
||||
padding: 2px 10px;
|
||||
font-size: 0.7rem;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
||||
line-height: 1.4;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.graph-filter-types-btn:hover {
|
||||
border-color: var(--primary-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.graph-filter-types-badge {
|
||||
display: none;
|
||||
background: var(--primary-color);
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
font-size: 0.6rem;
|
||||
font-weight: 700;
|
||||
min-width: 14px;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
text-align: center;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.graph-filter-types-badge.visible {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.graph-filter-types-popover {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
background: var(--bg-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
max-height: 320px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.graph-filter-types-popover.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.graph-filter-type-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
.graph-filter-type-group-header {
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-muted);
|
||||
padding: 2px 4px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.graph-filter-type-group-header:hover {
|
||||
background: var(--hover-bg, rgba(255,255,255,0.05));
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.graph-filter-type-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 3px 4px 3px 8px;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.graph-filter-type-item:hover {
|
||||
background: var(--hover-bg, rgba(255,255,255,0.05));
|
||||
}
|
||||
|
||||
.graph-filter-type-item input[type="checkbox"] {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
accent-color: var(--primary-color);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.graph-filter-type-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.graph-filter-icon {
|
||||
@@ -895,3 +1098,77 @@
|
||||
z-index: 50;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* ── Keyboard shortcuts help panel ── */
|
||||
|
||||
.graph-help-panel {
|
||||
position: absolute;
|
||||
z-index: 30;
|
||||
background: var(--bg-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.2);
|
||||
width: 300px;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.graph-help-panel.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.graph-help-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 12px;
|
||||
font-weight: 600;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.graph-help-body {
|
||||
padding: 8px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
max-height: 360px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.graph-help-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.graph-help-row kbd,
|
||||
.graph-help-row .graph-help-mouse {
|
||||
min-width: 80px;
|
||||
text-align: right;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.graph-help-row kbd {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
padding: 1px 5px;
|
||||
font-size: 0.7rem;
|
||||
font-family: var(--font-mono, monospace);
|
||||
}
|
||||
|
||||
.graph-help-row .graph-help-mouse {
|
||||
color: var(--text-muted);
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.graph-help-row span:last-child {
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.graph-help-sep {
|
||||
height: 1px;
|
||||
background: var(--border-color);
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user