From f4c628c75799d93dd634d14cf4d12aa7391a09f5 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 15 Aug 2026 14:35:42 +0200 Subject: [PATCH] fix(web): frame the desktop-only browser defaults as one disabled block Disabling each control on its own left labels and descriptions at full strength, so the group still read as editable. The defaults now sit in a bordered, dimmed block with the reason at its top. The explanation stays outside the dimmed area: the one part that must remain readable is the part saying why the rest isn't. Co-Authored-By: Claude Opus 5 (1M context) --- .../settings/IntegrationsSettings.tsx | 53 +++++++++++++------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/apps/web/src/components/settings/IntegrationsSettings.tsx b/apps/web/src/components/settings/IntegrationsSettings.tsx index 379e20623c..fee0dfcbf5 100644 --- a/apps/web/src/components/settings/IntegrationsSettings.tsx +++ b/apps/web/src/components/settings/IntegrationsSettings.tsx @@ -21,6 +21,7 @@ import { } from "@t3tools/contracts"; import { PREVIEW_VIEWPORT_PRESETS } from "@t3tools/shared/previewViewport"; import { InfoIcon } from "lucide-react"; +import type { ReactNode } from "react"; import { ScreenRotationIcon } from "~/browser/ScreenRotationIcon"; import { isElectron } from "../../env"; @@ -380,20 +381,30 @@ function BrowserAutoShowFloatingPreviewSetting({ disabled }: { readonly disabled } /** - * The preview browser is a Chromium guest the desktop app hosts, so these - * defaults only mean anything there. They are also *client-local*, which is the - * reason for disabling rather than hiding: editing them from a browser tab - * would silently write preferences that belong to a different client, reading - * as though the desktop app had been configured when it hadn't. + * Frames the client-local preview defaults as one unavailable block. + * + * Disabling each control on its own left the labels and descriptions at full + * strength, so the group still read as editable. Boxing it puts the reason at + * the top and dims everything it covers, which is also why the explanation + * sits outside the dimmed area — the one part that must stay readable is the + * part saying why the rest isn't. + * + * Disabled rather than hidden because these are *client* settings: editing + * them from a browser tab would write preferences belonging to a different + * client, reading as though the desktop app had been configured when it + * hadn't. */ -function DesktopOnlyBrowserNotice() { +function DesktopOnlyBrowserDefaults({ children }: { readonly children: ReactNode }) { return ( -
- -

- The in-app browser runs in the desktop app. These defaults apply to it and can only be - changed there. -

+
+
+ +

+ The in-app browser runs in the desktop app. These defaults apply to it and can only be + changed there. +

+
+
{children}
); } @@ -401,15 +412,23 @@ function DesktopOnlyBrowserNotice() { export function IntegrationsSettingsPanel() { // Client-local preview defaults are editable only where the preview exists. const previewDefaultsDisabled = !isElectron; + const previewDefaults = ( + <> + + + + + + ); return ( - {previewDefaultsDisabled ? : null} - - - - + {previewDefaultsDisabled ? ( + {previewDefaults} + ) : ( + previewDefaults + )} );