feat(editor): batch-select completion fields via drag

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-02 18:07:25 +08:00
1 parent 72dcd8355a
commit fdea607efd
4 files changed
+396 -11

No files matched your search

+10
View File
@@ -162,6 +162,16 @@ describe("SQL completion theme", () => {
expect(rules[".cm-completionLabel"]).toMatchObject({ flex: "0 1 auto" });
expect(rules[".cm-completionDetail"]).toMatchObject({ flex: "1 1 0", minWidth: "0", textOverflow: "ellipsis" });
});
it("keeps the batch column insertion action fixed at the bottom of its menu", () => {
const rules = buildSqlCompletionThemeRules();
expect(rules[".cm-tooltip.cm-tooltip-autocomplete > ul > li.cm-batch-column-selection-action"]).toMatchObject({
bottom: "0",
position: "sticky",
zIndex: "1",
});
});
});
describe("editor gutters", () => {
@@ -973,6 +973,15 @@ export function buildSqlCompletionThemeRules(): CodeMirrorStyleSpec {
color: "var(--popover-foreground) !important",
outline: colorMixValue("1px solid var(--border)", "1px solid color-mix(in oklch, var(--primary) 22%, transparent)"),
},
".cm-tooltip.cm-tooltip-autocomplete > ul > li.cm-batch-column-selection-action": {
background: "var(--popover)",
borderRadius: "0",
borderTop: colorMixValue("1px solid var(--border)", "1px solid color-mix(in oklch, var(--border) 82%, var(--foreground) 18%)"),
bottom: "0",
boxShadow: "0 -6px 12px rgb(0 0 0 / 0.06)",
position: "sticky",
zIndex: "1",
},
".cm-completionIcon": {
alignItems: "center",
display: "inline-flex",