@the-portland-company/shell 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2 — 2026-05-13
4
+
5
+ ### Added
6
+
7
+ - `<ShellChrome userAvatarUrl />` (and matching `<ShellProvider userAvatarUrl />` prop) — app-supplied avatar URL override for the header `<UserMenu />` avatar. When provided, takes precedence over the avatar URL on the Supabase session's `user_metadata.avatar_url`.
8
+
9
+ ### Fixed
10
+
11
+ - `<UserMenu />` was rendering only `user.raw.user_metadata.avatar_url`, which missed app-specific avatar sources like `profile.avatar_url`, memoji selections persisted to localStorage, and branded default URLs. Apps with these fallback chains were seeing the initials placeholder instead of the user's portrait. Pass the resolved URL via `userAvatarUrl` to restore parity with the legacy chrome.
12
+
3
13
  ## 0.3.1 — 2026-05-13
4
14
 
5
15
  Closes the last two visual gaps in the shell-v3 chrome vs production.
package/dist/index.cjs CHANGED
@@ -1153,7 +1153,8 @@ function ShellProvider({
1153
1153
  linkedAccounts,
1154
1154
  support,
1155
1155
  devNotesMenu,
1156
- myProfileHref
1156
+ myProfileHref,
1157
+ userAvatarUrl
1157
1158
  }) {
1158
1159
  const [status, setStatus] = react$1.useState("loading");
1159
1160
  const [session, setSession] = react$1.useState(null);
@@ -1195,9 +1196,10 @@ function ShellProvider({
1195
1196
  const chrome = react$1.useMemo(
1196
1197
  () => ({
1197
1198
  devNotesMenu: devNotesMenu ?? null,
1198
- myProfileHref: myProfileHref ?? "/my-profile"
1199
+ myProfileHref: myProfileHref ?? "/my-profile",
1200
+ userAvatarUrl
1199
1201
  }),
1200
- [devNotesMenu, myProfileHref]
1202
+ [devNotesMenu, myProfileHref, userAvatarUrl]
1201
1203
  );
1202
1204
  return /* @__PURE__ */ jsxRuntime.jsx(ShellAuthContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(ShellMetaContext.Provider, { value: meta, children: /* @__PURE__ */ jsxRuntime.jsx(ShellOrgContext.Provider, { value: organization ?? null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellLinkedAccountsContext.Provider, { value: linkedAccounts ?? null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellSupportProviderContext.Provider, { value: support ?? null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellModeContext.Provider, { value: null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellNavItemsContext.Provider, { value: null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellNavigationPreferenceContext.Provider, { value: null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellRoleContext.Provider, { value: null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellFooterContext.Provider, { value: null, children: /* @__PURE__ */ jsxRuntime.jsx(ShellChromeContext.Provider, { value: chrome, children: /* @__PURE__ */ jsxRuntime.jsx(react.ChakraProvider, { theme: politogyTheme, children }) }) }) }) }) }) }) }) }) }) }) });
1203
1205
  }
@@ -1284,7 +1286,8 @@ function UserMenu() {
1284
1286
  myProfileHref,
1285
1287
  organizationSettingsHref,
1286
1288
  showContinueOnboarding,
1287
- onContinueOnboarding
1289
+ onContinueOnboarding,
1290
+ userAvatarUrl
1288
1291
  } = useShellChrome();
1289
1292
  const linked = useShellLinkedAccounts();
1290
1293
  const mode = useShellMode();
@@ -1295,7 +1298,7 @@ function UserMenu() {
1295
1298
  const menuListBorderColor = react.useColorModeValue("gray.200", "gray.700");
1296
1299
  if (status !== "authenticated" || !user) return null;
1297
1300
  const displayName = getUserDisplayName(user.raw);
1298
- const avatarUrl = avatarUrlFromUser(user);
1301
+ const avatarUrl = userAvatarUrl ?? avatarUrlFromUser(user);
1299
1302
  const modeConfig = mode?.getModeConfig() ?? null;
1300
1303
  const currentOrg = org?.currentOrg ?? null;
1301
1304
  const linkedAccounts = linked?.linkedAccounts ?? [];
@@ -2911,7 +2914,8 @@ function ShellChrome({
2911
2914
  onContinueOnboarding,
2912
2915
  pageTitle,
2913
2916
  breadcrumbs,
2914
- headerActions
2917
+ headerActions,
2918
+ userAvatarUrl
2915
2919
  }) {
2916
2920
  const chrome = react$1.useMemo(
2917
2921
  () => ({
@@ -2924,7 +2928,8 @@ function ShellChrome({
2924
2928
  onContinueOnboarding,
2925
2929
  pageTitle,
2926
2930
  breadcrumbs,
2927
- headerActions
2931
+ headerActions,
2932
+ userAvatarUrl
2928
2933
  }),
2929
2934
  [
2930
2935
  devNotesMenu,
@@ -2936,7 +2941,8 @@ function ShellChrome({
2936
2941
  onContinueOnboarding,
2937
2942
  pageTitle,
2938
2943
  breadcrumbs,
2939
- headerActions
2944
+ headerActions,
2945
+ userAvatarUrl
2940
2946
  ]
2941
2947
  );
2942
2948
  const navItemsValue = react$1.useMemo(