Closed m-natarajan closed 4 months ago
Triggered auto assignment to @miljakljajic (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Job added to Upwork: https://www.upwork.com/jobs/~01726365c65211c39c
Platforms
in OP are โ
)Currency list for request money/send money not up to date
There is inconsistency about how to show text in the list 1) In Request money https://github.com/Expensify/App/blob/12d366931012b0092b924b688924726930398ac4/src/pages/iou/IOUCurrencySelection.js#L99 2) In selecting the default currency for the workspace https://github.com/Expensify/App/blob/12d366931012b0092b924b688924726930398ac4/src/pages/workspace/WorkspaceSettingsCurrencyPage.js#L58 Above use the concept of https://github.com/Expensify/App/blob/12d366931012b0092b924b688924726930398ac4/src/pages/workspace/WorkspaceSettingsCurrencyPage.js#L34
We should implement the same logic as we implemented in selecting the default currency for the workspace, i.e., 2 points above
if we go with the second option
We have to also update the following things in
BaseTextInputWithCurrencySymbol.js
with
const currencySymbol = props.currencyList[props.selectedCurrencyCode].symbol;
and currencyList will be passed as
export default compose(
withOnyx({
currencyList: {key: ONYXKEYS.CURRENCY_LIST},
}),
)(BaseTextInputWithCurrencySymbolWithRef);
NA
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik (External
)
Currency list for request money/send money not upto date
here we are using getLocalizedCurrencySymbol
to get Currency symbol, which uses Locale
, defines which Symbol to use based on locality. for example for the US Dollar, the symbol is "$" if the default locale is the US, while for other locales it may be "US$". If no symbol can be determined, the ISO 4217 currency code is returned.
In workspaces
we are using the ISO 4217 list to determine the Currency symbol so it contains all Standard currency symbols.
here we replace getLocalizedCurrencySymbol
with this
CurrencyUtils.getCurrencySymbol(currencyCode)
Note: if we implement this then we lose Locale currency symbol
In workspace
we can update to use getLocalizedCurrencySymbol
to get the currency symbol.
or
If we won't get the Currency symbol from getLocalizedCurrencySymbol
and rather than returning CurrencyCode
, we can add a fallback to CurrencySymbol
from CurrencyList
.
Currency list for request money/send money not upto date. Missing currency symbols
We have inconsistency in the code at both locations where currency with symbols are being placed:
use the workspace settings method we will get the same results i.e currency code with symbols
N/A
Currency list for request money/send money not upto date
It causes the consistency
we had both functions to get normal symbol and localized symbol https://github.com/Expensify/App/blob/b38171d0374d52e49ac5131363f920c48ea36eb7/src/libs/CurrencyUtils.ts#L45 and https://github.com/Expensify/App/blob/b38171d0374d52e49ac5131363f920c48ea36eb7/src/libs/CurrencyUtils.ts#L56
First, we need to confirm that we should use normal or localized symbols. And then use that function in the both places to avoid consistency
Updated:
We should use getCurrencySymbol instead of in both places
@shawnborton
It causes the consistency. So we need to confirm that we should use a normal or localized symbol for both places? Could you help to give a suggestion from UX perspective? cc @miljakljajic
Can you show me an image with a difference between the two?
I think I lean towards having a local symbol, or however is most common to show that symbol before a numerical amount.
@shawnborton This is the difference
This is localized symbol
This is a normal symbol
@shawnborton waiting for your input. about what kind of symbol is preferable for currency
Hmm @JmillsExpensify @trjExpensify @Expensify/design do you have a strong opinion? The "normal symbol" from above feels nicer to me.
I have a suggestion as I mentioned https://github.com/Expensify/App/issues/29822#issuecomment-1767118931 We will use localized symbol in general but if it returns currency code (i.e. no currency symbol returned) then we can use standard symbol as a fallback, so this will make local symbol served based on the location and rare/(not in localized currency list ) too get standard symbol from curreny list
+1 to the "Normal"
@robertKozik Updated proposal
@miljakljajic, @robertKozik Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
I don't have a strong preference in the picker, but if we use the "normal" symbol, does that mean that someone not in the US can't distinguish between USD and CAD on a request sent to them for example?
I'm trying to reconcile why we have two different currency lists being used in the first place, and this "local" solution to me sounds like it was something to do with this:
here we are using getLocalizedCurrencySymbol to get Currency symbol, which uses Locale, defines which Symbol to use based on locality. for example for the US Dollar, the symbol is "$" if the default locale is the US, while for other locales it may be "US$". If no symbol can be determined, the ISO 4217 currency code is returned.
So my question is whether this has a wider impact on where we show a currency symbol in the app, not just the pickers shown here.
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@miljakljajic, @robertKozik Huh... This is 4 days overdue. Who can take care of this?
@shawnborton @dubielzyk-expensify Could you help to check this comment https://github.com/Expensify/App/issues/29822#issuecomment-1775789973 ? And then decide the final decision
I was referring to the picker only. If changing it to "normal" in the picker has wider ramifications, then I'd say use localized symbol. @shawnborton will know this area better though
Hmm this is a good point:
does that mean that someone not in the US can't distinguish between USD and CAD on a request sent to them for example?
At the same time, if you are local to Canada and you see just a $, wouldn't you be used to that and assume it's local currency?
@miljakljajic, @robertKozik 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@trjExpensify @shawnborton @dubielzyk-expensify Could you guys help to confirm our final decision?
If this is for the picker only let's go with the simplified symbol due to it having the full currency next to it. So number 2
in this comment. If this becomes an issue we'll fix it.
Sorry folks, I was out for a few days last week.
@trjExpensify @shawnborton @dubielzyk-expensify Could you guys help to confirm our final decision?
I don't think the question from earlier was answered @DylanDylann. Can you confirm this change only impacts the display of the currencies in the currency pickers? If not, can the proposal show the impact of these changes proposed where currency symbols are displayed in the product holistically. I.e on a request, in an expense/iouReport preview, the expense/iouReport header, payment button etc.
@trjExpensify
So my question is whether this has a wider impact on where we show a currency symbol in the app, not just the pickers shown https://github.com/Expensify/App/issues/29822#issuecomment-1772048930.
My solution will make change only be in 2 pickers here and there are no impact on other places
Perfect, then let's go with #2 then as the preference for the display in the pickers. ๐
@robertKozik We discussed and decided to display normal symbol in the picker. Could you help to take a look at my proposal https://github.com/Expensify/App/issues/29822#issuecomment-1769865854 ?
We have to also update if we go with the normal symbol https://github.com/Expensify/App/blob/6389c2d47b3bd21ab6cd9547e510721593d645d3/src/components/TextInputWithCurrencySymbol/BaseTextInputWithCurrencySymbol.js#L11 with
const currencySymbol = props.currencyList[props.selectedCurrencyCode].symbol;
and currencyList will be passed as
export default compose(
withOnyx({
currencyList: {key: ONYXKEYS.CURRENCY_LIST},
}),
)(BaseTextInputWithCurrencySymbolWithRef);
Thus updating my proposal https://github.com/Expensify/App/issues/29822#issuecomment-1767047432
Hi, If we decided on #2 then, you can consider my proposal https://github.com/Expensify/App/issues/29822#issuecomment-1767118931
@miljakljajic @robertKozik this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@miljakljajic, @robertKozik 10 days overdue. Is anyone even seeing these? Hello?
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@miljakljajic, @robertKozik 12 days overdue. Walking. Toward. The. Light...
@robertKozik any thoughts on @Charan-hs 's proposal?
@miljakljajic @robertKozik In my proposal https://github.com/Expensify/App/issues/29822#issuecomment-1767047432 I implemented something which I was not aware that there is same function exists for that in that file , :) new to the codebase. Thanks @Charan-hs for putting that function . I will be happy no matter who's proposal is selected.
@robertKozik a new issue was just opened that looks mighty similar to this one. What do you think, are they the same issue? https://github.com/Expensify/App/issues/30595
I think that's a dupe @sonialiap!
@miljakljajic @robertKozik this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@robertKozik We confirmed the final decision here. Could you help to take a look at proposals?
@miljakljajic, @robertKozik Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Sorry for the delay in there. I believe that it's not a dupe. It's very similar issue but it refers different screen - In my opinion each screen should be referenced separately as there is a possibility that we would want to treat them differently.
As I see in this case we landed on sticking to non-localized version of currency symbol. With this in mind I believe the first proposal to align with selected behaviour is the one from @Charan-hs. It was the first one to propose changing both IOU selector and workspace screen to the non-localised currency.
๐ ๐ ๐ C+ reviewed
Triggered auto assignment to @cead22, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@robertKozik In my proposal, I suggest we should update to use getCurrencySymbol in both places to make it consistency in both places. In @Charan-hs's proposal we only use getCurrencySymbol in IOUCurrencySelection.js and retain old logic in WorkspaceSettingsCurrencyPage.js, It will make inconsistency in some cases. What do you think about this point? One more thing, besides spending time proposing solution, I also spend time to follow and support internal team to make correct decision
I greatly appreciate your support and your participation in the ongoing discussion about the expected behavior. However, I had to choose the proposal solely based on its merits. The selected proposal suggests the same approach as yours, and it also mentions changes within the workspace settings page in the alternative solutions section:
In workspace we can update to use getLocalizedCurrencySymbol to get the currency symbol.
I'm a little confused about this issue, because the root cause of the problem sounds like desired behavior to me: we should use the localized version of currency symbols.
Moreover, I don't know if the proposal does this, but it should also consider the behavior of other currency selectors and ideally make them all consistent, unless there are good reasons for having different behavior.
That said, I think it's possible this issue will be solved by the proposal presented for this issue https://github.com/Expensify/App/issues/29618#issuecomment-1785638160 which is to
make a new component: CurrencySelectionList based on the currency selection list of the IOU Request and use it in IOU request and in the workspace default currency setting.
So I suggest we put this issue on HOLD until that other one is resolved
Sorry for the delay in there. I believe that it's not a dupe. It's very similar issue but it refers different screen - In my opinion each screen should be referenced separately as there is a possibility that we would want to treat them differently.
I think what I'm saying is in disagreement with this, and we should start thinking more holistically about the whole product and all the screens, and only have different behavior when we've identified a good reason to treat them differently, and not based on the possibility that we want to treat them differently.
Given that, I suggest we close this issue https://github.com/Expensify/App/issues/30595, or at minimum, put it on hold
I agree @cead22 - @sonialiap with that in mind do you want to close out your issue? We can put this one on hold until #29618 is resolved.
If you havenโt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.85-1 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: @dhanashree-sawant Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697535573916749
Action Performed:
Expected Result:
Currency list should be upto date throughout the app
Actual Result:
Currency list of request money/ send money has many missing symbols and is not upto date as workspace default currency list
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
https://github.com/Expensify/App/assets/38435837/6b8fa34d-1dc6-4fca-8360-81490691988bAndroid: mWeb Chrome
https://github.com/Expensify/App/assets/38435837/f1a8328d-0d7e-456f-b694-fd872ff5d512iOS: Native
https://github.com/Expensify/App/assets/38435837/74ee2fa2-5fb3-41f1-8738-e282dd56c06diOS: mWeb Safari
https://github.com/Expensify/App/assets/38435837/d306703d-41cf-4383-8ebb-3a6bc8ea915dMacOS: Chrome / Safari
https://github.com/Expensify/App/assets/38435837/6c28e73e-b84f-42fc-bb5d-a2a7db5fc921 https://github.com/Expensify/App/assets/38435837/1138619d-28c8-4384-9be6-07c1d56d6113MacOS: Desktop
https://github.com/Expensify/App/assets/38435837/29c13654-e800-4259-9208-369f5ed4b400View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @miljakljajic