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

[Awaiting Checklist] [$500] Chat - Hovering menu option didn't hightlight the icon #28535

Closed
2 of 6 tasks
kbecciv opened this issue Sep 30, 2023 · 36 comments
Closed
2 of 6 tasks
Assignees
Labels
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

@kbecciv
Copy link

kbecciv commented Sep 30, 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 any admin or announce room
  2. Click on three dot menu.
  3. Hover the options
  4. Observer the icon.

Expected Result:

Icon should be highlight when hovering

Actual Result:

Icon is not highlight when hovering

Workaround:

Unknown

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.75.2
Reproducible in staging?: y
Reproducible in production?: new feature
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-09-30.at.11.35.50.mov
Screen.Recording.2023-09-29.at.09.15.25.mov
Screen.Recording.2023-09-29.at.09.13.41.mov
Recording.4804.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01afeb6d58d5ae9d6b
  • Upwork Job ID: 1708126153549336576
  • Last Price Increase: 2023-09-30
  • Automatic offers:
    • hungvu193 | Contributor | 27030886
    • hungvu193 | Reporter | 27030888
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 30, 2023
@melvin-bot melvin-bot bot changed the title Chat - Hovering menu option didn't hightlight the icon [$500] Chat - Hovering menu option didn't hightlight the icon Sep 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 30, 2023

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

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

melvin-bot bot commented Sep 30, 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

@melvin-bot
Copy link

melvin-bot bot commented Sep 30, 2023

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

@kbecciv
Copy link
Author

kbecciv commented Sep 30, 2023

Proposal by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695953603559579

Proposal

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

The icons from threedots menu are not highlight while hovering on it.

What is the root cause of that problem?

We added new UI in our threedots menu and adding new property iconFill to each item:

iconFill: themeColors.icon,

However, in our MenuItem logic, if we has iconFill props, our icon won't change the color when hovering:
fill={
props.iconFill ||
StyleUtils.getIconFillColor(
getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive),
true,
)
}

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

In order to keep the iconFill and still able to change color while hovering, we can add a new props called shouldAcceptHoverState to our MenuItem, if shouldAcceptHoverState is true, we will get the correct fill color for it.

fill={ 
     StyleUtils.getIconFillColorForMenuItem(props.iconFill, shouldAcceptHoverState, props.focused || isHovered, pressed, props.success, props.disabled, props.interactive) || 
     StyleUtils.getIconFillColor( 
         getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive), 
         true, 
     ) 
 } 

getIconFillColorForMenuItem will have similar logic with getIconFillColor (will need to update the color of each state to match the design) but will early return with props.iconFill if shouldAcceptHoverState is false

What alternative solutions did you explore? (Optional)

Remove all the iconFill propperty from our threedotMenus.

@neonbhai
Copy link
Contributor

neonbhai commented Sep 30, 2023

Proposal

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

Hovering menu option didn't hightlight the icon

What is the root cause of that problem?

This threedot menu is rendered by HeaderView:

The MenuItems in PopoverMenu are styled by default. But the styles don't get applied if we pass a static props.iconfill:

fill={
props.iconFill ||
StyleUtils.getIconFillColor(
getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive),
true,
)
}

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

We should remove the static iconfill from the menuItem object here:

const threeDotMenuItems = [];

Why?

This will allow the default styles to be applied:

fill={
props.iconFill ||
StyleUtils.getIconFillColor(
getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive),
true,
)
}

Keeping the popover styles consistent in the app.

Result:

popover.webm

What alternative solutions did you explore? (Optional)

xx

@neonbhai
Copy link
Contributor

Proposal

Updated

Added video implementing solution.

@saranshbalyan-1234
Copy link
Contributor

Proposal

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

Hovering menu option didn't hightlight the icon

What is the root cause of that problem?

fill={
props.iconFill ||
StyleUtils.getIconFillColor(
getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive),
true,
)
}

props.iconFill is not letting other styles apply.

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

fill={
  isHovered || !props.iconFill ? 
    StyleUtils.getIconFillColor(
        getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive),
        true,
    ): props.iconFill
}

This way if the icon is hovered, hovered style will be applied rest normal styles will remain same.

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

@eVoloshchak, @twisterdotcom Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@eVoloshchak
Copy link
Contributor

eVoloshchak commented Oct 4, 2023

@neonbhai's proposal looks good to me!

Other proposals suggest retaining the current color of the icons and changing it only on hover, but that is inconsistent with the rest of the app
For instance, on the workspace page the icons are green by default, changing to white on hover, which is in line with @neonbhai's proposal
image

🎀👀🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

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

@hungvu193
Copy link
Contributor

@eVoloshchak isn't it dupe of my alternative solution?

@eVoloshchak
Copy link
Contributor

My bad @hungvu193, you are correct, I missed the alternative solution (I was viewing your proposal on Slack)

Let's proceed with @hungvu193's alternative solution

🎀👀🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Current assignee @Beamanator is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

📣 @eVoloshchak Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

📣 @hungvu193 🎉 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
Copy link

melvin-bot bot commented Oct 5, 2023

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

Offer link
Upwork job

@Beamanator
Copy link
Contributor

@hungvu193 please hold off on creating a PR for this - I'm starting a discussion related to this internally, will post back here when we're ready to go

@Beamanator
Copy link
Contributor

Thanks for weighing in, I like your reasoning and I agree @twisterdotcom 👍

@hungvu193
Copy link
Contributor

Hey! Sorry for the late chiming in here. I'm slowly returning from parental leave, but I agree that as long as the C+ (here @eVoloshchak) agrees that the original Alternate Solution matches the later proposed on, we should assign the earliest proposer.

There are obviously grey areas here @neonbhai, I understand. One couldn't simply post:

Proposal: Do this
Alternate proposal: Do something else

And essentially cover everything feasible, but in this case at least there doesn't need to be any questioning of it. It would certainly be interesting to understand why @hungvu193 chose the new iconFill solution over removing it, but other than that, I think we can get the PR moving now.

As always, thanks to every contributor involved here - we always hope everything shakes out fairly in the end, but ultimately we have to choose one.

Thanks for your kind feedback 🙏 . Both of my solutions archive the same thing (to make the menu consistent with others menu) so I didn't explain it in my alternative solution, but I'll learn from it next time.

@Beamanator Please let me know if I can create a PR.

@melvin-bot
Copy link

melvin-bot bot commented Oct 14, 2023

@Beamanator @eVoloshchak @twisterdotcom @hungvu193 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@eVoloshchak
Copy link
Contributor

Not overdue
@hungvu193, absolutely, let's get the PR moving along!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @hungvu193 got assigned: 2023-10-05 05:24:04 Z
  • when the PR got merged: 2023-10-16 10:19:41 UTC
  • days elapsed: 7

On to the next one 🚀

@hungvu193
Copy link
Contributor

hungvu193 commented Oct 17, 2023

Just a note, this PR was merged within 1 days (it was held for internal discussion). Incase there's no regression causes by this PR, I think it will be eligible for urgency bonus.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 17, 2023
@melvin-bot melvin-bot bot changed the title [$500] Chat - Hovering menu option didn't hightlight the icon [HOLD for payment 2023-10-24] [$500] Chat - Hovering menu option didn't hightlight the icon Oct 17, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.85-4 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-10-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 Oct 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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] 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.
  • [@twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 24, 2023
@twisterdotcom
Copy link
Contributor

Payment summary:
@eVoloshchak requires payment via Manual Requests - $750
@hungvu193 paid $750 here: https://www.upwork.com/nx/wm/offer/27030886 (Contributor)

@twisterdotcom twisterdotcom removed the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 24, 2023
@twisterdotcom twisterdotcom changed the title [HOLD for payment 2023-10-24] [$500] Chat - Hovering menu option didn't hightlight the icon [Awaiting Checklist] [$500] Chat - Hovering menu option didn't hightlight the icon Oct 24, 2023
@eVoloshchak
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Move all header buttons to overflow menu #27748
  • 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/27748/files#r1370607807
  • 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: this is a purely visual bug, I don't think an additional discussion is necessary
  • Determine if we should create a regression test for this bug.
    Is it easy to test for this bug? Yes
    Is the bug related to an important user flow? Yes
    Is it an impactful bug? No

    While the bug isn't impactful, this is a component every user interacts with at some point, so a small regression test would be beneficial here I think

@eVoloshchak
Copy link
Contributor

Regression Test Proposal

  1. Go to any chat
  2. Click on three-dot menu at the top right
  3. Hover over the options (or long press on mWeb and mobile).
  4. Verify that icons are highlighted when hovering (or long pressing on mWeb and mobile).

Do we agree 👍 or 👎

@twisterdotcom
Copy link
Contributor

Sorted.

@JmillsExpensify
Copy link

$750 payment approved for @eVoloshchak based on this summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

8 participants