-
Notifications
You must be signed in to change notification settings - Fork 113
LL-6732 regions, dates, time and currencies #1941
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some linting issues to fix
LGTM 👍
@ofreyssinet-ledger still some ci issues on flow sorry |
@LFBarreto am I supposed to just run |
I restarted the CI/test check in case it's flaky |
565c5e7
to
b6a7b92
Compare
Alleluia, CI/test is passing after a rebase |
ac283e7
to
a488c31
Compare
a488c31
to
4b796b3
Compare
4b796b3
to
8d74d75
Compare
82e029f
to
bc98bd5
Compare
bc98bd5
to
676a9a7
Compare
@@ -0,0 +1,37 @@ | |||
/* @flow */ | |||
import { connect } from "react-redux"; | |||
import _ from "lodash"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import _ from "lodash"; | |
import upperFirst from "lodash/upperFirst"; |
I don't know if we're doing it somewhere else in the app (which might make that not an issue here) but you could propably just import upperFirst
to allow for tree shaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a fundamental difference between doing what you suggested and import { upperFirst } from "lodash"
regarding tree shaking ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, unfortunately, you have to get a specific babel plugin I think to get the tree shaking with named exports like that for lodash, unless it's not going to be considered as "dead code" 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok good to know, we'll have to do some cleanup as some point then I think regarding this because in some other in the codebase we use a default import for lodash...
Thanks for the review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
(thus avoiding weird mixes between languages)
0795d4a
to
a9665b3
Compare
Rebased and implemented "searchable" option to makeGenericSelectScreen for a much better UX: Simulator.Screen.Recording.-.iPhone.12.-.2022-01-31.at.11.09.20.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit f962070
Edit (31/01):
Added a "searchable" option to the selection screen for a much better UX:
Simulator.Screen.Recording.-.iPhone.12.-.2022-01-31.at.11.09.20.mp4
Edit (19/01):
Now ready for dev review 👍
Original PR comment:
settings.locale
, separate from thesettings.language
locale. If it's not defined, thelocaleSelector
falls back to the language localeA few examples on the portfolio screen with

fr-FR
locale:Questions remaining:
What about the position of the currency unit ? Should there be another PR on live-common to put the currency unit on the left or on the right depending on the locale ? Or is it somehow already implemented but I just didn't find where/how ?The region selection screen is basically a huge flatlist with a ton of entries so it's not such a good experience to scroll to the desired setting. Should I implement thesearchable
prop marked as a TODO inmakeGenericSelectScreen
?useLocale()
-> I would rename that useTranslationLocalesettings.locale
locale, for dates & numbers, accessible withuseSelector(localeSelector)
Type
Feature
Context
LL-6732
Parts of the app affected / Test plan
I believe this can only be tested manually and the best scenario would be if we have testers of different nationality testing for their region ...