App icon indicating copy to clipboard operation
App copied to clipboard

[$500] [Feature Request]Currency selection screen should have "Recents" at top

Open kavimuru opened this issue 1 year ago β€’ 20 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.29-0 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 Expensify/Expensify Issue URL: Issue reported by: @shawnborton Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1705664342497829

Action Performed:

Go to change the currency on a an expense

Expected Result:

We have a list selection pattern where the current selected item is at the top, and we have a section for recents underneath that. I would expect currency selection to work the same.

Actual Result:

There is no section for recents, and your currently selected item is not at the top.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence Snip - (2) New Expensify - Google Chrome

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01964421591b4aea1b
  • Upwork Job ID: 1750537225734946816
  • Last Price Increase: 2024-01-25

kavimuru avatar Jan 22 '24 12:01 kavimuru

Triggered auto assignment to @zanyrenney (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.

melvin-bot[bot] avatar Jan 22 '24 12:01 melvin-bot[bot]

  • I am happy to work on this if it is external

Proposal

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

  • [Feature Request]Currency selection screen should have "Recents" at top

What is the root cause of that problem?

  • NA

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

  • We can do it as we did with category field. Here is the main steps:
  1. Create a Onyxkey to store the recently used currency, named ONYXKEYS.COLLECTION.POLICY_RECENTLY_USED_CURRENCIES, need to be stored in BE as well
  2. Listen to the above onyx, and add it to to sections data below: https://github.com/Expensify/App/blob/f3111a472b72c475a89703fce4cdde4fdd75d42f/src/pages/iou/request/step/IOURequestStepCurrency.js#L134
  3. Once we create a money request, beside the update from BE side, we need to update the ONYXKEYS.COLLECTION.POLICY_RECENTLY_USED_CURRENCIES as we did with categories: https://github.com/Expensify/App/blob/f3111a472b72c475a89703fce4cdde4fdd75d42f/src/libs/actions/IOU.js#L410-L416
  4. Once we update the IOU`s currency, beside the update from BE side, update recently used currencies if the currency is changed as we did with categories: https://github.com/Expensify/App/blob/f3111a472b72c475a89703fce4cdde4fdd75d42f/src/libs/actions/IOU.js#L1058-L1068

What alternative solutions did you explore? (Optional)

  • NA

DylanDylann avatar Jan 22 '24 21:01 DylanDylann

Yep, this looks like it should be external to me. adding the label though!

zanyrenney avatar Jan 25 '24 15:01 zanyrenney

Job added to Upwork: https://www.upwork.com/jobs/~01964421591b4aea1b

melvin-bot[bot] avatar Jan 25 '24 15:01 melvin-bot[bot]

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

melvin-bot[bot] avatar Jan 25 '24 15:01 melvin-bot[bot]

@getusha what do you think of the proposal from @DylanDylann ?

zanyrenney avatar Jan 26 '24 12:01 zanyrenney

@DylanDylann is it possible to implement this future without having to create a new Onyx key?

getusha avatar Jan 26 '24 12:01 getusha

@getusha I think it needs to be stored in BE as well so cannot implement without creating new Onyxkey.

DylanDylann avatar Jan 26 '24 13:01 DylanDylann

Probably adding a new key to the currency object will be ideal? Pulling internal engineer to take a look at this πŸŽ€ πŸ‘€ πŸŽ€

getusha avatar Jan 26 '24 13:01 getusha

Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Jan 26 '24 13:01 melvin-bot[bot]

@thienlnam What do you think about this comment?

DylanDylann avatar Jan 26 '24 15:01 DylanDylann

Yeah, if we're adding recently selected for currency selection we'll likely want another onyx key for consistency with the other recently used items. There's also a few BE changes we'll also need to make to support this update.

Though instead of keying this by policy, we should probably just create a general recentlyUsedCurrencies field for the account - currency selection is typically user-centric and independent of individual policy constraints

thienlnam avatar Jan 29 '24 05:01 thienlnam

@zanyrenney Could you see which wave this would fit in to see if we should work on this now or not?

thienlnam avatar Jan 29 '24 05:01 thienlnam

sure thing! i think this should be in wave6 but I will drop it in for greg to make a call.

zanyrenney avatar Jan 29 '24 12:01 zanyrenney

https://expensify.slack.com/archives/C02MW39LT9N/p1706530608517779

zanyrenney avatar Jan 29 '24 12:01 zanyrenney

We can proceed with @DylanDylann's proposal, i think we should first complete the backend changes first @thienlnam?

getusha avatar Jan 31 '24 10:01 getusha

Yup, we'll need to do that first - let me see if someone else is interested is taking these changes on

thienlnam avatar Jan 31 '24 18:01 thienlnam

find anyone interested in taking on the changes @thienlnam

zanyrenney avatar Feb 05 '24 17:02 zanyrenney

?

zanyrenney avatar Feb 05 '24 17:02 zanyrenney

You're looking at him! πŸ˜† I'll get the internal changes up later this week

thienlnam avatar Feb 06 '24 23:02 thienlnam

woo thanks @thienlnam please update the issue with your progress πŸŽ‰

zanyrenney avatar Feb 09 '24 18:02 zanyrenney

Got started on a draft PR - looks like we haven't been storing this anywhere since we always rely on the user's current location

Currently going through all the places that a currency could be used - scan / create / update and then adding tests

thienlnam avatar Feb 13 '24 00:02 thienlnam

Nice, thanks for the update @thienlnam can you let me know how your progress is going now?

zanyrenney avatar Feb 15 '24 19:02 zanyrenney

Bump @thienlnam how you going here?

zanyrenney avatar Feb 16 '24 15:02 zanyrenney

Haven't made any new updates here - been working on Track Expense. Will likely get back to this next week

thienlnam avatar Feb 16 '24 19:02 thienlnam

waiting on @thienlnam - changing to make him owner until its able to be prioritised as there is nothing I or @getusha can do for now until then.

zanyrenney avatar Feb 19 '24 14:02 zanyrenney

@thienlnam, @zanyrenney, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Feb 20 '24 15:02 melvin-bot[bot]

@thienlnam is OOO, will get back to this when he returns.

getusha avatar Feb 20 '24 15:02 getusha

Not sure where you got that from @getusha - i checked internally @thienlnam isn't OOO yesterday πŸ˜…

zanyrenney avatar Feb 21 '24 15:02 zanyrenney

@thienlnam can you please update this issue with your work / what the latest update is.

zanyrenney avatar Feb 21 '24 15:02 zanyrenney