Skip to content

[HOLD - for payment Aug 5th] Show Yesterday/Tomorrow when other user is in a different date #4118

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

Closed
isagoico opened this issue Jul 16, 2021 · 15 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@isagoico
Copy link

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


Action Performed:

  1. Log in to e.cash and navigate to a conversation with a user that's on a different time zone (and it's a different day)

Expected Result:

There should be a notice for the user that the other chat member is currently on another date.

Actual Result:

There's no information in the time message that the user is in another date.

Workaround:

N/A

Platform:

Where is this issue occurring?

Web ✔️
iOS✔️
Android✔️
Desktop App✔️
Mobile Web✔️

Version Number: 1.0.79-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos:

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @rafecolton https://expensify.slack.com/archives/C01GTK53T8Q/p1626308184300200

The message that shows the time of day for people outside your timezone should also show the date if it is not today where that person resides

@MelvinBot
Copy link

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

@quinthar
Copy link
Contributor

quinthar commented Jul 16, 2021 via email

@johnmlee101
Copy link
Contributor

Seems fairly straightforward! I agree with David's point in that having a day of the week is more clear.

https://github.com/Expensify/Expensify.cash/blob/f75961876aff1f6eb9dc3fec5430f7cd614c6854/src/pages/home/report/ParticipantLocalTime.js#L69-L74

Looks like this.state.localTime() should give us the day of the week so this is very straightforward. Going to assign external.

@johnmlee101 johnmlee101 added the External Added to denote the issue can be worked on by a contributor label Jul 20, 2021
@MelvinBot
Copy link

Triggered auto assignment to @Christinadobrzyn (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@rdjuric
Copy link
Contributor

rdjuric commented Jul 20, 2021

We've decided to showing the day of the week instead of tomorrow/yesterday?

Modify our ParticipantLocalTime to also receive the timezone of the current user as a prop, and

  1. In the getParticipantLocalTime method, check if the day of our timezone is different than the day of the reportRecipientTimezone using moment
  2. If it is, display the day of the week before the time in our this.state.localTime

@johnmlee101
Copy link
Contributor

johnmlee101 commented Jul 20, 2021

Do we need to receive it as a prop? We get the timezone here:

const reportRecipientTimezone = lodashGet(this.props.participant, 'timezone', {});

@rdjuric
Copy link
Contributor

rdjuric commented Jul 20, 2021

Do we need to receive it as a prop? We get the timezone here:

This is the timezone of the other participant that we pass as a prop here

&& <ParticipantLocalTime participant={reportRecipient} />}

We didn't need to check our own timezone in the ParticipantLocalTime before (as we only cared if it was different, and we checked for that here), but now we need it to compare the days of the week.

@johnmlee101
Copy link
Contributor

Ah, very fair. then that seems like a good solution.

@Christinadobrzyn
Copy link
Contributor

Posted job in Upwork:

Internal job post: https://www.upwork.com/ab/applicants/1417732027235254272/job-details
External job post: https://www.upwork.com/jobs/~01e1259985646da02d

Invited @rdjuric to the job

@shuklaalok7
Copy link

I came here after looking at the Upwork job, but looks like it's almost fixed and @rdjuric is going to implement it. All the best.

@Christinadobrzyn
Copy link
Contributor

Hired @rdjuric for this project! 🎉

@Christinadobrzyn
Copy link
Contributor

I see the PR is merged - [HOLD - for payment Aug 5th]

@Christinadobrzyn Christinadobrzyn changed the title Show Yesterday/Tomorrow when other user is in a different date [HOLD - for payment Aug 5th] Show Yesterday/Tomorrow when other user is in a different date Jul 28, 2021
@Christinadobrzyn
Copy link
Contributor

I miscalculated the merge date - PR was merged 8 days ago today so paying this one.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 4, 2021

Paid @rdjuric in Upwork! @johnmlee101 I think this can be closed - I'm curious why it didn't auto close when the PR deployed?

@Christinadobrzyn
Copy link
Contributor

Closing issue - reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants