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 2023-08-24] [$1000] Task - Second avatar of group avatar is highlighted when long pressing on Share somewhere #24008

Closed
3 of 6 tasks
lanitochka17 opened this issue Aug 1, 2023 · 51 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 1, 2023

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 staging.new.expensify.com
  2. Go to any group chat
  3. Click + > Assign task
  4. Enter title and click Next
  5. Long press on Share somewhere field

Expected Result:

Since Share somewhere field is not selectable in group chat task assignment, it should not have any feedback when pressing on it

Actual Result:

The second avatar of group avatar is highlighted when long pressing on Share somewhere

Workaround:

Unknown

Platforms:

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

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

Version Number: 1.3.48.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6149411_Screen_Recording_20230801_200354_New_Expensify.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause -Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a8af40e296417c50
  • Upwork Job ID: 1686485461826138112
  • Last Price Increase: 2023-08-01
  • Automatic offers:
    • reinaldosg | Contributor | 25951887
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@reinaldosg
Copy link
Contributor

reinaldosg commented Aug 1, 2023

Proposal

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

Second avatar of group avatar is highlighted on long press

What is the root cause of that problem?

MultipleAvatars style ignore props.interactive so the element always have action

pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,
isHovered && !pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,

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

Check props.interactive to determine the style

pressed && props.interactive ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,
isHovered && !pressed && props.interactive ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,

What alternative solutions did you explore? (Optional)

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Aug 1, 2023
@melvin-bot melvin-bot bot changed the title Task - Second avatar of group avatar is highlighted when long pressing on Share somewhere [$1000] Task - Second avatar of group avatar is highlighted when long pressing on Share somewhere Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@hanzalahsamana
Copy link

I can do this

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

📣 @hanzalahsamana! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@icarus-0520
Copy link

In components, MenuItem.js, lines 148-158:
<MultipleAvatars isHovered={isHovered} isPressed={pressed} icons={props.icon} size={props.avatarSize} secondAvatarStyle={[ StyleUtils.getBackgroundAndBorderStyle(themeColors.sidebar), pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined, isHovered && !pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined, ]} />

The pressable this is a child to does check for props.disabled and !props.interactive, but isHovered is passed from further up the hierarchy, so it appears that these checks are not actually diverting inherited values. The first thing I'd do is add in conditionals to isHovered and isPressed that switch to a hardcoded value pending a check to either props.disabled or !props.interactive. there are a couple of different configurations possible there, so I'd try out all of them and log values to see if this theory is correct.

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

📣 @icarus-0520! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@icarus-0520
Copy link

Contributor details
Expensify account email: aidan@disillusion.io
Upwork profile link: https://www.upwork.com/freelancers/~01ee97b9ff5ee5d693

@Muhammad-Saqib-980
Copy link

Proposal

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

Second avatar of group avatar is highlighted when long pressing on Share somewhere

What is the root cause of that problem?

MultipleAvatars style ignore props.interactive so the element always highlights the second avatar on press

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

props.interactive should be used to determine if the second avatar should be highlighted on press or not.

@hungvu193
Copy link
Contributor

@lanitochka17 Can you please update me as the reporter, I already reported it here:
https://expensify.slack.com/archives/C049HHMV9SM/p1689689817652489

@s-alves10
Copy link
Contributor

s-alves10 commented Aug 2, 2023

Proposal

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

Secondary avatar of group avatar is highlighted when hovering or long pressing on share somewhere

What is the root cause of that problem?

When we assign a task in a group chat, props.task.parentReportID is the reportID of the group chat and props.interactive is false in order to prevent interaction

interactive={!props.task.parentReportID}

But Multiple avatar ignores this props

secondAvatarStyle={[
StyleUtils.getBackgroundAndBorderStyle(themeColors.sidebar),
pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,
isHovered && !pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,
]}

This is the root cause

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

This issue may happens for all child components related to isHovered and pressed

We need to replace all occurrence of isHovered and pressed with isHovered && props.interactive and pressed && props.interactive in the MenuItem component

What alternative solutions did you explore? (Optional)

@CuongXuanLe
Copy link

CuongXuanLe commented Aug 2, 2023

Proposal

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

Second avatar of group avatar is highlighted on long press

What is the root cause of that problem?

When we assign a task in a group chat, the props.task.parentReportID is id of this room. So the !props.task.parentReportID of interactive below is false.

interactive={!props.task.parentReportID}

So MultipleAvatars ignore props.interactive and second avatar of group avatar is highlighted when long pressing.

pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,
isHovered && !pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,

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

Add props.interactive condition to define style

secondAvatarStyle={[
   StyleUtils.getBackgroundAndBorderStyle(themeColors.sidebar),
   pressed && props.interactive ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,   isHovered && !pressed && props.interactive ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,
]}

What alternative solutions did you explore? (Optional)

@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

📣 @CuongXuanLe! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.

@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@CuongXuanLe
Copy link

Contributor details
Your Expensify account email: thuy.lethithu@antbuddy.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@ares-dev05
Copy link

Proposal

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

Second avatar of group avatar is highlighted on long press on Share somewhere field

What is the root cause of that problem?

When the "Share everywhere" menu is pressed, the interactive props are set to false to prevent the avatars in this menu from responding to press events. However, the MultipleAvatars component did not handle this interactive props variable.

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

In the MenuItem.js file, on the 148th line, you can update the use case for the MultipleAvatars component as the following.

<MultipleAvatars
    isHovered={isHovered}
    isPressed={pressed}
    icons={props.icon}
    size={props.avatarSize}
    secondAvatarStyle={[
        StyleUtils.getBackgroundAndBorderStyle(themeColors.sidebar),
        pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,
        isHovered && !pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,
    ]}
/>

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Aug 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.54-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-08-24. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@lschurr
Copy link
Contributor

lschurr commented Aug 22, 2023

Hi @sobitneupane - could you work on the checklist? Do we need a regression test for this?

@lschurr
Copy link
Contributor

lschurr commented Aug 22, 2023

Payment summary:

@hungvu193
Copy link
Contributor

@lanitochka17 Can you please update me as the reporter, I already reported it here: https://expensify.slack.com/archives/C049HHMV9SM/p1689689817652489

@lschurr Can you update the reporter? I actually reported this before.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 23, 2023
@lschurr
Copy link
Contributor

lschurr commented Aug 24, 2023

@sobitneupane could you work through the checklist for this one?

@lschurr
Copy link
Contributor

lschurr commented Aug 24, 2023

Could you apply to the job @hungvu193? https://www.upwork.com/jobs/~01a8af40e296417c50

@hungvu193
Copy link
Contributor

Could you apply to the job @hungvu193? https://www.upwork.com/jobs/~01a8af40e296417c50

Applied, Thank you

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

@danieldoglas, @reinaldosg, @sobitneupane, @lschurr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sobitneupane
Copy link
Contributor

Sorry for the delay. I will try to get to it by EOD.

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2023
@lschurr
Copy link
Contributor

lschurr commented Aug 29, 2023

Bump on this one @sobitneupane :)

@lschurr
Copy link
Contributor

lschurr commented Aug 30, 2023

Hi @sobitneupane - would really like to get this one closed out. Could you confirm whether we need a regression test or not?

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Open a group chat
  2. Assign task
  3. Enter title and click Next
  4. Hover on Share somewhere field -> Verify that avatars are not highlighted
  5. Press on Share somewhere field -> Verify that avatars are not highlighted
  6. Long Press on Share somewhere field -> Verify that avatars are not highlighted

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#20145

  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

https://github.com/Expensify/App/pull/20145/files#r1311937536

  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@sobitneupane] Determine if we should create a regression test for this bug.

Yes

  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

#24008 (comment)

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

@danieldoglas, @reinaldosg, @sobitneupane, @lschurr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@danieldoglas
Copy link
Contributor

@lschurr I think this one is ready to pay/close!

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@lschurr
Copy link
Contributor

lschurr commented Sep 4, 2023

Yep, thanks! I'm going to create a QA GH and will close.

@lschurr
Copy link
Contributor

lschurr commented Sep 5, 2023

All done!

@lschurr lschurr closed this as completed Sep 5, 2023
@sobitneupane
Copy link
Contributor

Requested payment on newDot.

#24008 (comment)

@JmillsExpensify
Copy link

$1,500 approved for payment via NewDot based on BZ 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. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests