mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-02 08:30:35 +00:00
fix(layout): prevent editor overflow over side panels
This commit is contained in:
@@ -5,6 +5,15 @@ import test from "node:test";
|
||||
const source = readFileSync("apps/desktop/src/components/grid/DataGrid.vue", "utf8");
|
||||
|
||||
test("data grid toolbar keeps a minimum content width", () => {
|
||||
assert.match(source, /class="data-grid-topbar-scroll shrink-0 overflow-x-auto/);
|
||||
assert.match(source, /class="data-grid-topbar flex items-stretch/);
|
||||
assert.match(source, /\.data-grid-topbar\s*\{\s*min-width: 760px;/s);
|
||||
assert.match(source, /\.data-grid-topbar-scroll\s*\{\s*scrollbar-width: thin;/s);
|
||||
});
|
||||
|
||||
test("data grid toolbar suggestions render outside the scroll container", () => {
|
||||
assert.match(source, /<Teleport to="body">/);
|
||||
assert.match(source, /class="fixed z-50 min-w-\[180px\] rounded-md border bg-popover/);
|
||||
assert.match(source, /:style="whereSuggestionStyle"/);
|
||||
assert.match(source, /:style="orderBySuggestionStyle"/);
|
||||
});
|
||||
|
||||
@@ -20,6 +20,12 @@ test("AI assistant panel stays closed on first launch to preserve startup memory
|
||||
assert.match(appSource, /const showAiPanel = ref\(localStorage\.getItem\("dbx-ai-panel-open"\) === "true"\)/);
|
||||
});
|
||||
|
||||
test("dock side panels layer above the editor content", () => {
|
||||
assert.match(appSource, /\? 'flex-1 min-w-0 overflow-hidden'/);
|
||||
assert.match(appSource, /\? 'h-full shrink-0 relative z-30 isolate bg-background'/);
|
||||
assert.match(appSource, /: 'h-full shrink-0 relative z-30 isolate rounded-md border border-border\/80 bg-background'/);
|
||||
});
|
||||
|
||||
test("app dialogs keep non-primary dialogs out of the startup chunk", () => {
|
||||
for (const component of ["ConnectionDialog", "EditorSettingsDialog", "DangerConfirmDialog"]) {
|
||||
assert.doesNotMatch(appDialogsSource, new RegExp(`import ${component} from`));
|
||||
|
||||
Reference in New Issue
Block a user