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-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 opened this issue Aug 18, 2023 · 32 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@grgia
Copy link
Contributor

grgia commented Aug 18, 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:

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
@grgia grgia added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 18, 2023
@grgia grgia self-assigned this Aug 18, 2023
@melvin-bot
Copy link

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

@grgia grgia added the External Added to denote the issue can be worked on by a contributor label Aug 18, 2023
@melvin-bot melvin-bot bot changed the title Convert Workspace Currency Selector to use Push to Page Pattern [$1000] Convert Workspace Currency Selector to use Push to Page Pattern Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

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

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

melvin-bot bot commented Aug 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

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

@getusha
Copy link
Contributor

getusha commented Aug 18, 2023

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.

<Picker
inputID="currency"
label={props.translate('workspace.editor.currencyInputLabel')}
items={currencyItems}
isDisabled={hasVBA}
defaultValue={props.policy.outputCurrency}
hintText={hasVBA ? props.translate('workspace.editor.currencyInputDisabledText') : props.translate('workspace.editor.currencyInputHelpText')}
/>

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

We should use OptionsSelector instead like below

<OptionsSelector
sections={sections}
onSelectRow={confirmCurrencySelection}
value={searchValue}
onChangeText={setSearchValue}
textInputLabel={translate('common.search')}
headerMessage={headerMessage}
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle}
initiallyFocusedOptionKey={initiallyFocusedOptionKey}
shouldHaveOptionSeparator
/>

What alternative solutions did you explore? (Optional)

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Aug 18, 2023

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?

  • Display currency selector as MenuItemWithDescription component, for that on press prop will take to required route.
  • For displaying currency as list, we can take inspiration from IOUCurrencySelectionModal and create a new component that will be visited when we click on currency selection.
  • Create a new component and add <OptionsSelector/>

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)

@grgia grgia added the NewFeature Something to build that is a new item. label Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

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

@grgia grgia removed the Bug Something is broken. Auto assigns a BugZero manager. label Aug 18, 2023
@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 18, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 18, 2023
@dukenv0307
Copy link
Contributor

dukenv0307 commented Aug 18, 2023

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
Copy link
Contributor

samh-nl commented Aug 18, 2023

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:

<Picker
inputID="currency"
label={props.translate('workspace.editor.currencyInputLabel')}
items={currencyItems}
isDisabled={hasVBA}
defaultValue={props.policy.outputCurrency}
hintText={hasVBA ? props.translate('workspace.editor.currencyInputDisabledText') : props.translate('workspace.editor.currencyInputHelpText')}
/>

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
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 18, 2023
@melvin-bot melvin-bot bot added the Weekly KSv2 label Sep 21, 2023
@thiagobrez
Copy link
Contributor

Update: PR is ready to review here: #27861

@thiagobrez
Copy link
Contributor

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
Copy link
Contributor

thiagobrez commented Oct 3, 2023

Still blocked

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

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Convert Workspace Currency Selector to use Push to Page Pattern [HOLD for payment 2023-10-20] [$1000] Convert Workspace Currency Selector to use Push to Page Pattern Oct 13, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 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-10-20. 🎊

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

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-20] [$1000] Convert Workspace Currency Selector to use Push to Page Pattern [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$1000] Convert Workspace Currency Selector to use Push to Page Pattern Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 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-10-20. 🎊

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

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$1000] Convert Workspace Currency Selector to use Push to Page Pattern [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 Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

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

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [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 [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 Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

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

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 20, 2023
@zanyrenney
Copy link
Contributor

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.

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
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 Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

10 participants