fix(redis): keep JSON tree labels horizontal
This commit is contained in:
1 parent
030627cc10
commit
ed87267777
2 files changed
+30
No files matched your search
@@ -307,6 +307,26 @@ defineExpose({ expandAll, collapseAll, resetExpansion, refresh });
|
|||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.json-tree-key,
|
||||||
|
.json-tree-index,
|
||||||
|
.json-tree-punctuation,
|
||||||
|
.json-tree-bracket {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.json-tree-string,
|
||||||
|
.json-tree-number,
|
||||||
|
.json-tree-boolean,
|
||||||
|
.json-tree-null {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.json-tree-summary {
|
||||||
|
flex: 0 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.dark .json-tree {
|
.dark .json-tree {
|
||||||
--json-tree-key: #93c5fd;
|
--json-tree-key: #93c5fd;
|
||||||
--json-tree-string: #86efac;
|
--json-tree-string: #86efac;
|
||||||
|
|||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
const source = readFileSync("apps/desktop/src/components/common/JsonTree.vue", "utf8");
|
||||||
|
|
||||||
|
describe("JSON tree layout", () => {
|
||||||
|
it("keeps a collapsed container closing bracket beside its summary", () => {
|
||||||
|
expect(source).toMatch(/\.json-tree-summary\s*\{\s*flex: 0 1 auto;\s*min-width: 0;\s*\}/);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in new issue
Block a user