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-06-05] [$1000] Disabled cursor is being shown instead of default cursor #19208

Closed
1 of 6 tasks
kavimuru opened this issue May 18, 2023 · 34 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. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented May 18, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open the app and keep the screen size below 800px
  2. Navigate to Settings > Payments > Have Paypal as a payment method
  3. Click on the Paypal account
  4. Hover over Paypal.me and username
  5. You'll notice cursor is disabled

Expected Result:

Default cursor should be shown

Actual Result:

Disabled cursor is being shown

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.16-3
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-05-16.at.8.09.18.PM.mov
Recording.645.mp4

Expensify/Expensify Issue URL:
Issue reported by: @daraksha-dk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684248402352109

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e327fcf150738b2d
  • Upwork Job ID: 1659343886988689408
  • Last Price Increase: 2023-05-18
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 18, 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

@kavimuru
Copy link
Author

Proposal

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

Wrong cursor styling for read-only MenuItem

What is the root cause of that problem?

The root cause of this issue is that we are using disabled={true} with interactive={false} to make a read-only MenuItem. Which adds the extra disabled styles to the component.

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

To fix this, we first need to decide what type of styling is needed when:

  • disabled and interactive are true
  • disabled is true and interactive is false
  • disabled is undefined/false and interactive is false

My suggestion:

(keeping interactive true by default)

  • When interactive is true & disabled is false/undefined => default state with cursor pointer
  • When both disabled & interactive are true => apply disabled styles like cursor disabled (normal scenario for disabled state)
  • When both disabled & interactive are false => Use the default cursor styling. (when data is read-only like Title)
  • When interactive is false & disabled is true => Add a different type of disabled styling like an opacity change (optional)
    These changes will be needed to be done in src/components/MenuItem.js and after making these changes other places where it's being used will need to be updated accordingly.
    by @daraksha-dk

@daraksha-dk
Copy link
Contributor

daraksha-dk commented May 18, 2023

Proposal

#19208 (comment)

I'd like to add the location for this particular instance where disabled prop is being used:

And like I've mentioned in my proposal above, I'll be cleaning up rest of the app as well once the expected behaviour is decided

after making these changes other places where it's being used will need to be updated accordingly.

@kushu7
Copy link
Contributor

kushu7 commented May 18, 2023

Proposal

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

Disabled cursor is being shown instead of default cursor

What is the root cause of that problem?

Its happening because We are using MenuItem here with disabled=true. its adding cursor disabled.

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

<MenuItem
title={this.state.formattedSelectedPaymentMethod.title || ''}
icon={this.state.formattedSelectedPaymentMethod.icon}
description={this.state.formattedSelectedPaymentMethod.description}
wrapperStyle={[styles.pv0, styles.ph0, styles.mb4]}
disabled
interactive={false}
/>

we can set disabled= false. it will make cursor pointer. then we can ovveride it by
adding styles.cursorDefault to wrapperStyle array

What alternative solutions did you explore? (Optional)

None

Result:

Screen.Recording.2023-05-19.at.1.13.54.AM.mov

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label May 18, 2023
@melvin-bot melvin-bot bot changed the title Disabled cursor is being shown instead of default cursor [$1000] Disabled cursor is being shown instead of default cursor May 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

Triggered auto assignment to @miljakljajic (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

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

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

melvin-bot bot commented May 18, 2023

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

@loveheenavasu
Copy link

loveheenavasu commented May 19, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.
A disabled cursor is being shown instead of the default cursor

What is the root cause of that problem?
This is causing a problem because here in MenuItem using disabled which is making the cursor disabled.

What changes do you think we should make in order to solve the problem?
We need to update or remove the disabled prop from the menuItem.

<MenuItem 
     title={this.state.formattedSelectedPaymentMethod.title || ''} 
     icon={this.state.formattedSelectedPaymentMethod.icon} 
     description={this.state.formattedSelectedPaymentMethod.description} 
     wrapperStyle={[styles.pv0, styles.ph0, styles.mb4]} 
     disabled 
     interactive={false} 
 />

When the disabled prop is removed or updated to disabled={false}, it will change that cursor to the pointer.
Then we can change the styles to make it the default cursor.

@melvin-bot
Copy link

melvin-bot bot commented May 19, 2023

📣 @loveheenavasu! 📣
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>

@loveheenavasu
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~016adf33c4f0ca2e1c/

@melvin-bot
Copy link

melvin-bot bot commented May 19, 2023

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

@thesahindia
Copy link
Member

@daraksha-dk's proposal looks good to me!

When interactive is false & disabled is true => Add a different type of disabled styling like an opacity change (optional)

I don't think we need this.

C+ reviewed 🎀👀🎀

cc: @bondydaa

@akshay-bharadva
Copy link

Proposal

Under /settings/payments path for paypal.me MenuItem the not-allowed cursor is being shown instead of default cursor.

Root cause of this problem is that disabled props has been passed to MenuItem component.

To solve this issue we should remove the disabled props this way the cusor will changed to pointer and to show default cursor we should add styles.cursorDefault into wrapperStyle props array. By adding styles.cursorDefault will solve the issue.

@melvin-bot
Copy link

melvin-bot bot commented May 19, 2023

📣 @akshay-bharadva! 📣
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 May 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 19, 2023

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

@melvin-bot melvin-bot bot added the Overdue label May 22, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 22, 2023
@melvin-bot

This comment was marked as duplicate.

@daraksha-dk
Copy link
Contributor

PR is ready for review

cc: @thesahindia @bondydaa

@arielgreen
Copy link
Contributor

@thesahindia @daraksha-dk offers have been sent in Upwork.

@arielgreen arielgreen removed the Bug Something is broken. Auto assigns a BugZero manager. label May 26, 2023
@arielgreen
Copy link
Contributor

Reassigning, OOO tomorrow/Monday

@arielgreen arielgreen added the Bug Something is broken. Auto assigns a BugZero manager. label May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

@Expensify Expensify deleted a comment from melvin-bot bot May 26, 2023
@greg-schroeder
Copy link
Contributor

PR merged and deployed to staging

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 29, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Disabled cursor is being shown instead of default cursor [HOLD for payment 2023-06-05] [$1000] Disabled cursor is being shown instead of default cursor May 29, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.19-7 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-06-05. 🎊

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.

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 May 29, 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:

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

@greg-schroeder
Copy link
Contributor

Payment complete for @daraksha-dk and @thesahindia. All that's left is @thesahindia to complete the checklist.

@thesahindia
Copy link
Member

@greg-schroeder, I tried going through the commit history but couldn't find the PR responsible for this. The problem was in implementation of interactive and disabled props in MenuItem.js. I think the PR responsible is quite old.

For the regression tests here are the steps -

  1. Navigate to Settings > Payments > Add a payment method
  2. Decrease the screen size (the RHN should take the whole screen)
  3. Click on a payment method
  4. Hover over the details at bottom docked popover
  5. Verify that default cursor is being shown

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 5, 2023
@bondydaa bondydaa added Weekly KSv2 and removed Daily KSv2 labels Jun 5, 2023
@greg-schroeder
Copy link
Contributor

Thanks @thesahindia!

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests