Page MenuHomePhabricator

[Dev]: UI work in modal - Update timestamps
Closed, ResolvedPublic

Description

  • Fix any last issues with timestamps and how they are calculated

This work can be done in it's own PR.

Test Steps

This comment covers the business logic for the timestamps. Keep in mind there's some additional logic to account for small events squashed across multiple days into the same section header in this task. Given that it might be easiest if these two are tested together.

Event Timeline

Tsevener triaged this task as Low priority.
Tsevener raised the priority of this task from Low to Medium.

Here's how I think timestamps should work. @cmadeo @JMinor let us know what you think of this logic on how to format the timestamps:

Article content insert - green timeline timestamp

Since we only have green text to work with, make these entirely relative, without a specific date. I believe this is how it's currently working in the PR, we just want to make sure our work for the rest of this doesn't cause regressions there.

If < 1 hour ago: "x minutes ago"
If < 1 day ago: "x hours ago"
If < 1 week ago: "x days ago"
If < 1 month ago: "x weeks ago"
If < 1 year ago: "x months ago"
Else "x years ago"

Article content insert - new changes / last updated badge timestamp

This should also be completely relative (see above section). I think it's already working like this currently.

Modal - Section headers - title (bold) text

Seems like since all events are sectioned off according to date, the bold text should be a relative day and nothing else.

If events happened today - "Today"
If events happened yesterday - "Yesterday"
If events happened beyond that - "x days ago"

Modal - Section headers - subtitle text

This should simply be the date in Month, Day, Year format, e.g. "October 6, 2020"

Modal - green timeline timestamp

This time becomes relative the closer to now that it is, but if it's over a day it switches to HH:MM format.

If < 1 hour ago: "x minutes ago"
If < 1 day ago: "x hours ago"
Else: HH:MM ZZZ format: "20:45 GMT"

@Tsevener per our meeting, this list looks good to me! Thanks!

Dmantena renamed this task from [Dev]: UI work in modal - Remaining Data Bugs to [Dev]: UI work in modal - Update timestamps.Oct 16 2020, 3:25 PM
Dmantena updated the task description. (Show Details)
JMinor claimed this task.