-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix rendering of timezone info inside chats when the selected language is Spanish #4309
Fix rendering of timezone info inside chats when the selected language is Spanish #4309
Conversation
remove unnecessary logic, use preferredLocale
componentWillUnmount() { | ||
clearInterval(this.timer); | ||
clearInterval(this.readyTimer); | ||
} | ||
|
||
getParticipantLocalTime() { | ||
const reportRecipientTimezone = lodashGet(this.props.participant, 'timezone', {}); | ||
moment.locale(this.props.preferredLocale); |
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.
This will cause issues with moment() usages. it updates the locale to another user's timezone globally. There are many places where we are dependent on the moment() to get the time.
Do you think it's safe to use it this way?
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.
@parasharrajat I haven't reviewed this code yet, in the middle of testing. Can you give me an example of a type of regression this could cause? So far in my testing things are working great and haven't noticed issues with displayed times yet.
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.
Please look at ReimbursementAccountPage L174 & CompanyStep L107. Dates could be +1 or -1 based on timezone etc. If your testing shows fine results then all good.
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.
Tested this on desktop and iOS, saw no regressions in displayed times.
✋ 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 in version: 1.0.81-5🚀
|
🚀 Deployed to production in version: 1.0.82-7🚀
|
Details
(Comment)
Fixed Issues
$ #4218
Tests || ### QA Steps
--->
Tested On
Screenshots
Web
testing.mp4
Mobile Web
mWebTesting.mp4
Desktop
iOS
Android
AndroidTest.mp4