Skip to content

[$1000] Default profile avatar is different in tooltip #20800

Closed

Description

@Beamanator

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to any chat with default tooltip
  2. hover over profile pic

Note: This happens in multiple places in the app

Expected Result:

Profile should not be different in tooltip

Actual Result:

Profile is different in tooltip

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: main (latest)
Reproducible in staging?: N
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686828292914429

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cd1cc4ea3187cd31
  • Upwork Job ID: 1669689115344900096
  • Last Price Increase: 2023-06-16

Activity

  1. added
    Daily
    Bug
    on Jun 15, 2023
  2. melvin-bot commented on Jun 15, 2023

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Jun 15, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. dummy-1111 commented on Jun 15, 2023

    @dummy-1111
    Contributor

    I have done similar issue before(#20713) and I think I have most of the context regarding the issue. Can I work on this?

  5. Beamanator commented on Jun 15, 2023

    @Beamanator
    ContributorAuthor

    @s-alves10 please do, but please provide a proposal how you think this can be fixed first 🙏

  6. spcheema commented on Jun 15, 2023

    @spcheema
    Contributor

    Proposed solution

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

    Default profile avatar is different in tooltip

    What is the root cause of that problem?

    Invalid value being passed to the UserUtils.getAvatar method. Based on the recent change accountID is expected not login key

    function getAvatar(avatarURL, accountID) {

        const avatarSource = UserUtils.getAvatar(avatar, actorAccountID);
    

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

    The similar inconsistency found on multioplaces:

    • src/libs/OptionsListUtils.js line no. 840

    source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.login),

    • src/pages/home/report/ReactionList/BaseReactionList.js line no. 90

    source: UserUtils.getAvatar(item.avatar, item.login),

    • src/components/UserDetailsTooltip/index.js line no. 22

    source={UserUtils.getAvatar(userDetails.avatar, userDetails.login)}

    Replace login key with accountID on all three files above listed.

    What alternative solutions did you explore? (Optional)

    NA

  7. grgia commented on Jun 15, 2023

    @grgia
    Contributor

    Avatar needs name, source, and type props for the default avatar to work. I also reported that the workspace avatars are incorrect for the same reason. I can potentially also take this one

  8. BhuvaneshPatil commented on Jun 15, 2023

    @BhuvaneshPatil
    Contributor

    Proposal

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

    Default profile avatar is different in tooltip

    What is the root cause of that problem?

    We are using login here in UserDetailsTooltip

    <View style={[styles.alignItemsCenter, styles.ph2, styles.pv2]}>
    <View style={styles.emptyAvatar}>
    <Avatar
    containerStyles={[styles.actionAvatar]}
    source={UserUtils.getAvatar(userDetails.avatar, userDetails.login)}
    />
    </View>
    <Text style={[styles.mt2, styles.textMicroBold, styles.textReactionSenders, styles.textAlignCenter]}>
    {String(userDetails.displayName).trim() ? userDetails.displayName : ''}
    </Text>
    <Text style={[styles.textMicro, styles.fontColorReactionLabel]}>
    {String(userDetails.login).trim() && !_.isEqual(userDetails.login, userDetails.displayName) ? Str.removeSMSDomain(userDetails.login) : ''}
    </Text>
    </View>

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

    We shall use accountID instead

    What alternative solutions did you explore? (Optional)

  9. dummy-1111 commented on Jun 15, 2023

    @dummy-1111
    Contributor

    I think @BhuvaneshPatil 's proposal is correct. During the last merge, UserUtils.getAvatar function changes, its 2nd parameter from login to accountID

  10. spcheema commented on Jun 15, 2023

    @spcheema
    Contributor

    @s-alves10 Can you please review my proposal. It requires changes on multiple files?

  11. spcheema commented on Jun 15, 2023

    @spcheema
    Contributor

    @grgia Yeah there are some places where changes were left unintentionally but the root cause it the same login is used instead of accountID

  12. twisterdotcom commented on Jun 15, 2023

    @twisterdotcom
    Contributor

    @spcheema - can I ask about why you post comments like this on issues to begin with?

    image

    Just intrigued about why and whether we can improve our processes at all? Are you only able to see notifications after you comment for some reason?

    It's worth noting we don't filter by the oldest proposal, only the best and if two are the same, the least recently edited, so there isn't a benefit to posting like that I'm aware of.

  13. twisterdotcom commented on Jun 15, 2023

    @twisterdotcom
    Contributor

    @alex-mechler is this resolved by #20818 as well?

  14. 17 remaining items

  15. added and removed
    Help Wanted
    on Jun 16, 2023
  16. melvin-bot commented on Jun 16, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

  17. twisterdotcom commented on Jun 16, 2023

    @twisterdotcom
    Contributor

    @eVoloshchak - what do you think of the proposals here?

  18. twisterdotcom commented on Jun 19, 2023

    @twisterdotcom
    Contributor

    Bump @eVoloshchak to review these proposals.

  19. eVoloshchak commented on Jun 19, 2023

    @eVoloshchak
    Contributor

    @BhuvaneshPatil's proposal looks good to me, I think we should proceed with it

    🎀👀🎀 C+ reviewed!
    cc: @twisterdotcom

  20. situchan commented on Jun 19, 2023

    @situchan
    Contributor

    This was fixed already (#21026 (comment))

  21. situchan commented on Jun 19, 2023

    @situchan
    Contributor

    Latest codebase:

    <Avatar
    containerStyles={[styles.actionAvatar]}
    source={UserUtils.getAvatar(userDetails.avatar, userDetails.accountID)}
    />

  22. eVoloshchak commented on Jun 19, 2023

    @eVoloshchak
    Contributor

    Awesome, thanks @situchan!

  23. BhuvaneshPatil commented on Jun 19, 2023

    @BhuvaneshPatil
    Contributor

    Yeah, this was fixed by @Beamanator - 2a67b3e

  24. twisterdotcom commented on Jun 19, 2023

    @twisterdotcom
    Contributor

    Okay, let's close then. Dupe of #21026 (comment)

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

Metadata

Metadata

Labels

BugDailyExternalNeeds ReproductionUpwork Automation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions