-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Pay on Thursday 27th May] [IOU] Create Currency Modal, with geolocation and Location permissions #1970
Comments
Hi, I would love to work on this issue! My proposal:
QuestionThe SelectCurrency UI in the picture currently has two sections for the currency selection - Recently Used and All Currencies. Should we use SectionList instead of a FlatList — similar to how I think OptionsList is implemented? |
Hi @rameshhpathak -- thanks for your proposal.
Nice spot. Yeah, that would be preferred. |
Got it. Thanks. Also, have submitted the proposal on job posting under the name Ramesh Pathak. |
Is this being worked on? I can't find a PR for this. |
Hi @iwiznia yeah, I will be submitting PR first thing tomorrow as I'm almost done. |
Hi @rameshhpathak, how are you getting on with this one? Just as an FYI, the deadline for these issues is typically 7 days from when it's assigned. 😊 |
@kadiealexander Hi, sorry! I am resolving the outstanding issues within next half an hour! |
Paid, thanks Ramesh! |
If you haven’t already, check out our contributing guidelines for onboarding!
Context
This issue builds on top of the existing IOU Modal, which was implemented in this PR. The
IOU Amount
step page has already been created and is a controlled component (IOUModal manages its state). The amount step allows users to select the IOU request or bill split amount, depending on how they launched the Modal.We now seek to extend functionality. We want to use a Geolocation library and an existing API to detect the users preferred currency, allowing them to change it manually, too. We also need to implement a permissions library to request location permission from the user if they decide to change their currency, as we will then seek to detect it automatically from then on.
To open the Modal, you can navigate to
localhost:8080/iou/request
ANDlocalhost:8080/iou/split
.You can also launch the IOUModal by temporarily modifying the routes in CreateMenu. Launch the request money flow with
Navigation.navigate(ROUTES.IOU_REQUEST)
and the bill split flow withNavigation.navigate(ROUTES.IOU_BILL)
Mobile & mobile web
Web & Desktop
Deliverables:
GetPreferredCurrency
API and another for callingGetCurrencyList
. Details at the bottom of this post.GetPreferredCurrency
API.js functionGetPreferredCurrency
, else we ignore those query params (as they are optional)GetCurrencyList
matching the currency we received from the previous request to get the correct symbol for that currency. (the full currency list should also be persisted to Onyx via a new key:currencyList
)preferredCurrencyCode
ANDpreferredCurrencySymbol
data in Onyx, similar to how we store the users timezoneMY_PERSONAL_DETAILS
Onyx key:preferredCurrencySymbol
andpreferredCurrencyCode
, setting IOUModal props for both of these (currencySelected
prop should be deleted,selectedCurrency
should be modified to be of type Object:selectedCurrency: { currencyCode: String, currencySymbol: String }
)this.props.selectedCurrency.currencySymbol
GetCurrencyList
via another new Action function and again persisting this data to Onyx under thecurrencyList
key.preferredCurrencyCode
ANDpreferredCurrencySymbol
Onyx dataGetPreferredCurrency API
Example of the API which is used to retrieve the users preferred currency
GetCurrencyList API
Example of the API which returns all supported currency and symbol parings
Original issue: https://github.com/Expensify/Expensify/issues/157871#event-4483831003
Upwork Issue: https://www.upwork.com/ab/applicants/1373765458169090048/job-details
The text was updated successfully, but these errors were encountered: