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.52k stars 2.88k forks source link

[HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$1000] Convert Workspace Currency Selector to use Push to Page Pattern #25499

Closed grgia closed 1 year ago

grgia 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:

Open Preferences -> Workspaces -> Click on a Workspace -> Settings

image

Change Requested:

Use our push to page pattern for the Currency Selector

Currency Selector Option should follow the same pattern here:

image

Currency Selector Option should display all currency options similar to:

image

The route can be: /workspace/<POLICYID>/settings/currency

NOTE: Must use new SelectionList component

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0161cc8d89702b59ab
  • Upwork Job ID: 1692560522482630656
  • Last Price Increase: 2023-08-18
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 26200412
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @zanyrenney (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)

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~0161cc8d89702b59ab

melvin-bot[bot] commented 1 year ago

Current assignee @zanyrenney is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

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

getusha commented 1 year ago

Proposal

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

This is conversion of a component. to use push to page pattern.

What is the root cause of that problem?

we are using the Picker component.

https://github.com/Expensify/App/blob/60945d9a1953092289764708aa532b0826583400/src/pages/workspace/WorkspaceSettingsPage.js#L141-L148

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

We should use OptionsSelector instead like below

https://github.com/Expensify/App/blob/60945d9a1953092289764708aa532b0826583400/src/pages/iou/IOUCurrencySelection.js#L122-L132

What alternative solutions did you explore? (Optional)

BhuvaneshPatil commented 1 year ago

Proposal

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

Convert workspace currency page to use push to page pattern

What is the root cause of that problem?

New Feature

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

In terms of code -

  1. MenuItemWithTopDescription - description will be "Default Currency", and title will be selected currency.
  2. We need to create new function for getting route based on policyID, and use that for onPress handler above.
  3. We will use Policy.updateGeneralSettings(), and we can always get policy from onyx.

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 1 year ago

Current assignee @zanyrenney is eligible for the NewFeature assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature)

b4s36t4 commented 1 year ago

Proposal

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

Convert Workspace Currency Selector to use Push to Page Pattern

What is the root cause of that problem?

This is more like feature not bug. In Workspace settings page for currency selector we don't use any pages/modes we're using a select component.

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

To solve this we can introduce a new Modal Screen which is same as we use in other pages. Like https://github.com/Expensify/App/blob/f45ddbe78cf00b6a36927aab19422a45cd8a975b/src/components/CountryPicker/CountrySelectorModal.js this and this https://github.com/Expensify/App/blob/310b932d79758aa349a9966b3c29ecd93c50d831/src/components/CountryPicker/index.js pages.

What alternative solutions did you explore? (Optional)

NA

dukenv0307 commented 1 year ago

Proposal

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

Convert Workspace Currency Selector to use Push to Page Pattern

What is the root cause of that problem?

We are using Picker component to select curreny

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

Display curreny option same as the timezone in TimezoneInitialPage

Create a new page with the route as the design

We can subscribe policy with policyID in route param from Onyx to get the current curreny of the WS and then use the same logic same as IOUCurrencySelection to display the select component.

When we select a curreny option we will reuse the old logic to update the the currency of the WS

What alternative solutions did you explore? (Optional)

samh-nl commented 1 year ago

Proposal

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

Convert Workspace Currency Selector to use Push to Page Pattern

What is the root cause of that problem?

We are using the Picker component for allowing the user to select a currency:

https://github.com/Expensify/App/blob/60945d9a1953092289764708aa532b0826583400/src/pages/workspace/WorkspaceSettingsPage.js#L141-L148

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

Instead of duplicating the currency selection functionality we already have on IOUCurrencySelection, we should create a general component CurrencySelection that we can use in both situations.

We should create a new page WorkspaceCurrencySelection and use this component. Additionally, IOUCurrencySelection should be refactored to be a wrapper around this new component.

What alternative solutions did you explore? (Optional)

N/A

thiagobrez commented 1 year ago

@grgia As discussed in the slack thread, I think we should tackle this during the Selection List Refactor - Phase 3

melvin-bot[bot] commented 1 year ago

📣 @abdulrahuman5196 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

abdulrahuman5196 commented 1 year ago

I assume this is taken by callstack by here https://github.com/Expensify/App/issues/25499#issuecomment-1684131636. No PR yet.

melvin-bot[bot] commented 1 year ago

@shawnborton, @thiagobrez, @grgia, @abdulrahuman5196, @zanyrenney Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

thiagobrez commented 1 year ago

@grgia Should we make this weekly?

grgia commented 1 year ago

good shout @thiagobrez, making weekly!

zanyrenney commented 1 year ago

What's the latest here @grgia ?

thiagobrez commented 1 year ago

Hi @zanyrenney I believe she is waiting on me :D

This is on my radar, but haven't got the time to start on it yet. If you need, I can make it a priority and start on it this week

zanyrenney commented 1 year ago

@grgia can you clarify if this should be a daily priority please? Thank you!

thiagobrez commented 1 year ago

FYI @zanyrenney @grgia: started on this today. Will come with updates soon

thiagobrez commented 1 year ago

Update: PR is being reviewed internally

thiagobrez commented 1 year ago

Update: PR is ready to review here: https://github.com/Expensify/App/pull/27861

thiagobrez commented 1 year ago

PR is on hold due to another issue on latest main.

props.currencyList is always coming empty. This breaks the Request Money flow (pressing to change the currency shows an empty list), and also trying to change default currency in a Workspace's settings

I couldn't find if this bug was already reported, so I sent a question here: https://expensify.slack.com/archives/C01GTK53T8Q/p1695976576047759

thiagobrez commented 1 year ago

Still blocked

Not blocked, it was corrupted data on my local storage.

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.83-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-20. :confetti_ball:

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.

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.83-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-20. :confetti_ball:

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.

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.84-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-23. :confetti_ball:

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.

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.84-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-23. :confetti_ball:

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.

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

zanyrenney commented 1 year ago

payment summary

External issue reporter - N/A internal @thiagobrez does not require payment (Contractor) - not paid as contractor @abdulrahuman5196 requires payment offer (Reviewer) - paid $1000.