Skip to content

[Tracking] Decompose Avatar component #95596

Description

@mountiny

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 OwnerCurrent Issue Owner: @jmusial

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffTaskWeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions