Objective
Decompose the monolithic Avatar component into focused primitives so call sites use the right API and the legacy Avatar shell (with type forking) can eventually be removed.
Milestones
M1 — Split Avatar into primitives
Extract AvatarUser, AvatarWorkspace, AvatarImage, AvatarIcon, AvatarInitials, source/error hooks, and shared types. Keep Avatar/index.tsx as a backward-compatible facade.
PR: #95050
M2 — Unify avatar sizes
Consolidate CONST.AVATAR_SIZE naming (remove confusing names like LARGE_BORDERED, LARGE_NORMAL, one-off sizes). Apply border styling separately from size enum. Touches ~70+ files.
PR: #95275
Origin: #94682 (comment)
M3 — Migrate Workspace Avatar usages
Replace Avatar + type={CONST.ICON_TYPE_WORKSPACE} call sites with direct AvatarWorkspace usage. Remove workspace branch from facade once migrated (~10 call sites).
M4 — Migrate User Avatar usages
Replace Avatar + type={CONST.ICON_TYPE_AVATAR} call sites with direct AvatarUser usage. Remove user branch and type prop from facade once migrated (~34 call sites).
Sub-issues
Related code
Related tracking
Issue Owner
Current Issue Owner: @jmusial
Objective
Decompose the monolithic
Avatarcomponent into focused primitives so call sites use the right API and the legacyAvatarshell (withtypeforking) can eventually be removed.Milestones
M1 — Split Avatar into primitives
Extract
AvatarUser,AvatarWorkspace,AvatarImage,AvatarIcon,AvatarInitials, source/error hooks, and shared types. KeepAvatar/index.tsxas a backward-compatible facade.PR: #95050
M2 — Unify avatar sizes
Consolidate
CONST.AVATAR_SIZEnaming (remove confusing names likeLARGE_BORDERED,LARGE_NORMAL, one-off sizes). Apply border styling separately from size enum. Touches ~70+ files.PR: #95275
Origin: #94682 (comment)
M3 — Migrate Workspace Avatar usages
Replace
Avatar+type={CONST.ICON_TYPE_WORKSPACE}call sites with directAvatarWorkspaceusage. Remove workspace branch from facade once migrated (~10 call sites).M4 — Migrate User Avatar usages
Replace
Avatar+type={CONST.ICON_TYPE_AVATAR}call sites with directAvatarUserusage. Remove user branch andtypeprop from facade once migrated (~34 call sites).Sub-issues
Related code
src/components/Avatar.tsx→src/components/Avatar/after M1src/styles/utils/index.ts(getAvatarSize,getAvatarStyle,getAvatarBorderStyle)src/CONST/index.ts(AVATAR_SIZE)Related tracking
Issue Owner
Current Issue Owner: @jmusial