Skip to content

Commit 4e6b7d8

Browse files
shivamhwpPR Batch Testerclaude
authored
fix(web): explain when a theme hides environment artwork (pingdotgg#27936)
Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent b1bd064 commit 4e6b7d8

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

‎apps/web/src/components/settings/AppearanceSettingsPanel.tsx‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
useEnvironmentStageLabel,
2020
} from "../SidebarStageBackdrop";
2121
import { useCustomThemes } from "../../hooks/useCustomThemes";
22+
import { useEnvironmentIdentificationMode } from "../../hooks/useSettings";
2223
import { useTheme } from "../../hooks/useTheme";
2324
import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
2425
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
@@ -106,6 +107,20 @@ export function AppearanceSettingsPanel() {
106107
environmentIdentificationOptionList.find(
107108
([value]) => value === settings.environmentIdentificationMode,
108109
)?.[1] ?? ENVIRONMENT_IDENTIFICATION_LABELS[settings.environmentIdentificationMode];
110+
const effectiveEnvironmentIdentificationMode = useEnvironmentIdentificationMode();
111+
const themeHidesEnvironmentArtwork =
112+
effectiveEnvironmentIdentificationMode === "pill" &&
113+
resolveSidebarStageBackdropVariant(
114+
environmentStageLabel,
115+
settings.environmentIdentificationMode,
116+
) !== null;
117+
const environmentIdentificationDescription = themeHidesEnvironmentArtwork
118+
? environmentStageVariant
119+
? "Only built-in themes show artwork, so this theme shows the version pill."
120+
: "Only built-in themes show artwork."
121+
: environmentStageVariant
122+
? "Choose how Dev and Nightly environments are identified."
123+
: "Show Dev or Nightly artwork in the sidebar header.";
109124
const glassOpacityRatio =
110125
(settings.glassOpacity - MIN_GLASS_OPACITY) / (MAX_GLASS_OPACITY - MIN_GLASS_OPACITY);
111126
const glassOpacitySliderStyle = {
@@ -395,11 +410,7 @@ export function AppearanceSettingsPanel() {
395410
/>
396411
<SettingsRow
397412
{...searchableSetting("environment-identification")}
398-
description={
399-
environmentStageVariant
400-
? "Choose how Dev and Nightly environments are identified."
401-
: "Show Dev or Nightly artwork in the sidebar header."
402-
}
413+
description={environmentIdentificationDescription}
403414
resetAction={
404415
settings.environmentIdentificationMode !== DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
405416
<SettingResetButton

0 commit comments

Comments
 (0)