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

[WAITING ON SOBIT - CHECKLIST] [$250] Selected row in onboarding modal should not get :hover style #44055

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 20, 2024 · 53 comments
Closed
1 of 6 tasks
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

@m-natarajan
Copy link

m-natarajan commented Jun 20, 2024

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: 1.4.86-0
Reproducible in staging?: y
Reproducible in production?: y
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
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1718816345646859

Action Performed:

  1. Sign up for a new account
  2. In the onboarding modal, select an option
  3. Hover over the selected option

Expected Result:

Selected row should not get a hover style

Actual Result:

Selected row changes BG color on hover

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

CleanShot.2024-06-28.at.16.12.11.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ffaa9b43dacb7a8a
  • Upwork Job ID: 1806378179434309152
  • Last Price Increase: 2024-07-04
  • Automatic offers:
    • truph01 | Contributor | 103133129
Issue OwnerCurrent Issue Owner: @mallenexpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 20, 2024
Copy link

melvin-bot bot commented Jun 20, 2024

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

@truph01
Copy link
Contributor

truph01 commented Jun 20, 2024

Proposal

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

  • Selected row in onboarding modal should not get :hover style

What is the root cause of that problem?

  • We always display the hover style if the item is hovered without considering if it is selected or not:
    isHovered && interactive && !pressed && styles.hoveredComponentBG,

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

  • We should remove:

isHovered && interactive && !pressed && styles.hoveredComponentBG,

which used to fix issue.

  • Then fix that issue by adding
                        hoverAndPressStyle={[styles.hoveredComponentBG]}

to:

<MenuItemWithTopDescription

   <MenuItem hoverAndPressStyle={props.hoverAndPressStyle ?? styles.hoveredComponentBG ...
            focused: isSelected,
            style: [styles.purposeMenuItem],
            hoverAndPressStyle: [styles.hoveredComponentBG]

to fix our main issue.

What alternative solutions did you explore? (Optional)

                                        isHovered && interactive && !focused && !pressed && styles.hoveredComponentBG,

then add:

    focused: isSelected

to:

@neonbhai
Copy link
Contributor

Proposal

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

Onboarding modal uses incorrect row hover style when hovering over the options

What is the root cause of that problem?

There are two problems:

  • The hoverStyle is being passed incorrectly here

  • The MenuItem styles here applied in the wrong order.

    Current order applies hover style after the active button style giving us this behavior:

    Video (hover applied after active style)
    Screen.Recording.2024-06-20.at.12.14.03.PM.mp4

Additionally:

This order effectively prevents us from seeing the pressed style for menuItem as defined here:

App/src/styles/utils/index.ts

Lines 1320 to 1321 in 7561439

case CONST.BUTTON_STATES.PRESSED:
return {backgroundColor: theme.buttonPressedBG};

Which gives us this tactile feedback when pressing:

Video
Screen.Recording.2024-06-20.at.12.17.43.PM.mov

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

  • change this line to:

    hoverAndPressStyle: [styles.hoveredComponentBG],
  • Move this style:

    StyleUtils.getButtonBackgroundColorStyle(getButtonState(focused || isHovered, pressed, success, disabled, interactive), true),

    after this line:
    !focused && (isHovered || pressed) && hoverAndPressStyle,

    --  StyleUtils.getButtonBackgroundColorStyle(getButtonState(focused || isHovered, pressed, success, disabled, interactive), true),
        ...(Array.isArray(wrapperStyle) ? wrapperStyle : [wrapperStyle]),
        !focused && (isHovered || pressed) && hoverAndPressStyle,
    ++  StyleUtils.getButtonBackgroundColorStyle(getButtonState(focused || isHovered, pressed, success, disabled, interactive), true),

Alternatively

If we don't want feedback on active press we can add a check for !isMenuItem here

@truph01
Copy link
Contributor

truph01 commented Jun 20, 2024

Updated proposal

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

@shawnborton, @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

@shawnborton
Copy link
Contributor

@mallenexpensify can you please review this when you get a moment? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jun 25, 2024
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 27, 2024
@melvin-bot melvin-bot bot changed the title Onboarding modal uses incorrect row hover style when hovering over the options [$250] Onboarding modal uses incorrect row hover style when hovering over the options Jun 27, 2024
Copy link

melvin-bot bot commented Jun 27, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 27, 2024
Copy link

melvin-bot bot commented Jun 27, 2024

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

@mallenexpensify
Copy link
Contributor

@sobitneupane , 👀 on the above proposals plz? Please keep in mind at @truph01 's proposal had been updated many times

image

@truph01
Copy link
Contributor

truph01 commented Jun 27, 2024

@mallenexpensify Yeah, my last update time was 3:04 PM, and then I commented "Proposal Updated" at 3:10 PM as mentioned in the contributor guides.

@mallenexpensify
Copy link
Contributor

@truph01 , yes, please continue to post 'proposal updated' when you do. I was referencing that updates were made over a handful of hours which might affect consideration of other proposals if they were submitted within that time.

@sobitneupane
Copy link
Contributor

@shawnborton Looks like the issue is not reproducible any longer.

Screen.Recording.2024-06-28.at.13.37.59.mov

@shawnborton
Copy link
Contributor

Interesting, if that's the case, we can just close this. Let me test quickly as well...

@shawnborton
Copy link
Contributor

Indeed it looks fixed. But let me ask a follow up question for the @Expensify/design team - should we make it so that the row that has the :active/:selected state should not get a hover BG? I think yes? But I don't feel too strongly. I think our existing patterns in the app make it so that anything that has a selected state doesn't get a hover BG color (like LHN items for instance).

@dannymcclain
Copy link
Contributor

Yes 100% agree on that point Shawn. It's weird for the selected item to go from heavily emphasized to not-as-emphasized on hover.

@shawnborton
Copy link
Contributor

Okay cool, I'll go ahead and modify the title + body, and maybe we can take a new round of proposals here?

@shawnborton shawnborton changed the title [$250] Onboarding modal uses incorrect row hover style when hovering over the options [$250] Selected row in onboarding modal should not get :hover style Jun 28, 2024
@truph01
Copy link
Contributor

truph01 commented Jun 28, 2024

Proposal updated

  • I updated alternative solution.

@truph01
Copy link
Contributor

truph01 commented Jun 28, 2024

Proposal updated

  • I updated main solution.

@sobitneupane
Copy link
Contributor

Thanks for the update @truph01

Your alternative solution looks good to me but I believe we would want that behavior throughout the app not only in onboarding modal. Maybe we can use existing props in MenuItem instead of passing isSelected prop.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 26, 2024
@melvin-bot melvin-bot bot changed the title [$250] Selected row in onboarding modal should not get :hover style [HOLD for payment 2024-08-02] [$250] Selected row in onboarding modal should not get :hover style Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 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 2024-08-02. 🎊

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

Copy link

melvin-bot bot commented Jul 26, 2024

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.
  • [@mallenexpensify] 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 Aug 1, 2024
@mallenexpensify mallenexpensify removed their assignment Aug 1, 2024
@mallenexpensify mallenexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 1, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

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

@mallenexpensify mallenexpensify self-assigned this Aug 1, 2024
@mallenexpensify
Copy link
Contributor

@jliexpensify I'm off til Monday afternoon, can you help with payment here? Thx

@jliexpensify
Copy link
Contributor

Payment Summary

Waiting on checklist

@jliexpensify
Copy link
Contributor

Paid and job closed. @sobitneupane bump for checklist!

@jliexpensify jliexpensify changed the title [HOLD for payment 2024-08-02] [$250] Selected row in onboarding modal should not get :hover style [WAITING ON SOBIT - CHECKLIST] [$250] Selected row in onboarding modal should not get :hover style Aug 3, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 5, 2024
@sobitneupane
Copy link
Contributor

sobitneupane commented Aug 5, 2024

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:

#43987

  • [@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/43987/files#r1703875086

  • [@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:

I don't think any new update is required.

  • [@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.

#44055 (comment)

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Sign up for a new account
  2. In the onboarding modal, select an option
  3. Hover over the selected option
  4. Verify that the selected option does not get hover style.

Do we agree 👍 or 👎

Copy link

melvin-bot bot commented Aug 5, 2024

@shawnborton, @mallenexpensify, @sobitneupane, @jliexpensify, @marcaaron, @truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@marcaaron
Copy link
Contributor

LGTM @sobitneupane

@mallenexpensify
Copy link
Contributor

@garrettmknight
Copy link
Contributor

$250 approved for @sobitneupane based on this 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
No open projects
Status: Done
Development

No branches or pull requests

10 participants