Skip to content

[HOLD for payment 2023-06-23] [HOLD for payment 2023-06-21] [$1000] profile pic does not update in tooltip in offline mode #20672

Closed

Description

@kavimuru

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 offline
  2. go to Settings >Profile
  3. change the profile pic
  4. go to any chat and hover on email to see user details in tooltip

Expected Result:

updated profile pic should show

Actual Result:

shows old profile pic

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: 1.3.27-2
Reproducible in staging?: y
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

Screen.Recording.2023-06-13.at.3.00.50.PM.mov
Recording.966.mp4

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686648923012819

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0163d5011f7c3a7e5f
  • Upwork Job ID: 1668632232209276928
  • Last Price Increase: 2023-06-13

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 13, 2023
  2. melvin-bot commented on Jun 13, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 13, 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. OSBotify commented on Jun 13, 2023

    @OSBotify
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. melvin-bot commented on Jun 13, 2023

    @melvin-bot

    Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  6. mdneyazahmad commented on Jun 13, 2023

    @mdneyazahmad
    Contributor

    Proposal

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

    Avatar is not updated in tooltip in offline mode

    What is the root cause of that problem?

    When user upload a new profile picture. It is updated in Onyx with this key ONYXKEYS.PERSONAL_DETAILS to immediately reflect the result. In the chat we are getting the avatar from ONYXKEYS.PERSONAL_DETAILS_LIST which is not updated until it is stored on the server. Therefore, it keeps displaying the old avatar. We are also using the avatar url from ONYXKEYS.PERSONAL_DETAILS wherever it immediately shows the updated avatar.

    const userDetails = lodashGet(props.personalDetailsList, props.accountID, props.fallbackUserDetails);

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

    Get url from ONYXKEYS.PERSONAL_DETAILS

    1. Import required files
    import compose from '../../libs/compose';
    import * as UserUtils from '../../libs/UserUtils';
    import {withPersonalDetails} from '../OnyxProvider';
    1. Add withPersonalDetails
    export default compose(
        withPersonalDetails(), 
        withOnyx({
            personalDetailsList: {
                key: ONYXKEYS.PERSONAL_DETAILS_LIST,
            },
        })
    )(UserDetailsTooltip);
    1. Get url from ONYXKEYS.PERSONAL_DETAILS
        const personalDetail = props.personalDetails[userDetails.login] || {};
    
        const avatarSource = UserUtils.getAvatar(personalDetail.avatar, userDetails.login);
    1. Update the prop in Avatar component

    What alternative solutions did you explore? (Optional)

    None

    commit: eef7da9

  7. 64 remaining items

  8. dummy-1111 commented on Jun 28, 2023

    @dummy-1111
    Contributor

    @pecanoro

    May I ask you if this is eligible for speed bonus?
    #20672 (comment)

  9. pecanoro commented on Jun 28, 2023

    @pecanoro
    Contributor

    @s-alves10 Yes! It should! Wasn't the case?

  10. dummy-1111 commented on Jun 28, 2023

    @dummy-1111
    Contributor

    I'm afraid not

  11. slafortune commented on Jun 29, 2023

    @slafortune
    Contributor

    Yes! It should have - I missed that and can certainly add it! Bonus sent @s-alves10

  12. allroundexperts commented on Jun 29, 2023

    @allroundexperts
    Contributor

    Yes! It should have - I missed that and can certainly add it! Bonus sent @s-alves10

    Don't forget me @slafortune!

  13. pecanoro commented on Jul 3, 2023

    @pecanoro
    Contributor

    @slafortune Friendly bump to handle the remaining payment issues!

  14. slafortune commented on Jul 5, 2023

    @slafortune
    Contributor

    You bet @allroundexperts - can you please complete the checklist? Is there a regression test?

  15. allroundexperts commented on Jul 6, 2023

    @allroundexperts
    Contributor

    @slafortune It seems like the checklist is not needed here. As per #20672 (comment) we intentionally did not update PERSONAL_DETAILS key in the original PR. This got fixed in a subsequent PR but we just wanted to fix this temporarily here because it might have impacted user experience.

  16. slafortune commented on Jul 6, 2023

    @slafortune
    Contributor

    Thanks @allroundexperts ! I think if the checklist isn't needed for any reason, having an explanation as to why it isn't needed is super helpful to make sure we are getting everything.

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 productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions