Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hold for payment 2024-09-20][$250] [Workspace Feeds] Default avatar is displayed for cardholder that has custom avatar #48751

Closed
6 tasks done
IuliiaHerets opened this issue Sep 6, 2024 · 16 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 6, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.30-9
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Members.
  3. Invite a member that has custom avatar.
  4. Go to workspace settings > Expensify Card.
  5. Click Issue card.
  6. Issue a card to the member that has custom avatar.
  7. Wait for the cardholder to show up on Expensify Card page.

Expected Result:

The cardholder's custom avatar will appear on Expensify Card page.

Actual Result:

The cardholder's default avatar is shown on Expensify Card page instead.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6595256_1725622038589.20240906_192230.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833181699524011872
  • Upwork Job ID: 1833181699524011872
  • Last Price Increase: 2024-09-09
  • Automatic offers:
    • DylanDylann | Contributor | 103884935
Issue OwnerCurrent Issue Owner: @
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@IuliiaHerets
Copy link
Author

@OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@etCoderDysto
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Expensify Card - Default avatar is displayed for cardholder that has custom avatar

What is the root cause of that problem?

We are fetching defaultAvatar even if a custom avatar (cardholder?.avatar) is available.

<Avatar
source={getDefaultAvatarURL(cardholder?.accountID)}

What changes do you think we should make in order to solve the problem?

We should use getAvatar to fetch custom avatar when custom avatar is available, and fetch default avatar when it is not available.

source={getAvatar(cardholder?.avatar, cardholder?.accountID)}

Note: we can also use getAvatarUrl

What alternative solutions did you explore? (Optional)

@cretadn22
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Default avatar is displayed for cardholder that has custom avatar

What is the root cause of that problem?

<Avatar
source={getDefaultAvatarURL(cardholder?.accountID)}

We consistently use the default avatar in the WorkspaceCardListRow.tsx. It means we always create a new avatar based on the accountID

What changes do you think we should make in order to solve the problem?

We should use cardHolder.avatar and set FallbackAvatar as the default value, similar to how it's implemented on the detail page

icon={cardholder?.avatar ?? FallbackAvatar}

Note: If cardHolder.avatar is null, we should display FallbackAvatar rather than generating a new avatar based on the accountID

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Sep 9, 2024

Not overdue - assigned over weekend. Looking at this today...

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@trjExpensify trjExpensify changed the title Expensify Card - Default avatar is displayed for cardholder that has custom avatar [Workspace Feeds] Default avatar is displayed for cardholder that has custom avatar Sep 9, 2024
@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021833181699524011872

@melvin-bot melvin-bot bot changed the title [Workspace Feeds] Default avatar is displayed for cardholder that has custom avatar [$250] [Workspace Feeds] Default avatar is displayed for cardholder that has custom avatar Sep 9, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

Current assignee @allgandalf is eligible for the External assigner, not assigning anyone new.

@DylanDylann
Copy link
Contributor

Let's make it similar to WorkspaceExpensifyCardDetailsPage.tsx

@cretadn22's proposal looks good to me

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 9, 2024

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@allgandalf allgandalf removed their assignment Sep 9, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 10, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Sep 18, 2024

It looks like this was deployed 5 days ago, so we'll issue payment on 2024-09-20.

And we need to issue payment to @DylanDylann & @cretadn22. Please let me know if i'm missing anyone.

@DylanDylann could you please propose any necessary regression tests?

@OfstadC OfstadC changed the title [$250] [Workspace Feeds] Default avatar is displayed for cardholder that has custom avatar [Hold for payment 2024-09-20][$250] [Workspace Feeds] Default avatar is displayed for cardholder that has custom avatar Sep 18, 2024
@DylanDylann
Copy link
Contributor

DylanDylann commented Sep 18, 2024

No need regression test.

And we only need to pay @cretadn22

@OfstadC
Copy link
Contributor

OfstadC commented Sep 18, 2024

Thanks @DylanDylann !

@mountiny mountiny added the Awaiting Payment Auto-added when associated PR is deployed to production label Sep 18, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Sep 19, 2024

@cretadn22 - I've sent you an offer here - https://www.upwork.com/nx/wm/offer/104042037

@cretadn22
Copy link
Contributor

@OfstadC I accepted

@OfstadC
Copy link
Contributor

OfstadC commented Sep 20, 2024

Payment Summary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

9 participants