diff --git a/.changeset/appshellbranding-logo-removed.md b/.changeset/appshellbranding-logo-removed.md new file mode 100644 index 0000000000..acf664da31 --- /dev/null +++ b/.changeset/appshellbranding-logo-removed.md @@ -0,0 +1,24 @@ +--- +'@object-ui/layout': minor +'@object-ui/app-shell': minor +'@object-ui/console': minor +--- + +Remove the published optional key `logo` from `AppShellBranding` (`@object-ui/layout`). + +The key was declared but never read. `useAppShellBranding` applies only +`primaryColor`, `accentColor`, `favicon` and `title`, and `AppShell` installs no +context provider at all — so its doc comment, "Logo URL — passed to sidebar/navbar +via context", described a mechanism that did not exist. Three call sites were +feeding the key a real value that was silently discarded, and all three are removed +with it: `AppSchemaRenderer`, `ConsoleLayout` and the console's `useBranding` hook. + +The real logo entry point is unchanged and is where it always was: the app schema's +own `branding.logo`, read directly by `AppSidebar` in `@object-ui/app-shell`, plus +the app schema's top-level `logo`, rendered directly by `AppSchemaRenderer`'s +default sidebar header. Neither path went through `AppShellBranding`, so nothing +rendering-visible changes. + +Migration: a consumer that passes `logo` inside an `AppShellBranding` object literal +now gets a compile error. Delete the key — it never reached a renderer. To show a +logo, set it on the app schema's `branding.logo` instead. diff --git a/apps/console/src/hooks/useBranding.ts b/apps/console/src/hooks/useBranding.ts index c20fcf813e..19f750b227 100644 --- a/apps/console/src/hooks/useBranding.ts +++ b/apps/console/src/hooks/useBranding.ts @@ -14,7 +14,6 @@ interface AppBranding { primaryColor?: string; accentColor?: string; favicon?: string; - logo?: string; } export function useBranding(app: { branding?: AppBranding; label?: string } | undefined) { @@ -24,7 +23,6 @@ export function useBranding(app: { branding?: AppBranding; label?: string } | un primaryColor: app.branding.primaryColor, accentColor: app.branding.accentColor, favicon: app.branding.favicon, - logo: app.branding.logo, } : undefined, app?.label ? `${app.label} — ${getProductName()}` : undefined, diff --git a/packages/app-shell/src/layout/ConsoleLayout.tsx b/packages/app-shell/src/layout/ConsoleLayout.tsx index 4db9e9f891..59caefdb72 100644 --- a/packages/app-shell/src/layout/ConsoleLayout.tsx +++ b/packages/app-shell/src/layout/ConsoleLayout.tsx @@ -171,7 +171,6 @@ export function ConsoleLayout({ primaryColor: activeApp.branding.primaryColor, accentColor: activeApp.branding.accentColor, favicon: activeApp.branding.favicon, - logo: activeApp.branding.logo, title: activeApp.label ? `${resolveKeyedI18nLabel(activeApp.label)} — ${getProductName()}` : undefined, diff --git a/packages/layout/src/AppSchemaRenderer.tsx b/packages/layout/src/AppSchemaRenderer.tsx index 89936e8071..9c5a14d5f7 100644 --- a/packages/layout/src/AppSchemaRenderer.tsx +++ b/packages/layout/src/AppSchemaRenderer.tsx @@ -579,7 +579,6 @@ export function AppSchemaRenderer({ const branding: AppShellBranding = { title: schema.title, favicon: schema.favicon, - logo: schema.logo, }; // --- Build sidebar element --- diff --git a/packages/layout/src/AppShell.tsx b/packages/layout/src/AppShell.tsx index aacd277dae..12787bb2c6 100644 --- a/packages/layout/src/AppShell.tsx +++ b/packages/layout/src/AppShell.tsx @@ -16,8 +16,6 @@ export interface AppShellBranding { accentColor?: string; /** Favicon URL — replaces the href */ favicon?: string; - /** Logo URL — passed to sidebar/navbar via context */ - logo?: string; /** Page title suffix (sets document.title) */ title?: string; }