Agent Zero AI framework
Refine right canvas rail controls
Alessandroe92e518ab258
diff --git a/plugins/_diff_viewer/webui/diff-viewer-panel.html b/plugins/_diff_viewer/webui/diff-viewer-panel.htmlindex bb510748b..83e4d6a2f 100644--- a/plugins/_diff_viewer/webui/diff-viewer-panel.html+++ b/plugins/_diff_viewer/webui/diff-viewer-panel.html@@ -210,7 +210,7 @@align-items: center;gap: 6px;min-height: 44px;- padding: 7px 9px;+ padding: var(--spacing-xs) var(--spacing-md);border-bottom: 1px solid color-mix(in srgb, var(--color-border) 66%, transparent);background: color-mix(in srgb, var(--color-background) 92%, #000 8%);}diff --git a/webui/components/canvas/right-canvas-store.js b/webui/components/canvas/right-canvas-store.jsindex 400a5e012..92453b3de 100644--- a/webui/components/canvas/right-canvas-store.js+++ b/webui/components/canvas/right-canvas-store.js@@ -175,6 +175,14 @@ const model = {return await this.open(targetId, payload);},+ async toggleCanvas() {+ if (this.isOpen) {+ await this.close();+ return false;+ }+ return await this.open(this.activeSurfaceId || this.surfaces[0]?.id || "");+ },+setWidth(px, options = {}) {const { persist = true } = options;const max = this.maxWidth();diff --git a/webui/components/canvas/right-canvas.css b/webui/components/canvas/right-canvas.cssindex 436a4cd06..ae7e4f6b6 100644--- a/webui/components/canvas/right-canvas.css+++ b/webui/components/canvas/right-canvas.css@@ -39,14 +39,30 @@ body.right-canvas-resizing {}.right-canvas-rail {+ position: absolute;+ top: 50%;+ right: 100%;+ z-index: 4;display: flex;flex: 0 0 52px;flex-direction: column;align-items: center;gap: 7px;+ height: auto;+ max-height: min(70vh, calc(100vh - 32px));padding: 10px 7px;- border-right: 1px solid var(--right-canvas-border);- background: color-mix(in srgb, var(--color-background) 92%, #000 8%);+ transform: translateY(-50%);+ border-right: 0;+ border-radius: 8px 0 0 8px;+ box-shadow: -10px 0 30px rgba(0, 0, 0, 0.24);+ background: var(--color-chat-background);+}++.right-canvas-rail-separator {+ width: 24px;+ height: 1px;+ margin: 1px 0 3px;+ background: color-mix(in srgb, var(--right-canvas-border) 76%, transparent);}.right-canvas.is-closed {@@ -57,25 +73,15 @@ body.right-canvas-resizing {background: transparent;}+.right-canvas.is-open {+ overflow: visible;+}+.right-canvas.is-closed .right-canvas-shell,.right-canvas.is-closed .right-canvas-resize-handle {display: none;}-.right-canvas.is-closed .right-canvas-rail {- position: absolute;- top: 50%;- right: 100%;- z-index: 2;- height: auto;- max-height: min(70vh, calc(100vh - 32px));- transform: translateY(-50%);- border: 1px solid var(--right-canvas-border);- border-right: 0;- border-radius: 8px 0 0 8px;- box-shadow: -10px 0 30px rgba(0, 0, 0, 0.24);-}-.right-canvas-rail-button,.right-canvas-icon-button,.right-canvas-tab {@@ -102,6 +108,10 @@ body.right-canvas-resizing {transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;}+.right-canvas-toggle-button {+ color: color-mix(in srgb, var(--color-primary) 70%, var(--color-text));+}+.right-canvas-rail-button:hover,.right-canvas-icon-button:hover,.right-canvas-rail-button.is-active {diff --git a/webui/components/canvas/right-canvas.html b/webui/components/canvas/right-canvas.htmlindex fa8340643..9ba07fb8d 100644--- a/webui/components/canvas/right-canvas.html+++ b/webui/components/canvas/right-canvas.html@@ -24,6 +24,20 @@<div class="right-canvas-resize-handle" title="Resize canvas" @pointerdown="$store.rightCanvas.startResize($event)"></div><nav class="right-canvas-rail" aria-label="Canvas surfaces">+ <button+ type="button"+ class="right-canvas-rail-button right-canvas-toggle-button"+ :class="{ 'is-active': $store.rightCanvas.isOpen }"+ :title="$store.rightCanvas.isOpen ? 'Hide canvas' : 'Show canvas'"+ :aria-label="$store.rightCanvas.isOpen ? 'Hide canvas' : 'Show canvas'"+ :aria-pressed="$store.rightCanvas.isOpen.toString()"+ @click="$store.rightCanvas.toggleCanvas()"+ >+ <span class="material-symbols-outlined">dock_to_right</span>+ </button>++ <div class="right-canvas-rail-separator" aria-hidden="true"></div>+<template x-for="surface in $store.rightCanvas.surfaces" :key="surface.id"><buttontype="button"@@ -31,7 +45,7 @@:class="{ 'is-active': $store.rightCanvas.isSurfaceActive(surface.id) && $store.rightCanvas.isOpen }":title="surface.title":aria-label="surface.title"- @click="$store.rightCanvas.toggle(surface.id)"+ @click="$store.rightCanvas.open(surface.id)"><span class="material-symbols-outlined" x-text="surface.icon"></span></button>@@ -73,15 +87,6 @@><span class="material-symbols-outlined">open_in_new</span></button>- <button- type="button"- class="right-canvas-icon-button"- title="Close canvas"- aria-label="Close canvas"- @click="$store.rightCanvas.close()"- >- <span class="material-symbols-outlined">close</span>- </button><x-extension id="right-canvas-toolbar-end"></x-extension></div></header>