25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(editor): pin completion icon glyph to its box
t8y2e98e3157f132
diff --git a/apps/desktop/src/lib/__tests__/editorThemes.spec.ts b/apps/desktop/src/lib/__tests__/editorThemes.spec.tsindex 6e1ca9e37f..cffac09a47 100644--- a/apps/desktop/src/lib/__tests__/editorThemes.spec.ts+++ b/apps/desktop/src/lib/__tests__/editorThemes.spec.ts@@ -172,6 +172,23 @@ describe("SQL completion theme", () => {zIndex: "1",});});++ it("pins the completion icon glyph to its box so engines cannot clip it", () => {+ const rules = buildSqlCompletionThemeRules();++ // With `left`/`top` auto, the absolutely positioned pseudo element relies on+ // engine-specific static positions inside the flex icon, and WebKit places it+ // far enough left for `overflow: hidden` to cut off the left half of the glyph.+ expect(rules[".cm-completionIcon:before"]).toMatchObject({+ left: "0",+ top: "0",+ width: "15px",+ height: "15px",+ maskSize: "14px 14px",+ maskPosition: "center",+ });+ expect(rules[".cm-completionIcon"]).toMatchObject({ width: "15px", height: "15px", overflow: "hidden" });+ });});describe("editor gutters", () => {diff --git a/apps/desktop/src/lib/editor/editorThemes.ts b/apps/desktop/src/lib/editor/editorThemes.tsindex 80c587c6f2..e86cea4d2c 100644--- a/apps/desktop/src/lib/editor/editorThemes.ts+++ b/apps/desktop/src/lib/editor/editorThemes.ts@@ -998,7 +998,13 @@ export function buildSqlCompletionThemeRules(): CodeMirrorStyleSpec {backgroundColor: "currentColor",content: "''",display: "block",- height: "14px",+ height: "15px",+ // The pseudo element must be pinned to the icon box: with `left`/`top`+ // left auto, engines disagree on the static position of an absolutely+ // positioned child of a flex container, and WebKit places it far enough+ // left for `overflow: hidden` to cut off half the glyph.+ left: "0",+ top: "0",position: "absolute",WebkitMaskImage: "var(--dbx-completion-icon-mask)",WebkitMaskPosition: "center",@@ -1008,7 +1014,7 @@ export function buildSqlCompletionThemeRules(): CodeMirrorStyleSpec {maskPosition: "center",maskRepeat: "no-repeat",maskSize: "14px 14px",- width: "14px",+ width: "15px",},".cm-completionIcon:after": {content: "'none'",