From 619f8a6d8a3b6440381b09fbb160ee21041c4033 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Wed, 4 Nov 2026 10:53:40 -0800 Subject: [PATCH 1/2] refactor(design-system): own Void in Desktop on the package baseline DrJKL asked that the package hold one shared baseline and that Desktop keep only the values that differ. Desktop's look now lives in design-system-theme.css on top of @comfyorg/design-system/css/baseline.css. The baseline maps package colors to --accent, --border and --warning, so: - Desktop's white highlight moves to --action, since --accent is now the package's hover fill. - --border holds Void's value directly to avoid a variable cycle. - --warning takes Void's amber, so legacy warnings match package warnings. The rename touches the frozen gs-field-flash keyframes, so they move into the theme and that style block and its exception go away. --- scripts/eslint/vue-style-exceptions.json | 4 - .../src/assets/design-system-theme.css | 97 ++++++++++++++++++- src/renderer/src/assets/main.css | 9 +- .../src/comfyTitleBar/TitleBarApp.vue | 2 +- .../src/comfyTitlePopup/DownloadsFullView.vue | 8 +- .../comfyTitlePopup/GlobalSettingsView.vue | 17 +--- .../globalSettings/ModelsDirList.vue | 2 +- .../globalSettings/UpdatesSection.vue | 8 +- src/renderer/src/components/DetailSection.vue | 2 +- .../src/components/ImportPreviewModal.vue | 2 +- src/renderer/src/components/InfoTooltip.vue | 4 +- .../src/components/MigrationBanner.vue | 2 +- src/renderer/src/components/ModalDialog.vue | 6 +- src/renderer/src/components/ProgressStep.vue | 6 +- src/renderer/src/components/RestoreModal.vue | 2 +- .../components/SnapshotFilePreviewContent.vue | 2 +- .../src/components/SnapshotInspector.vue | 8 +- src/renderer/src/components/SnapshotTab.vue | 16 +-- src/renderer/src/components/TakeoverBack.vue | 2 +- .../src/components/VariantCardGrid.vue | 2 +- src/renderer/src/components/ui/BaseAlert.vue | 2 +- src/renderer/src/components/ui/BasePrompt.vue | 2 +- src/renderer/src/panel/ComfyLifecycleView.vue | 2 +- src/renderer/src/views/BenchmarksView.vue | 4 +- src/renderer/src/views/DetailModal.vue | 8 +- src/renderer/src/views/InstallWizardModal.vue | 2 +- src/renderer/src/views/LoadSnapshotModal.vue | 8 +- .../src/views/PerformanceTestView.vue | 2 +- src/renderer/src/views/QuickInstallModal.vue | 4 +- src/renderer/src/views/TrackModal.vue | 2 +- .../src/views/chooser/chooserTileClasses.ts | 2 +- .../views/comfyUISettings/ArgsBuilderPage.vue | 6 +- .../views/comfyUISettings/ChannelPicker.vue | 2 +- .../comfyUISettings/ConsoleTerminalPane.vue | 2 +- .../comfyUISettings/ExtraModelPathsModal.vue | 4 +- .../comfyUISettings/SettingsSectionList.vue | 4 +- .../views/comfyUISettings/StatusFactPanel.vue | 2 +- .../views/comfyUISettings/StorageDirRow.vue | 2 +- .../src/views/comfyUISettings/StoragePane.vue | 2 +- .../comfyUISettings/VersionStatPanel.vue | 8 +- 40 files changed, 171 insertions(+), 100 deletions(-) diff --git a/scripts/eslint/vue-style-exceptions.json b/scripts/eslint/vue-style-exceptions.json index 368589a47..2b6c8e6df 100644 --- a/scripts/eslint/vue-style-exceptions.json +++ b/scripts/eslint/vue-style-exceptions.json @@ -19,10 +19,6 @@ "reason": "Preserve the existing progress-indeterminate animation.", "sha256": "e91753e5d6e18052239d26f3b792cc6d6b5c2d7b821f23dd9a7db268f45069fe" }, - "src/renderer/src/comfyTitlePopup/GlobalSettingsView.vue": { - "reason": "Preserve the existing gs-field-flash animation.", - "sha256": "2392a694212241a269657df9855b32b7f47d953589073fc88650a2fa2661a702" - }, "src/renderer/src/components/settings/ComfyUISettingsContent.vue": { "reason": "Preserve the existing op-bar-slide animation.", "sha256": "bf5b6da0902a0e0c96c922e7b8a545307b3de39bfb8c0bdec401311ae42b2cd0" diff --git a/src/renderer/src/assets/design-system-theme.css b/src/renderer/src/assets/design-system-theme.css index 0493472da..2e107a6c1 100644 --- a/src/renderer/src/assets/design-system-theme.css +++ b/src/renderer/src/assets/design-system-theme.css @@ -1,18 +1,107 @@ /* - * Desktop's look is the Void theme from @comfyorg/design-system, with a white - * primary accent matching Desktop's monochrome controls and actions. + * Desktop's look is Void: the @comfyorg/design-system baseline, the values that + * differ from it, and Desktop's own type, radius, shadow and motion tokens. */ -@import '@comfyorg/design-system/css/themes/void.css'; +@import '@comfyorg/design-system/css/baseline.css'; + +:root { + --background: oklch(0.19 0.003 285); + --foreground: oklch(0.955 0.002 285); + --card: oklch(0.23 0.008 285); + --popover: oklch(0.23 0.008 285); + --primary: var(--foreground); + --secondary: oklch(1 0 0 / 0.06); + --muted: oklch(1 0 0 / 0.06); + --muted-foreground: oklch(0.76 0.006 285); + --accent: oklch(1 0 0 / 0.1); + --input: oklch(1 0 0 / 0.06); + --ring: oklch(1 0 0 / 0.45); + --destructive: oklch(0.62 0.19 25); +} @theme static { - --color-primary: var(--color-foreground); + --font-sans: 'Inter', system-ui, sans-serif; + --font-display: 'PP Formula', 'Inter', system-ui, sans-serif; + --color-success: oklch(0.78 0.15 155); + --color-content-background: oklch(0.14 0.005 285); + --color-card-hover: oklch(0.265 0.009 285); + --color-subtle-foreground: oklch(0.6 0.008 285); + --color-border-strong: oklch(1 0 0 / 0.14); + --color-media-overlay: oklch(0 0 0 / 0.55); --color-snapshot-chip: #202020; --color-snapshot-ring: #262729; + --text-ui: 13px; + --text-ui--line-height: 20px; + --text-heading: 16px; + --text-heading--line-height: 24px; + --text-title: 22px; + --text-title--line-height: 28px; + --text-display: 34px; + --text-display--line-height: 40px; + + --radius-panel: 16px; + --radius-card: 12px; + --radius-control: 8px; + --radius-min: 4px; + + --shadow-elev: + inset 0 1px 0 oklch(1 0 0 / 0.07), 0 1px 2px oklch(0 0 0 / 0.35), 0 6px 18px oklch(0 0 0 / 0.28); + --shadow-elev-hover: + inset 0 1px 0 oklch(1 0 0 / 0.09), 0 2px 4px oklch(0 0 0 / 0.35), + 0 10px 26px oklch(0 0 0 / 0.34); + --shadow-popover: inset 0 1px 0 oklch(1 0 0 / 0.07), 0 12px 32px oklch(0 0 0 / 0.45); + --shadow-highlight: inset 0 1px 0 oklch(1 0 0 / 0.06); + + --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); + --animate-pop-in: pop-in 160ms var(--ease-out-expo); + --animate-fade-in: fade-in 160ms ease-out; + --animate-status-pulse: status-pulse 2s ease-out infinite; + --animate-shimmer: shimmer 1.6s ease-in-out infinite; --animate-brand-takeover: brand-takeover-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both; + --animate-gs-field-flash: gs-field-flash 2.2s ease-out; + @keyframes pop-in { + from { + opacity: 0; + transform: translateY(4px) scale(0.98); + } + } + @keyframes fade-in { + from { + opacity: 0; + } + } + @keyframes status-pulse { + 0% { + box-shadow: 0 0 0 0 color-mix(in oklch, currentColor 55%, transparent); + } + 70%, + 100% { + box-shadow: 0 0 0 5px transparent; + } + } + @keyframes shimmer { + from { + background-position: 150% 0; + } + to { + background-position: -50% 0; + } + } + @keyframes gs-field-flash { + 0%, + 55% { + box-shadow: 0 0 0 2px var(--action); + background: color-mix(in srgb, var(--action) 12%, transparent); + } + 100% { + box-shadow: 0 0 0 2px transparent; + background: transparent; + } + } @keyframes brand-takeover-in { from { opacity: 0; diff --git a/src/renderer/src/assets/main.css b/src/renderer/src/assets/main.css index 717cd8410..fcb3e8a6c 100644 --- a/src/renderer/src/assets/main.css +++ b/src/renderer/src/assets/main.css @@ -48,7 +48,7 @@ --text: #ffffff; --text-muted: #8a8a8a; --text-faint: #55565e; - --accent: #60a5fa; + --action: #60a5fa; --accent-hover: #93c5fd; --selected: rgba(255, 255, 255, 0.85); --surface: #29252c; @@ -149,7 +149,7 @@ --text: #202121; --text-muted: #a0a0a0; --text-faint: #b4b4b4; - --accent: #3b82f6; + --action: #3b82f6; --accent-hover: #2563eb; --selected: rgba(0, 0, 0, 0.7); --surface: #e9e9e9; @@ -268,7 +268,7 @@ --accent-label: var(--color-subtle-foreground); /* White accent: primary actions, selection, progress. */ - --accent: var(--color-foreground); + --action: var(--color-foreground); --accent-hover: oklch(0.995 0 0); --accent-primary: var(--color-foreground); --brand-accent: var(--color-foreground); @@ -276,11 +276,12 @@ --selected: oklch(1 0 0 / 0.85); --focus-ring: var(--color-ring); - --border: var(--color-border); + --border: oklch(1 0 0 / 0.08); --border-hover: var(--color-border-strong); --danger: var(--color-destructive); --danger-hover: oklch(0.68 0.19 25); + --warning: oklch(0.82 0.14 85); --success: var(--color-success); --semantic-danger: var(--color-destructive); --semantic-warning: var(--color-warning); diff --git a/src/renderer/src/comfyTitleBar/TitleBarApp.vue b/src/renderer/src/comfyTitleBar/TitleBarApp.vue index 20be39c72..b1879ee77 100644 --- a/src/renderer/src/comfyTitleBar/TitleBarApp.vue +++ b/src/renderer/src/comfyTitleBar/TitleBarApp.vue @@ -228,7 +228,7 @@ const titleInstallPillClass = [ ].join(' ') const titleDownloadsBadgeClass = - 'pointer-events-none absolute -top-1 -right-1 inline-flex h-3.5 min-w-3.5 items-center justify-center rounded-[999px] bg-[var(--accent,#60a5fa)] px-1 py-0 text-[9px] leading-none font-bold text-white tabular-nums [box-shadow:0_0_0_2px_var(--titlebar-bg-active,var(--titlebar-bg,var(--neutral-900)))] [.title-bar:not(.is-light)_&:not(.is-unseen,.is-error)]:text-background [&.is-unseen]:bg-[#22c55e] [&.is-error]:bg-[var(--danger)] [.title-downloads-tray.has-active_&]:animate-[title-downloads-pulse_1.6s_ease-in-out_infinite] [.title-downloads-tray.is-flashing_&]:[animation:title-downloads-flash_0.55s_cubic-bezier(0.2,0.9,0.3,1.4)_1,title-downloads-pulse_1.6s_ease-in-out_infinite_0.6s]' + 'pointer-events-none absolute -top-1 -right-1 inline-flex h-3.5 min-w-3.5 items-center justify-center rounded-[999px] bg-[var(--action,#60a5fa)] px-1 py-0 text-[9px] leading-none font-bold text-white tabular-nums [box-shadow:0_0_0_2px_var(--titlebar-bg-active,var(--titlebar-bg,var(--neutral-900)))] [.title-bar:not(.is-light)_&:not(.is-unseen,.is-error)]:text-background [&.is-unseen]:bg-[#22c55e] [&.is-error]:bg-[var(--danger)] [.title-downloads-tray.has-active_&]:animate-[title-downloads-pulse_1.6s_ease-in-out_infinite] [.title-downloads-tray.is-flashing_&]:[animation:title-downloads-flash_0.55s_cubic-bezier(0.2,0.9,0.3,1.4)_1,title-downloads-pulse_1.6s_ease-in-out_infinite_0.6s]' const isMac = ref(bridge?.isMac() ?? false) /** Active panel reported by main. */ diff --git a/src/renderer/src/comfyTitlePopup/DownloadsFullView.vue b/src/renderer/src/comfyTitlePopup/DownloadsFullView.vue index 8f13392c7..f2612af1a 100644 --- a/src/renderer/src/comfyTitlePopup/DownloadsFullView.vue +++ b/src/renderer/src/comfyTitlePopup/DownloadsFullView.vue @@ -271,7 +271,7 @@ const statusBadgeFor = computed {{ progressPercent(d) }}% diff --git a/src/renderer/src/comfyTitlePopup/GlobalSettingsView.vue b/src/renderer/src/comfyTitlePopup/GlobalSettingsView.vue index e22e278dc..07107b8f2 100644 --- a/src/renderer/src/comfyTitlePopup/GlobalSettingsView.vue +++ b/src/renderer/src/comfyTitlePopup/GlobalSettingsView.vue @@ -375,7 +375,7 @@ onMounted(() => {