#21
Show provider icons in account selectors
Summary
- replace generated avatars in desktop account selectors with account-provider marks
- show the official vendored Gmail logo for Gmail accounts and the custom-domain globe for hosted mail
- reuse the same exhaustive provider component in settings and the mobile account menu
- include the provider type in accessible account names while keeping the decorative mark silent
Validation
pnpm test(63 passing)- focused ESLint on all changed files
pnpm exec tsc --noEmitpnpm buildgit diff --check- browser QA at 1280px and 320px with both hosted and Gmail preview accounts; no horizontal overflow and provider-aware accessible names confirmed
Activity
4mikeyreviewed3mo ago
0ba4370 into main3mo ago
Review summary
Reviewed the diff (
ee2af65..d3e5f75) across all four changed files:components/mail/mail-account-icon.tsx(new),components/settings/mail-accounts-settings.tsx,components/shell/mobile-nav.tsx,components/shell/sidebar.tsx.No blocking correctness, security, or reliability issues found.
What I checked:
MailAccountIconcomponent: exhaustiveswitchoverMailConnectorId("hosted" | "gmail") with anever-typed default guarding future connector additions — verified againstlib/mail/types.tsandlib/mail/connectors.ts, no third variant exists today.colors.textMuted,colors.surfaceActive,radius.lg) all resolve intheme/tokens.stylex.ts./providers/gmail.svgasset exists inpublic/providers/.ProviderIconhelper or unused imports left behind (radius/Iconsstill used inmail-accounts-settings.tsx;Avatarimport removed fromsidebar.tsxbut still consumed elsewhere incomponents/mail/message-card.tsx, so nothing orphaned).aria-hidden, while the newaria-labels onMenu.Item/account-switcher button (${label} account, ${email}) supply the accessible name per base-ui's normal aria-label precedence — this doesn't hide thearia-current/highlighted state, which is a separate attribute.MailAccountIconwithsize="large"reproduces the prior 36x36 boxed layout exactly;size="small"(mobile nav / sidebar) is a new call site, not a behavior change to existing surfaces.Non-blocking notes:
MailAccountIconcomponent, but this matches the existing convention for sibling presentational components in this tree (no tests for the oldProviderIcon,Avatar, etc.), so I wouldn't hold this up on it.I wasn't able to run
pnpm test/tsc/pnpm buildmyself in this environment (no pnpm available), so I'm relying on static inspection plus the validation steps already listed in the PR description.