Skip to content

[HOLD for payment 2024-06-06] [HOLD for payment 2024-05-03] Use Fallback Avatar Pattern for Unknown Users #38743

Description

@grgia

Background

Slack convo: https://expensify.slack.com/archives/C036QM0SLJK/p1710942820060629

Colorful / Default Avatars
image

Fallback Avatar

image

Problem

We have a lot of issues surrounding avatar behavior. Some of this is due to how we originally designed the Default Avatar logic, which used a user's login to calculate. This meant that a default avatar could be correctly guessed for any user. However, due to email and privacy concerns, we changed this logic to use the accountID.

Now, any optimistic account ID that is later replaced results in a mismatch of avatars. This has caused a group of bugs all with the same RCA.

Solution

Using the color default avatars as a placeholder avatar causes confusion, so let's stop using them as defaults for users we don't know. From now on, let's always use the fall back avatar. We should be storing the default avatars the same way we store a user-uploaded avatar. So we should stop optimistically setting avatars for users that you don't have in ONYX.

Rules for Avatars

From now on, we want to treat avatars as the following:

  • Colorful default avatars are considered assigned avatars and should be treated the same as when a user has a custom uploaded avatar
  • Fallback avatars are used whenever a user’s accountID is unknown or when there’s a problem fetching the avatar (isOffline)
  • You’ll only see avatars for users you have in ONYX
Issue OwnerCurrent Issue Owner: @puneetlath

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionReviewingHas a PR in reviewWeeklyKSv2

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