revert: remove advanced mode from compact widgets

This commit is contained in:
ajnart committed 2026-08-14 13:30:10 +02:00
1 parent 8a44451c72
commit 03338b1755
17 files changed
+35 -44

No files matched your search

+21 -6
View File
@@ -1,9 +1,16 @@
import { describe, expect, test } from "vitest";
import { definition as appDefinition } from "./app";
import { definition as beszelAlertsDefinition } from "./beszel-alerts";
import { definition as beszelSystemGridDefinition } from "./beszel-system-grid";
import { definition as beszelSystemStatsDefinition } from "./beszel-system-stats";
import { definition as beszelSystemTableDefinition } from "./beszel-system-table";
import { definition as clockDefinition } from "./clock";
import { definition as customApiDefinition } from "./custom-api";
import { getWidgetQueryKeys, supportsAdvancedFocus } from "./definition";
import { definition as dockerDefinition } from "./docker";
import { definition as downloadsDefinition } from "./downloads";
import { definition as indexerManagerDefinition } from "./indexer-manager";
import { definition as notebookDefinition } from "./notebook";
describe("getWidgetQueryKeys", () => {
test("falls back to the widget router namespace", () => {
@@ -25,12 +32,20 @@ describe("getWidgetQueryKeys", () => {
});
describe("supportsAdvancedFocus", () => {
test.each([appDefinition, dockerDefinition, customApiDefinition])(
"keeps non-enhanced widgets compact",
(widgetDefinition) => {
expect(supportsAdvancedFocus(widgetDefinition)).toBe(false);
},
);
test.each([
appDefinition,
beszelAlertsDefinition,
beszelSystemGridDefinition,
beszelSystemStatsDefinition,
beszelSystemTableDefinition,
clockDefinition,
customApiDefinition,
dockerDefinition,
indexerManagerDefinition,
notebookDefinition,
])("keeps non-enhanced widgets compact", (widgetDefinition) => {
expect(supportsAdvancedFocus(widgetDefinition)).toBe(false);
});
test("requires an explicit opt-in", () => {
expect(supportsAdvancedFocus({})).toBe(false);