Skip to content

[Due for payment 2026-08-05] [M1] Split Avatar into primitives #95597

Closed

Description

@mountiny

Problem

The shared Avatar component is monolithic: user vs workspace forking via type, image vs icon vs letter-avatar rendering, and source/error resolution all live in one file (~175 lines). This blocks removing the type prop and migrating call sites to focused components.

Solution

Extract focused pieces under src/components/Avatar/:

  • AvatarUser.tsx, AvatarWorkspace.tsx, AvatarBody.tsx
  • AvatarImage.tsx, AvatarIcon.tsx, AvatarInitials.tsx
  • useUserAvatarSource.ts, useWorkspaceAvatarSource.ts, useAvatarLoadError.ts
  • types.ts
  • index.tsx facade preserving today's public API

Add unit tests in tests/unit/AvatarTest.tsx.

PR

#95050

Dependencies

Unblocks M3 and M4. M2 (size unification) can land independently but should coordinate merge order to reduce conflicts.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    InternalRequires API changes or must be handled by Expensify staff
    on Jul 8, 2026
  2. changed the title [-][M1] Split Avatar into primitives[/-] [+][Due for payment 2026-07-17] [M1] Split Avatar into primitives[/+] on Jul 10, 2026
  3. melvin-bot commented on Jul 10, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  4. melvin-bot commented on Jul 10, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.32-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-07-17. 🎊

    For reference, here are some details about the assignees on this issue:

    • @jmusial does not require payment (Contractor)
  5. 17 remaining items

  6. melvin-bot commented on Jul 29, 2026

    @melvin-bot

    @abdulrahuman5196

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.45-14 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-08-05. 🎊

  7. melvin-bot commented on Jul 31, 2026

    @melvin-bot

    @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  8. melvin-bot commented on Aug 4, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  9. melvin-bot commented on Aug 4, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  10. abdulrahuman5196 commented on Aug 5, 2026

    @abdulrahuman5196
    Contributor

    This doesn't require the checklist since this is a code migration work and no new tests to be added.

  11. melvin-bot commented on Aug 7, 2026

    @melvin-bot

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  12. mallenexpensify commented on Aug 8, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @abdulrahuman5196 due $250 via NewDot

  13. laurenreidexpensify commented on Aug 10, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @abdulrahuman5196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2InternalRequires API changes or must be handled by Expensify staffTask

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions