-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2021-11-05] Payments - add a fill background to "Add new payment method" #5915
Comments
Triggered auto assignment to @Beamanator ( |
Triggered auto assignment to @sylveawong ( |
Proposal
combinedPaymentMethods.push({
type: MENU_ITEM,
title: this.props.translate('paymentMethodList.addPaymentMethod'),
icon: Plus,
onPress: e => this.props.onPress(e),
key: 'addPaymentMethodButton',
disabled: this.props.isLoadingPayments,
// ↓↓↓ THIS KEY ADDEDD
wrapperStyle: this.props.isShowAddPaymentMenuVisible && styles.switchInactive,
});
And of course I'll add new props to propTypes. Edit: |
Hmm I'd like to get confirmation from @sylveawong that this is actually something we want to implement, before reviewing proposals. If it's something we'll fix / work on, I'll definitely mark this @sylveawong it looks like this issue is proposing to give the "Add payment method" button a gray background when it is selected (a.k.a. when the user is choosing what type of payment method to add). A few questions for you:
If you prefer, I can bring up this conversation in the Slack thread where this improvement was proposed 🤷 let me know! |
Correct @Beamanator. There are other parts of the app that follow this Design pattern. Add secondary login (add a phone number) on the profile page. If we want to change this here. We should Update that part as well. |
sorry! going to remove myself and @shawnborton / @michelle-thompson so they can get to this first! |
I think we can just have it maintain its :hover state when it's actively showing a dropdown. Let me know if that makes sense. |
Yeah that makes sense - the current styles we apply on hover, we'll now apply whenever it's "active" (when it gets clicked) |
@parasharrajat I see what you mean, the "Add secondary login" button is quite similar to "Add payment method", but the "Add secondary login" button opens a new route (/settings/addlogin/phone) while "Add payment method" just opens a dropdown. I think it's fine to keep these different for the moment, what do you think @shawnborton ? |
ProposalThis is the style method we use to set background in Lines 2334 to 2338 in dd9e492
We can pass App/src/pages/settings/Payments/PaymentMethodList.js Lines 130 to 136 in dd9e492
wrapperStyle: this.props.isAddPaymentMenuActive ? [getButtonBackgroundColorStyle(CONST.BUTTON_STATES.ACTIVE)] : [],
iconFill: this.props.isAddPaymentMenuActive ? getIconFillColor(CONST.BUTTON_STATES.ACTIVE) : null, And pass it along below, App/src/pages/settings/Payments/PaymentMethodList.js Lines 153 to 155 in a142eb2
And pass prop, isAddPaymentMenuActive={this.state.shouldShowAddPaymentMenu} along with below lines App/src/pages/settings/Payments/PaymentsPage.js Lines 127 to 129 in e69f603
For Button state: CONST.BUTTON_STATES.ACTIVEFor Button state: CONST.BUTTON_STATES.PRESSED@shawnborton which looks good? cc: @Beamanator |
Forgot to attach the result for my proposal Screen.Recording.2021-10-19.at.7.08.49.AM.mov |
Triggered auto assignment to @bfitzexpensify ( |
Unassigning design team since decision was made here, removing |
@shawnborton I just noticed this button technically has 3 states:
Here's a vid showing all 3 - which do you prefer keeping when the menu is active? Also do we care about the Screen.Recording.2021-10-19.at.5.12.14.PM.mov |
Upwork posting |
Hmm good find @Beamanator I think the :active state probably makes the most sense since the row is kind of "active" while the dropdown is shown. Thoughts? |
Yeah I agree, I think "active" - also making sure the @Santhosh-Sellavel @kakajann can you both please update your proposals to include keeping the |
@Beamanator updated now! |
That's how I would solve this anyway) as @Santhosh-Sellavel did. |
Thanks for the swift responses guys! @Santhosh-Sellavel I will give this job to you, i like your use of existing style methods like
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.11-1 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 2021-11-05. 🎊 |
Paid @Santhosh-Sellavel today since this falls on a weekend. Included reporting and |
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:
Expected Result:
There should be a grey background the the payment methods menu is open.
Actual Result:
Background stays white.
Workaround:
None needed, visual issue.
Platform:
Where is this issue occurring?
Version Number: 1.1.8-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @Santhosh-Sellavel
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1634144802229400
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: