Skip to content

Commit 8a8b807

Browse files
committed
fix(web): simplify diff palette preview and size its dropdown
1 parent 3b63d23 commit 8a8b807

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/web/src/components/settings/SettingsFontPreviews.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const EMPTY_TERMINAL_CONTEXTS: ReadonlyArray<never> = [];
2323
const EMPTY_SKILLS: ReadonlyArray<never> = [];
2424

2525
const colorPreviewPatch = getRenderablePatch(
26-
"diff --git a/greeting.ts b/greeting.ts\n--- a/greeting.ts\n+++ b/greeting.ts\n@@ -1 +1 @@\n-const hello = 'Hi';\n+const hello = 'Hello';\n",
26+
"diff --git a/greeting.ts b/greeting.ts\n--- a/greeting.ts\n+++ b/greeting.ts\n@@ -1 +1 @@\n-\n+\n",
2727
"diff-colors-preview",
2828
);
2929
const colorPreviewItems =
@@ -42,7 +42,7 @@ export function DiffColorsPreview() {
4242
<StyledDiffCodeView
4343
aria-label="Diff color preview"
4444
// This two-row sample stays still; CodeView's sticky offsets otherwise clip the last row.
45-
className="h-10 w-full overflow-hidden rounded-md ring-1 ring-border/60 [--diffs-gap-block:0px] [&_div:has(>diffs-container)]:static!"
45+
className="h-10 w-full min-w-0 overflow-hidden rounded-md ring-1 ring-border/60 [--diffs-gap-block:0px] [&_div:has(>diffs-container)]:static!"
4646
items={colorPreviewItems}
4747
options={{
4848
diffStyle: "unified",

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ export function AppearanceSettingsPanel() {
12761276
updateSettings({ diffColorScheme: value });
12771277
}}
12781278
>
1279-
<SelectTrigger size="sm" className="w-full" aria-label="Diff colors">
1279+
<SelectTrigger size="sm" className="w-fit min-w-0" aria-label="Diff colors">
12801280
<SelectValue>
12811281
{settings.diffColorScheme === "blue-orange" ? "Blue & orange" : "Red & green"}
12821282
</SelectValue>

0 commit comments

Comments
 (0)