-
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
[NoQA] Replace the moment library with date-fns: Add library, add tests #23520
[NoQA] Replace the moment library with date-fns: Add library, add tests #23520
Conversation
@@ -76,6 +76,8 @@ | |||
"awesome-phonenumber": "^5.4.0", | |||
"babel-plugin-transform-remove-console": "^6.9.4", | |||
"babel-polyfill": "^6.26.0", | |||
"date-fns": "^2.30.0", |
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.
Maybe we could setup this on the App in order to have a smaller bundle in Web -> https://date-fns.org/v2.30.0/docs/webpack
@@ -76,6 +76,8 @@ | |||
"awesome-phonenumber": "^5.4.0", | |||
"babel-plugin-transform-remove-console": "^6.9.4", | |||
"babel-polyfill": "^6.26.0", | |||
"date-fns": "^2.30.0", | |||
"date-fns-tz": "^2.0.0", |
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.
We need to be careful with this -> https://github.com/marnusw/date-fns-tz#usage-with-android
We have Hermes enabled but it seems that the Internationalization APIs are not fully supported yet -> https://hermesengine.dev/docs/intl
Just leaving this warning because we need to test if it's possible to use Intl
from Hermes or we will have to use some polyfill as described in the first link.
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.
Agree, will verify it
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.
As I can see hermes supports Intl.DateTimeFormat().resolvedOptions()
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.
Good job! Left a few comments.
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.
Sorry, miss click
11e0573
to
f8ca0ed
Compare
f8ca0ed
to
770a6ea
Compare
@waterim Make sure to follow the PR template always You need to add it back now and add the PR author checklist so the gh action wont fail Also you will always have to link the issue as |
@mountiny oh, okay, thought that for this kind of PR I don’t need to follow this template, sorry |
@waterim No problem at all, thanks for fixing it ❤️ The template is used for all prs, in terms of tests and qa for prs like this which just add automated tests, you can leave it blank but just leave a quick note: I will do it now and merge it given we got the approvals, thanks for working on this with such urgency great job 🙇 also @burczu |
Reviewer Checklist
Screenshots/VideosN/A automated tests WebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.48-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.48-5 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.49-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.49-3 🚀
|
Details
This PR is only to add library and all the tests for Date Utils files.
Fixed Issues
$ #19810
PROPOSAL: #19810 (comment)
Tests
N/A automated tests
Offline tests
N/A automated tests
QA Steps
N/A automated tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
N/A automated tests
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android