fix(widgets): restore compact v1 surfaces

This commit is contained in:
ajnart committed 2026-08-27 09:18:10 +02:00
1 parent 1b2f1bd720
commit 3edf874ca3
102 files changed
+1513 -1205

No files matched your search

@@ -6,13 +6,9 @@ describe("Umami layout", () => {
test.each([
{ width: 260, height: 119, property: "isDense" as const, expected: true },
{ width: 260, height: 120, property: "isDense" as const, expected: false },
{ width: 260, height: 139, property: "showXAxis" as const, expected: false },
{ width: 260, height: 140, property: "showXAxis" as const, expected: true },
{ width: 260, height: 95, property: "showSecondaryStats" as const, expected: false },
{ width: 260, height: 96, property: "showSecondaryStats" as const, expected: true },
{ width: 259, height: 150, property: "showDetailedStats" as const, expected: false },
{ width: 260, height: 149, property: "showDetailedStats" as const, expected: false },
{ width: 260, height: 150, property: "showDetailedStats" as const, expected: true },
{ width: 100, height: 80, property: "showXAxis" as const, expected: true },
{ width: 100, height: 80, property: "showSecondaryStats" as const, expected: true },
{ width: 100, height: 80, property: "showDetailedStats" as const, expected: true },
])("sets $property to $expected at $width x $height", ({ width, height, property, expected }) => {
expect(getUmamiLayout({ width, height, displayMode: "compact" })[property]).toBe(expected);
});