From adbe3a40f6bc7fffd66f850faa965f99d7c70a93 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 3 Nov 2026 22:08:54 +0100 Subject: [PATCH] fix(settings): lint, size and test follow-ups for the date format The admin reset link is a component of its own instead of one made during render, the version line of the plugin panels moved into small modules, the new settings rows hand their save on as void, the date picker takes an accessible name for fields without a visible label (the Vacay hire date), the Vacay and poll tests type through the shared picker, and the theme, size and lint baselines are lowered to what the files hold now. --- client/scripts/eslint-baseline.json | 4 +- client/scripts/size-baseline.json | 2 +- client/scripts/theme-baseline.json | 2 +- .../components/Admin/AdminPluginsPanel.tsx | 13 +--- .../Admin/DefaultUserSettingsTab.tsx | 68 +++++++++++-------- .../components/Admin/plugins/VersionLine.tsx | 16 +++++ .../Settings/DisplaySettingsTab.tsx | 4 +- .../Vacay/VacaySettings.calendars.test.tsx | 20 +++++- client/src/components/Vacay/VacaySettings.tsx | 1 + .../shared/CustomDateTimePicker.tsx | 9 ++- .../admin/MAdminDefaultUserSettings.tsx | 64 ++++++++++------- .../screens/admin/MAdminPluginsPanel.tsx | 19 +++--- .../screens/admin/MPluginVersionDate.tsx | 8 +++ .../screens/settings/MSettingsGeneral.tsx | 4 +- .../screens/vacay/MVacaySettingsSheet.tsx | 3 +- .../unit/mobile/trip/MCollabPolls.test.tsx | 18 +++-- .../mobile/vacay/MVacaySettingsSheet.test.tsx | 21 ++++-- server/tests/unit/mcp/tools-settings.test.ts | 2 +- shared/src/settings/settings.schema.ts | 9 ++- 19 files changed, 188 insertions(+), 99 deletions(-) create mode 100644 client/src/components/Admin/plugins/VersionLine.tsx create mode 100644 client/src/mobile/screens/admin/MPluginVersionDate.tsx diff --git a/client/scripts/eslint-baseline.json b/client/scripts/eslint-baseline.json index 1d8019a74..9902dada8 100644 --- a/client/scripts/eslint-baseline.json +++ b/client/scripts/eslint-baseline.json @@ -15,7 +15,7 @@ "@typescript-eslint/no-unused-vars": 124, "react-hooks/immutability": 28, "max-lines-per-function": 130, - "react-hooks/static-components": 78, + "react-hooks/static-components": 50, "react-hooks/preserve-manual-memoization": 12, "no-useless-assignment": 7, "no-empty": 19, @@ -25,7 +25,7 @@ "max-depth": 21, "react-hooks/void-use-memo": 1, "@typescript-eslint/no-unused-expressions": 2, - "react-hooks/purity": 2, + "react-hooks/purity": 1, "preserve-caught-error": 53, "no-useless-escape": 1 }, diff --git a/client/scripts/size-baseline.json b/client/scripts/size-baseline.json index 7489f9aba..c0a3b2a25 100644 --- a/client/scripts/size-baseline.json +++ b/client/scripts/size-baseline.json @@ -2,7 +2,7 @@ "e2e/help/fixtures.ts": 2291, "src/api/client.ts": 1873, "src/components/Admin/AdminPluginsPanel.test.tsx": 2704, - "src/components/Admin/AdminPluginsPanel.tsx": 1277, + "src/components/Admin/AdminPluginsPanel.tsx": 1266, "src/components/Budget/CostsPanel.test.tsx": 2730, "src/components/Budget/CostsPanel.tsx": 1798, "src/components/Map/MapView.tsx": 1385, diff --git a/client/scripts/theme-baseline.json b/client/scripts/theme-baseline.json index aab605717..e9a007d72 100644 --- a/client/scripts/theme-baseline.json +++ b/client/scripts/theme-baseline.json @@ -284,7 +284,7 @@ "mobile/screens/vacay/MVacay.tsx": 23, "mobile/screens/vacay/MVacayInviteSheet.tsx": 9, "mobile/screens/vacay/MVacayMonth.tsx": 3, - "mobile/screens/vacay/MVacaySettingsSheet.tsx": 36, + "mobile/screens/vacay/MVacaySettingsSheet.tsx": 35, "mobile/screens/vacay/MVacayShareSheet.tsx": 11, "mobile/screens/vacay/vacayDayModel.ts": 1, "pages/AtlasPage.tsx": 32, diff --git a/client/src/components/Admin/AdminPluginsPanel.tsx b/client/src/components/Admin/AdminPluginsPanel.tsx index 28dee5637..40aba0529 100644 --- a/client/src/components/Admin/AdminPluginsPanel.tsx +++ b/client/src/components/Admin/AdminPluginsPanel.tsx @@ -34,6 +34,7 @@ import { usePluginsAdmin } from './plugins/usePluginsAdmin' import PluginFilterMenu from './plugins/PluginFilterMenu' import PluginInstalledRow from './plugins/PluginInstalledRow' import PluginSecurityDialog from './plugins/PluginSecurityDialog' +import VersionLine from './plugins/VersionLine' /** * Admin → Plugins (#plugins). A full plugin-management surface: a segmented @@ -946,18 +947,6 @@ function PluginDetailModal({ item, installed, busy, onInstall, onClose, t, local ) } -/** A version number with its date and, when the author signed it, a quiet tick. */ -function VersionLine({ v }: { v: VersionInfo }) { - const { formatDate } = useFormatDate() - return ( - - v{v.version} - {v.publishedAt && {formatDate(new Date(v.publishedAt))}} - {v.signed && } - - ) -} - function Meta({ k, v }: { k: string; v: string }) { return (
diff --git a/client/src/components/Admin/DefaultUserSettingsTab.tsx b/client/src/components/Admin/DefaultUserSettingsTab.tsx index 1355d1ce3..abc4f6c76 100644 --- a/client/src/components/Admin/DefaultUserSettingsTab.tsx +++ b/client/src/components/Admin/DefaultUserSettingsTab.tsx @@ -67,6 +67,27 @@ function errorText(err: unknown, fallback: string): string { return err instanceof Error ? err.message : fallback } +interface ResetProps { + shown: boolean + onReset: () => void + label: string +} + +// Inside the row's own