Page MenuHomePhabricator

Relative timestamps have inappropriate accuracy for comment signatures
Closed, ResolvedPublic

Description

As noted in T309890#7986745, comment signatures are rounded down to the nearest minute, so saying a comment was posted "X seconds" ago is usually misleading, for example this comment that was just posted:

image.png (128×498 px, 13 KB)

Options:

  • Find a way to get MW's relative timestamp library to only go to minute-resolution
  • Special case any relative timestamp less than 60-120 seconds as 0 seconds, or a special message "a few seconds ago" like Flow

Behavior

  1. Publish a new comment or new topic on a talk page, using any editing interface (e.g wikitext editor, New Topic Tool, Reply Tool, etc.)

Actual

  1. ❗️Notice the timestamp within the "latest comment indicator" that appears beneath BOTH the page title and within each section's Topic Container shows a time that could lead you to question whether it reflects comment/topic you've just published

Desired

  1. ✅ Notice the timestamp within the "latest comment indicator" that appears beneath BOTH the page title and within each section's Topic Container reads Just now whenever a new comment or new topic has been published within the past 2 minutes (120 seconds), regardless of the editing interface used to publish said comment and/or topic.

Event Timeline

Assuming how I'm understanding this issue is accurate. then I think a good first step is to move forward with the second option you proposed: "Special case any relative timestamp less than 60-120 seconds as...a special message "a few seconds ago" like Flow."


Behavior

  1. Publish a new comment or new topic on a talk page, using any editing interface (e.g wikitext editor, New Topic Tool, Reply Tool, etc.)

Actual

  1. ❗️Notice the timestamp within the "latest comment indicator" that appears beneath BOTH the page title and within each section's Topic Container shows a time that could lead you to question whether it reflects comment/topic you've just published

Expected

  1. ✅ Notice the timestamp within the "latest comment indicator" that appears beneath BOTH the page title and within each section's Topic Container shows a time that leads you to think it reflects the comment/topic you've just published

Another issue with relative timestamps is that they’re not continuously updated. If I open the page, it says Latest comment: 2 minutes ago, and leave it open for some hours, it’ll still say Latest comment: 2 minutes ago. Flow, in contrast, updates the timestamp after page load with some JavaScript library. However, simply blindly incrementing the relative timestamps is also confusing, as it ignores the fact that there may have been new comments since loading the page… (Which is quite annoying in case of Flow because it has no edit conflict detection, but fortunately it’s no longer the case for DiscussionTools.)

it ignores the fact that there may have been new comments since loading the page

We do poll for new comments while the reply widget is open, but I think doing this for all readers might be a performance issue at the moment. Maybe when we have the new comment metadata storage system (T296801) this would be quick enough to do cheaply.

Another issue with relative timestamps is that they’re not continuously updated.

Filed as T310194.

This task is fixed in the latest patchsets.

(Updated task description to reflect outcome of today's team meeting)