Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.89k forks source link

DEV: Console warning at payments page #20316

Closed kavimuru closed 1 year ago

kavimuru commented 1 year ago

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. Open the app
  2. Go to settings > Payments
  3. Click on a payment method
  4. Check console

Expected Result:

There shouldn't be any console warning

Actual Result:

We get a console warning

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?

Version Number: DEV Reproducible in staging?: N/A Reproducible in production?: N/A 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

https://github.com/Expensify/App/assets/43996225/7fe86741-df66-4bb3-98fd-3d200e228ba1

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

View all open jobs on GitHub

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

kavimuru commented 1 year ago

Proposal by @daraksha-dk

Proposal

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

Console warning at payments page

What is the root cause of that problem?

It's happening when the value for shouldShowMakeDefaultButton is false, resulting false being passed to style prop which will cause warning.

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

To fix this, we can either update style's propType definition to accept boolean values or we can just update this line like below:

                   style={shouldShowMakeDefaultButton ? [styles.mt4] : undefined}

What alternative solutions did you explore? (Optional)

We can update the definition to include boolean here and use stylePropTypes here

dhairyasenjaliya commented 1 year ago

@JmillsExpensify this issue is a dupe and already fixed here https://github.com/Expensify/App/pull/20117 and this can be closed

JmillsExpensify commented 1 year ago

Thank you! I wasn't able to reproduce any console errors on the latest, so I do think we're good here. Please re-open if I've missed something.