Skip to content

Group - Offline added avatar is not showing with reduced opacity #40427

Closed

Description

@izarutskaya

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


Version Number: v1.4.63-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): natnael.expensify+3@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Crate a group chat
  2. Navigate to the group chat
  3. Apply offline mode
  4. Click on chat header > click on upload avatar icon
  5. Upload avatar

Expected Result:

Avatar should be grayed out

Actual Result:

Avatar is not grayed out

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Bug6453314_1713426435179.offline_avatar.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

    Triggered auto assignment to @flodnv (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Apr 18, 2024

    @melvin-bot

    Triggered auto assignment to @abekkala (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.

  4. github-actions commented on Apr 18, 2024

    @github-actions
    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. izarutskaya commented on Apr 18, 2024

    @izarutskaya
    Author

    @abekkala 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.

  6. izarutskaya commented on Apr 18, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #vip-vsb.

  7. nexarvo commented on Apr 18, 2024

    @nexarvo
    Contributor

    Proposal

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

    Offline added avatar is not grayed out

    What is the root cause of that problem?

    Right now we don't set pendingFields for group avatars that's why The pendingAction is null here:

    pendingAction={pendingAction}

    We are not setting pendingFields in updateGroupChatAvatar

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

    We can set pendingFields in optimistic data here:

    const optimisticData: OnyxUpdate[] = [
        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
            value: {
                avatarUrl: file?.uri ?? '',
    +            pendingFields: {
    +               avatar: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE,
    +           },
            },
        },
    ];

    Finally we will pass pendingActions below to be used in OfflineWithFeedback:

    <AvatarWithImagePicker
    source={icons[0].source}
    isUsingDefaultAvatar={!report.avatarUrl}
    size={CONST.AVATAR_SIZE.XLARGE}
    avatarStyle={styles.avatarXLarge}
    shouldDisableViewPhoto
    onImageRemoved={() => {
    // Calling this without a file will remove the avatar
    Report.updateGroupChatAvatar(report.reportID ?? '');
    }}
    onImageSelected={(file) => Report.updateGroupChatAvatar(report.reportID ?? '', file)}
    editIcon={Expensicons.Camera}
    editIconStyle={styles.smallEditIconAccount}
    />
    ) : (
    <RoomHeaderAvatars
    icons={icons}

    pendingAction={report?.pendingFields?.avatar ?? undefined}
    

    What alternative solutions did you explore? (Optional)

  8. flodnv commented on Apr 18, 2024

    @flodnv
    Contributor

    This is from #39757 @marcaaron 🙃

  9. 10 remaining items

  10. trjExpensify commented on Apr 18, 2024

    @trjExpensify
    Contributor

    Yeah, 50% opacity for pending create. The account profile avatar should have a good example to follow.

  11. nexarvo commented on Apr 18, 2024

    @nexarvo
    Contributor

    @shawnborton @marcaaron yes it's 50% opacity. Below I attached the screen shot for the result of my RCA above

    Online Offline
    Screenshot 2024-04-19 at 12 04 49 AM Screenshot 2024-04-19 at 12 04 14 AM
  12. marcaaron commented on Apr 18, 2024

    @marcaaron
    Contributor

    Ok cool, thanks for the memory refresh @trjExpensify @shawnborton 🙇

    @nexarvo There's a small detail though that this already has an open issue here. And @s77rt is assigned. @s77rt have you made progress on that or would you like to work with @nexarvo on this one as the C+?

    If so, I will close this and mark that other issue as External and keep you both assigned.

  13. changed the title [-]Group - Offline added avatar is not grayed out[/-] [+]Group - Offline added avatar is not showing with reduced opacity[/+] on Apr 18, 2024
  14. dannymcclain commented on Apr 18, 2024

    @dannymcclain
    Contributor

    Also quick note: I don't think the button should be 50% opacity, just the image, right? The button isn't disabled, so it should still be full opacity.

    CleanShot 2024-04-18 at 15 45 12@2x

  15. nexarvo commented on Apr 19, 2024

    @nexarvo
    Contributor

    Coming from this comment from @s77rt. @marcaaron I think we can continue with your comment here

  16. shawnborton commented on Apr 19, 2024

    @shawnborton
    Contributor

    That's a great shout Danny, you are totally right about that.

  17. s77rt commented on Apr 19, 2024

    @s77rt
    Member

    @marcaaron Working with @nexarvo sounds great!

    @nexarvo Please comment on the other issue so you can be assigned. For the PR let's add the errors logic too, it's pretty straightforward, add errorFields.avatar

  18. nexarvo commented on Apr 24, 2024

    @nexarvo
    Contributor

    @dannymcclain @shawnborton for Profile and Workspace pages when we change picture offline then the icon also fades to 50% opacity. Do we need to make the behaviour of Group Chat avatar consistent with other pages ?

  19. shawnborton commented on Apr 24, 2024

    @shawnborton
    Contributor

    I think fading the icon is a bug and we should fix that so that only the picture is faded out and not the pencil icon. Can we fix that everywhere?

  20. dannymcclain commented on Apr 24, 2024

    @dannymcclain
    Contributor

    I think fading the icon is a bug and we should fix that so that only the picture is faded out and not the pencil icon. Can we fix that everywhere?

    Agree. If we can fix that everywhere that'd be awesome.

  21. marcaaron commented on Apr 29, 2024

    @marcaaron
    Contributor

    Closing in favor of #39983

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions