From 137f3c978b9b50d626e6619cf778ebf69f0cdf4e Mon Sep 17 00:00:00 2001 From: brennanb2025 Date: Fri, 12 Jun 2026 13:59:44 -0700 Subject: [PATCH] Remove soft contrast sidebar mode Co-authored-by: Orca --- .../settings/LeftSidebarAppearanceSetting.tsx | 7 ------- .../settings/appearance-sidebar-search.ts | 4 ---- src/renderer/src/i18n/locales/en.json | 1 - src/renderer/src/i18n/locales/es.json | 1 - src/renderer/src/i18n/locales/ja.json | 1 - src/renderer/src/i18n/locales/ko.json | 1 - src/renderer/src/i18n/locales/zh.json | 1 - .../src/lib/left-sidebar-appearance.test.ts | 13 ------------- src/renderer/src/lib/left-sidebar-appearance.ts | 7 ------- src/shared/left-sidebar-appearance.ts | 7 +------ src/shared/types.ts | 2 +- 11 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx b/src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx index 08e5de14a14..bf4cb1a81b7 100644 --- a/src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx +++ b/src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx @@ -58,13 +58,6 @@ export function LeftSidebarAppearanceSetting({ 'Match Terminal' ) }, - { - value: 'soft-contrast', - label: translate( - 'auto.components.settings.AppearancePane.leftSidebarAppearance.softContrast', - 'Soft Contrast' - ) - }, { value: 'tinted', label: translate( diff --git a/src/renderer/src/components/settings/appearance-sidebar-search.ts b/src/renderer/src/components/settings/appearance-sidebar-search.ts index c462a0fa7e2..30a81bbc43e 100644 --- a/src/renderer/src/components/settings/appearance-sidebar-search.ts +++ b/src/renderer/src/components/settings/appearance-sidebar-search.ts @@ -30,10 +30,6 @@ export const getLeftSidebarAppearanceEntry = createLocalizedCatalog( ...translateSearchKeyword( 'auto.components.settings.appearance.search.leftSidebarAppearance.tint', 'tint' - ), - ...translateSearchKeyword( - 'auto.components.settings.appearance.search.leftSidebarAppearance.contrast', - 'contrast' ) ] }) diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index fe500a2b2b4..24d599c4e6b 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -4184,7 +4184,6 @@ "rowDescription": "Make the left sidebar match your terminal, stay default, or use a tint.", "default": "Default", "matchTerminal": "Match Terminal", - "softContrast": "Soft Contrast", "tinted": "Tinted", "tintColor": "Sidebar Tint", "tintColorDescription": "The color mixed into the left sidebar surface.", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index d7be7dac2b3..b6e3e2f89cc 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -4184,7 +4184,6 @@ "rowDescription": "Haz que la barra lateral izquierda coincida con tu terminal, conserve el valor predeterminado o use un tinte.", "default": "Predeterminado", "matchTerminal": "Coincidir con terminal", - "softContrast": "Contraste suave", "tinted": "Con tinte", "tintColor": "Tinte de la barra lateral", "tintColorDescription": "El color que se mezcla en la superficie de la barra lateral izquierda.", diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index d7e00864781..527360bed48 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -4169,7 +4169,6 @@ "rowDescription": "左サイドバーをターミナルに合わせるか、既定のままにするか、色合いを加えます。", "default": "デフォルト", "matchTerminal": "ターミナルに合わせる", - "softContrast": "ソフトコントラスト", "tinted": "色合い", "tintColor": "サイドバーの色合い", "tintColorDescription": "左サイドバーの表面に混ぜる色です。", diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 794f238befc..5b3c6ae7f08 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -4169,7 +4169,6 @@ "rowDescription": "왼쪽 사이드바를 터미널에 맞추거나 기본값을 유지하거나 은은한 색조를 적용합니다.", "default": "기본값", "matchTerminal": "터미널에 맞춤", - "softContrast": "부드러운 대비", "tinted": "색조 적용", "tintColor": "사이드바 색조", "tintColorDescription": "왼쪽 사이드바 표면에 섞을 색상입니다.", diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index 0e0d2f13022..fce46f30c62 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -4169,7 +4169,6 @@ "rowDescription": "让左侧边栏匹配终端、保持默认,或使用色调。", "default": "默认", "matchTerminal": "匹配终端", - "softContrast": "柔和对比", "tinted": "色调", "tintColor": "边栏色调", "tintColorDescription": "混入左侧边栏表面的颜色。", diff --git a/src/renderer/src/lib/left-sidebar-appearance.test.ts b/src/renderer/src/lib/left-sidebar-appearance.test.ts index 4e47b55b3a6..fab316ff3c5 100644 --- a/src/renderer/src/lib/left-sidebar-appearance.test.ts +++ b/src/renderer/src/lib/left-sidebar-appearance.test.ts @@ -81,17 +81,4 @@ describe('resolveLeftSidebarStyleVariables', () => { expect(vars?.['--worktree-sidebar']).toBe('color-mix(in srgb, #000000 35%, var(--background))') }) - - it('uses the soft contrast token recipe without overriding app text tokens', () => { - const vars = resolveLeftSidebarStyleVariables( - settings({ leftSidebarAppearanceMode: 'soft-contrast' }), - true - ) - - expect(vars?.['--worktree-sidebar']).toBe( - 'color-mix(in srgb, var(--background) 96%, var(--foreground) 4%)' - ) - expect(vars?.['--sidebar']).toBe(vars?.['--worktree-sidebar']) - expect(vars?.['--foreground']).toBeUndefined() - }) }) diff --git a/src/renderer/src/lib/left-sidebar-appearance.ts b/src/renderer/src/lib/left-sidebar-appearance.ts index 4fee2febe3d..e9e13f6984e 100644 --- a/src/renderer/src/lib/left-sidebar-appearance.ts +++ b/src/renderer/src/lib/left-sidebar-appearance.ts @@ -110,11 +110,6 @@ function resolveTintedSurfaceVariables( return buildSurfaceVariables({ background, foreground: 'var(--foreground)' }) } -function resolveSoftContrastSurfaceVariables(): LeftSidebarStyleVariables { - const background = 'color-mix(in srgb, var(--background) 96%, var(--foreground) 4%)' - return buildSurfaceVariables({ background, foreground: 'var(--foreground)' }) -} - export function resolveLeftSidebarStyleVariables( settings: LeftSidebarAppearanceSettings | null | undefined, systemPrefersDark: boolean @@ -129,7 +124,5 @@ export function resolveLeftSidebarStyleVariables( return resolveTerminalSurfaceVariables(settings, systemPrefersDark) case 'tinted': return resolveTintedSurfaceVariables(settings) - case 'soft-contrast': - return resolveSoftContrastSurfaceVariables() } } diff --git a/src/shared/left-sidebar-appearance.ts b/src/shared/left-sidebar-appearance.ts index 9123d2310aa..bb77476ba36 100644 --- a/src/shared/left-sidebar-appearance.ts +++ b/src/shared/left-sidebar-appearance.ts @@ -1,12 +1,7 @@ import { HEX_COLOR_RE } from './color-validation' import type { LeftSidebarAppearanceMode } from './types' -export const LEFT_SIDEBAR_APPEARANCE_MODES = [ - 'default', - 'match-terminal', - 'tinted', - 'soft-contrast' -] as const +export const LEFT_SIDEBAR_APPEARANCE_MODES = ['default', 'match-terminal', 'tinted'] as const export const DEFAULT_LEFT_SIDEBAR_TINT_COLOR = '#18181b' export const DEFAULT_LEFT_SIDEBAR_TINT_OPACITY = 0.08 diff --git a/src/shared/types.ts b/src/shared/types.ts index 0355276a283..d7424269b8a 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -2042,7 +2042,7 @@ export type OpenInApplication = { export type SourceControlViewMode = 'list' | 'tree' -export type LeftSidebarAppearanceMode = 'default' | 'match-terminal' | 'tinted' | 'soft-contrast' +export type LeftSidebarAppearanceMode = 'default' | 'match-terminal' | 'tinted' export type FloatingTerminalCwdRequest = { path?: string