Repository navigation
feat(appearance): make workspace split divider color configurable #14893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0a014d3
9fb7b6b
f4100c0
0e89ca2
b74fa82
367d0e8
0503364
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,9 +255,11 @@ | |
| --markdown-search-match-active: #fb923c; | ||
| /* Why: tab-group splits use a dedicated divider — `--border` is too faint on | ||
| card/editor surfaces when panes are side-by-side or stacked. Default must | ||
| meet >=3:1 against `--card`, not only the hover/drag strong state. */ | ||
| meet >=3:1 against `--card`, not only the hover/drag strong state. | ||
| Settings can override --tab-group-split-divider; hover/drag stays a | ||
| stronger mix of that color so a custom value still has a drag affordance. */ | ||
| --tab-group-split-divider: #868690; | ||
| --tab-group-split-divider-strong: #71717a; | ||
| --tab-group-split-divider-strong: color-mix(in srgb, var(--tab-group-split-divider) 82%, #000000); | ||
| } | ||
|
|
||
| /* ── Dark Mode ───────────────────────────────────────── */ | ||
|
|
@@ -374,7 +376,7 @@ | |
| --markdown-search-match-active: #fb923c; | ||
| /* Brighter than terminal defaults so the always-visible line clears 3:1 on `--card`. */ | ||
| --tab-group-split-divider: #71717a; | ||
| --tab-group-split-divider-strong: #a1a1aa; | ||
| --tab-group-split-divider-strong: color-mix(in srgb, var(--tab-group-split-divider) 70%, #ffffff); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in Actual Electron before/after coverage checks both orientations and six theme/color combinations through idle, hover, pointer drag, release and drag-without-hover: 60 paired color/geometry samples preserve every value except active thickness. Parent reran 96 focused tests, four freshly rebuilt hidden Electron tests, full |
||
| } | ||
|
|
||
| .plugin-security-chrome { | ||
|
|
@@ -819,6 +821,17 @@ html.native-shell .app-layout { | |
| background: var(--tab-group-split-divider-strong); | ||
| } | ||
|
|
||
| /* Extreme custom colors can match their strong mix, so thickness also signals interaction. */ | ||
| .tab-group-split-resize-handle.is-vertical:hover::after, | ||
| .tab-group-split-resize-handle.is-vertical.is-dragging::after { | ||
| width: 4px; | ||
| } | ||
|
|
||
| .tab-group-split-resize-handle.is-horizontal:hover::after, | ||
| .tab-group-split-resize-handle.is-horizontal.is-dragging::after { | ||
| height: 4px; | ||
| } | ||
|
|
||
| /* ── Titlebar ────────────────────────────────────────── */ | ||
|
|
||
| /* Why: Radix portals (dropdowns, popovers, dialogs, sheets) render at the | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| import type React from 'react' | ||
| import type { GlobalSettings } from '../../../../shared/global-settings-types' | ||
| import { | ||
| DEFAULT_TAB_GROUP_SPLIT_DIVIDER_DARK, | ||
| DEFAULT_TAB_GROUP_SPLIT_DIVIDER_LIGHT | ||
| } from '../../../../shared/tab-group-split-divider' | ||
| import { ColorField } from './SettingsFormControls' | ||
| import { SearchableSetting } from './SearchableSetting' | ||
| import { getWorkspaceSplitDividerEntries } from './appearance-search' | ||
|
|
||
| export function AppearanceWorkspaceSplitDividerSettings({ | ||
| settings, | ||
| updateSettings, | ||
| forceVisiblePrimary = false | ||
| }: { | ||
| settings: GlobalSettings | ||
| updateSettings: (updates: Partial<GlobalSettings>) => void | ||
| forceVisiblePrimary?: boolean | ||
| }): React.JSX.Element { | ||
| const [darkEntry, lightEntry] = getWorkspaceSplitDividerEntries() | ||
|
|
||
| return ( | ||
| <> | ||
| <SearchableSetting | ||
| title={darkEntry.title} | ||
| description={darkEntry.description} | ||
| keywords={darkEntry.keywords} | ||
| forceVisible={forceVisiblePrimary} | ||
| > | ||
| <ColorField | ||
| label={darkEntry.title} | ||
| description={darkEntry.description ?? ''} | ||
| value={settings.tabGroupSplitDividerColorDark} | ||
| fallback={DEFAULT_TAB_GROUP_SPLIT_DIVIDER_DARK} | ||
| onChange={(value) => updateSettings({ tabGroupSplitDividerColorDark: value })} | ||
| /> | ||
| </SearchableSetting> | ||
| <SearchableSetting | ||
| title={lightEntry.title} | ||
| description={lightEntry.description} | ||
| keywords={lightEntry.keywords} | ||
| forceVisible={forceVisiblePrimary} | ||
| > | ||
| <ColorField | ||
| label={lightEntry.title} | ||
| description={lightEntry.description ?? ''} | ||
| value={settings.tabGroupSplitDividerColorLight} | ||
| fallback={DEFAULT_TAB_GROUP_SPLIT_DIVIDER_LIGHT} | ||
| onChange={(value) => updateSettings({ tabGroupSplitDividerColorLight: value })} | ||
| /> | ||
| </SearchableSetting> | ||
| </> | ||
| ) | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.