Skip to content
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

Desktop - Chat - Timezone information not updated after language change #4352

Closed
kavimuru opened this issue Jul 31, 2021 · 13 comments
Closed
Assignees
Labels
DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Jul 31, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue was found when executing the PR #4309

Action Performed:

  1. Login to the app using expensifail account
  2. Change your language to Spanish
  3. Open any chat
  4. Timezone information in the chat will be shown

Expected Result:

Timezone information in the chat gets updated right away

Actual Result:

Timezone information in the chat gets updated only after refresh

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • Android
  • Desktop App
  • Mobile Web

Version Number:
1.0.82-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Bug5175290_Recording__1001.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

@kavimuru kavimuru added the DeployBlockerCash This issue or pull request should block deployment label Jul 31, 2021
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@MelvinBot
Copy link

Triggered auto assignment to @nkuoch (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@parasharrajat
Copy link
Member

parasharrajat commented Jul 31, 2021

Should be handled by #4218. Trace to back to #4309. It's a regression.

@nkuoch
Copy link
Contributor

nkuoch commented Aug 2, 2021

@parasharrajat The PR you linked to is already in staging, and is the PR that was stated as responsible in this issue description.
However, I've tried reverting it locally, and it doesn't seem to work either, so this PR is probably not responsible.
The issue on staging (and that can be reproduced locally) is actually worse than the original issue of just not being able to refresh the timezone. Now, changing the language doesn't refresh anything on the page.
image

@parasharrajat
Copy link
Member

@nkuoch That PR has added few lines which is causing this issue.

Original that PR was created to show the timezone info when we change the language to other than English but after that PR is merged Now time is not changing in real-time. So literally, it should be part of that PR.

But if you don't want it be fixed as part of that PR, I have a fix.

We need to enable prop checking in shouldComponentUpdate

@nkuoch
Copy link
Contributor

nkuoch commented Aug 2, 2021

If you have a fix, yes please make a new PR, I can review it, thanks!

@nkuoch
Copy link
Contributor

nkuoch commented Aug 2, 2021

Doing a Git bisect, this seems to be the PR that introduced the bug of texts not being refreshed to the right language. cc @kidroca

@parasharrajat
Copy link
Member

parasharrajat commented Aug 2, 2021

Ok. Great find. That is going to be a regression from #4253. even if we revert the PR. I see this issue will persist bcz of this

    shouldComponentUpdate(nextProps, nextState) {
        return nextState.localTime !== this.state.localTime;
    }

It should block the update if Props changes which will block the text update on language change. Instead of this, We can simply use PureComponent or

    shouldComponentUpdate(nextProps, nextState) {
        return !_.isEqual(nextProps, this.props) || nextState.localTime !== this.state.localTime;
    }

I am submitting a PR to correct this and we can raise another issue about the bad behaviour of #4253.

@parasharrajat
Copy link
Member

@nkuoch #4359 For reference.

@nkuoch
Copy link
Contributor

nkuoch commented Aug 2, 2021

@kidroca Please comment on this issue so I can assign it to you. When your PR is ready, we'll need to add the CP Staging label to your PR before merging it, so it gets automatically cherry picked to staging, and so the blocker label can be removed from here.

@kidroca
Copy link
Contributor

kidroca commented Aug 2, 2021

@nkuoch 👍
I'm about to submit a PR, will reference this ticket as well

@roryabraham
Copy link
Contributor

@kavimuru @isagoico Can we retest this in 1.0.82-3 or higher please?

@isagoico
Copy link

isagoico commented Aug 3, 2021

Retest was a pass in all platforms 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants