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-03] Web - 'Edit' Button in Paypal account name is not highlighted when the cursor comes near to it #23196

Closed
1 of 6 tasks
kbecciv opened this issue Jul 19, 2023 · 15 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jul 19, 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 settings > Payments
  2. Click existing pay pal account name
  3. Observe the section appearing with two options "Edit" and "Delete"

Expected Result:

The 'Edit' button should be highlighted when the cursor comes near to it

Actual Result:

The 'Edit' button is not highlighted when the cursor comes near to it

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.42-21
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

new.BR.41.mp4
Recording.3766.mp4

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

View all open jobs on GitHub

@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 19, 2023
@dukenv0307
Copy link
Contributor

dukenv0307 commented Jul 19, 2023

Proposal

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

'Edit' Button in Paypal accoun name is not highlighted when the cursor comes near to it

What is the root cause of that problem?

The edit button doesn't have success or danger prop

<Button
onPress={this.navigateToAddPaypalRoute}
style={[styles.mb4]}
text={this.props.translate('common.edit')}
/>

That makes it doesn't have hoverStyle

hoverStyle={[
this.props.success && !this.props.isDisabled ? styles.buttonSuccessHovered : undefined,
this.props.danger && !this.props.isDisabled ? styles.buttonDangerHovered : undefined,

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

We should define a hover for normal button that doesn't success or danger button

  1. We can defind a style in styles.js like buttonNormalHovered. The color can be confirmed by design team
buttonNormalHovered: {
    backgroundColor: themeColors.buttonHoveredBG,
    borderWidth: 0,
},
  1. And then here we can add hoverStyle for normal button like this
hoverStyle={[
    !this.props.isDisabled ? styles.buttonNormalHovered : undefined
    this.props.success && !this.props.isDisabled ? styles.buttonSuccessHovered : undefined,
    this.props.danger && !this.props.isDisabled ? styles.buttonDangerHovered : undefined,
    ,
]}

hoverStyle={[
this.props.success && !this.props.isDisabled ? styles.buttonSuccessHovered : undefined,
this.props.danger && !this.props.isDisabled ? styles.buttonDangerHovered : undefined,

What alternative solutions did you explore? (Optional)

If we only want to add hover style for some buttons, we can add an extra prop in Button component like shouldShowHoverStyle.

And add a condition here to control hover style with this prop

hoverStyle={[
    !this.props.isDisabled && this.props.shouldShowHoverStyle ? styles.buttonNormalHovered : undefined
    this.props.success && !this.props.isDisabled ? styles.buttonSuccessHovered : undefined,
    this.props.danger && !this.props.isDisabled ? styles.buttonDangerHovered : undefined,
    ,
]}

hoverStyle={[
this.props.success && !this.props.isDisabled ? styles.buttonSuccessHovered : undefined,
this.props.danger && !this.props.isDisabled ? styles.buttonDangerHovered : undefined,

And then with each button that we want to add hover style, we can pass shouldShowHoverStyle to active hover style for this.

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 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

@hungvu193
Copy link
Contributor

hungvu193 commented Jul 20, 2023

Incase this is considered as a bug, please let me know I'll create a PR to fix it since it's regression from my previous PR:
#22620
@zanyrenney

@dukenv0307
Copy link
Contributor

We have another issue about hover style of normal button #22658

@hungvu193
Copy link
Contributor

Seems it's dupe of #22658

@Yokabdk
Copy link

Yokabdk commented Jul 20, 2023

@duken0307 @hungvu193 The issue #22658 is only about cancel button for Bank account modal, and for Delete workspace and Remove members. This issue is about the 'Edit' Button. You can see the discussion for better clarification.

@dukenv0307
Copy link
Contributor

The root cause is the same and we can fix it easy in a single PR.

@melvin-bot melvin-bot bot added the Overdue label Jul 24, 2023
@DanutGavrus
Copy link
Contributor

DanutGavrus commented Jul 24, 2023

This Proposal comes from my alternative solution on July 11 on another issue.

Proposal

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

Web - 'Edit' Button in Paypal account name is not highlighted when the cursor comes near to it

What is the root cause of that problem?

The 'Edit' button does not use the default hovered style, and is neither success nor danger(which would set their own hovered styles), so it gets no hovered style applied.

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

{isPayPalMeSelected && (
<Button
onPress={this.navigateToAddPaypalRoute}
style={[styles.mb4]}
text={this.props.translate('common.edit')}
/>
)}
<Button
onPress={() => {
this.setState({
showConfirmDeleteContent: true,
});
}}
style={[shouldShowMakeDefaultButton ? styles.mt4 : {}]}
text={this.props.translate('common.delete')}
danger
/>

We should update the first button to:

<Button 
   onPress={this.navigateToAddPaypalRoute} 
   style={[styles.mb4]} 
   text={this.props.translate('common.edit')}
   shouldUseDefaultHover
/> 

This will work after this PR gets merged, or I could handle this issue as part of that PR too (@Yokabdk).

@zanyrenney
Copy link
Contributor

Very similar issue - #22658 (comment) i suspect that issue might fix this one, asked @conorpendergrast for his thoughts as the BZ assignee.

@zanyrenney
Copy link
Contributor

zanyrenney commented Jul 26, 2023

We can put that in the PR for compliment since we only need one line code.

CLosing this in favour of that earlier issue where this can be tackled - as said above, it can be included in that PR seeing as it is just one line of code.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 27, 2023
@melvin-bot melvin-bot bot changed the title Web - 'Edit' Button in Paypal account name is not highlighted when the cursor comes near to it [HOLD for payment 2023-08-03] Web - 'Edit' Button in Paypal account name is not highlighted when the cursor comes near to it Jul 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.46-2 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-03. 🎊

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

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 Jul 27, 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:

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

@Yokabdk
Copy link

Yokabdk commented Aug 11, 2023

@zanyrenney is this issue has still payment for contributing? I got confused because of melvin-bot's awaiting payment reminder.

@DanutGavrus
Copy link
Contributor

@Yokabdk For context: this issue was found while fixing #22658, and we have fixed it in the same PR #23464. The payment for the other issue was made.

I don't know if the guides would imply any payment for reporting/fixing this one, thinking @zanyrenney knows better!

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. Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants