From 94dbe3725f61a30f17eadbfe80130c24a51c84a7 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sun, 26 Jul 2026 13:24:44 +0800 Subject: [PATCH] fix(editor): reduce completion popup corner radius --- apps/desktop/src/lib/__tests__/editorThemes.spec.ts | 5 +++-- apps/desktop/src/lib/editor/editorThemes.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/lib/__tests__/editorThemes.spec.ts b/apps/desktop/src/lib/__tests__/editorThemes.spec.ts index 80d0b1a050..4861988ea4 100644 --- a/apps/desktop/src/lib/__tests__/editorThemes.spec.ts +++ b/apps/desktop/src/lib/__tests__/editorThemes.spec.ts @@ -45,9 +45,10 @@ describe("resolveEditorTheme", () => { }); describe("SQL completion theme", () => { - it("uses the configurable large radius for the popup container", () => { + it("uses the configurable medium radius for the popup container", () => { const rules = buildSqlCompletionThemeRules(); - expect(rules[".cm-tooltip.cm-tooltip-autocomplete"]).toMatchObject({ borderRadius: "var(--dbx-radius-lg)" }); + expect(rules[".cm-tooltip.cm-tooltip-autocomplete"]).toMatchObject({ borderRadius: "var(--dbx-radius-md)" }); + expect(rules[".cm-tooltip.cm-tooltip-autocomplete > ul > li"]).toMatchObject({ borderRadius: "var(--dbx-radius-sm)" }); }); }); diff --git a/apps/desktop/src/lib/editor/editorThemes.ts b/apps/desktop/src/lib/editor/editorThemes.ts index 26cf7006ac..a756f449d5 100644 --- a/apps/desktop/src/lib/editor/editorThemes.ts +++ b/apps/desktop/src/lib/editor/editorThemes.ts @@ -869,7 +869,7 @@ export function buildSqlCompletionThemeRules(): CodeMirrorStyleSpec { background: "var(--popover)", backgroundClip: "padding-box", border: colorMixValue("1px solid var(--border)", "1px solid color-mix(in oklch, var(--border) 82%, var(--foreground) 18%)"), - borderRadius: "var(--dbx-radius-lg)", + borderRadius: "var(--dbx-radius-md)", boxShadow: "0 8px 18px rgb(0 0 0 / 0.14)", color: "var(--popover-foreground)", fontFamily: `var(${EDITOR_FONT_FAMILY_CSS_VAR}, var(--font-mono, monospace))`, @@ -898,7 +898,7 @@ export function buildSqlCompletionThemeRules(): CodeMirrorStyleSpec { }, ".cm-tooltip.cm-tooltip-autocomplete > ul > li": { alignItems: "center", - borderRadius: "var(--dbx-radius-fixed-6)", + borderRadius: "var(--dbx-radius-sm)", color: "var(--popover-foreground)", display: "flex", fontSize: `clamp(12px, var(${EDITOR_FONT_SIZE_CSS_VAR}, 13px), 14px)`,