Page MenuHomePhabricator

Comment permalinks: design and implement user experience
Open, Needs TriagePublic

Description

This task is about introducing the ability for people to be able to link to specific talk page comments.

This surfaced again in the context of T264885.

Stories

  • As someone who is wanting to reference a specific thing someone has said now, and at any point in the future, I want to be able to generate a permanent link to any individual comment posted on a wikitext talk page, so that I, and anyone else in the future (including my future self!), can revisit the comment and better understand the context the link to said comment may be embedded within.

Requirements

⚠️ Draft-state. The requirements in this section will finalized, and this disclaimer removed, once the === Mockups below are finalized.

Meta

  • Platform(s): Desktop + Mobile
  • Skin(s): All
  • State of Show discussion activity setting: Enabled and Disabled
  • Comment permalinks/URLs should work regardless of how the context around the comment changes
    • E.g. the name of the topic/section in which the comment exists changes, the page on which the comment exists changes, etc.
  • Comment URLs/permalinks should be human-readable

User Experience

  • An affordance of some kind appears visually related to the comment for which it will generate a link
  • Once someone clicks/taps an affordance, the permalink to said comment should automatically be added to the device the person is using's clipboard without the page reloading
    • Said "permalink" ought to take people to the latest version of the page on which said comment exists. <-- via @Tacsipacsi in Topic:Wmredg44lh8v9x9i.
    • Upon clicking/tapping the link affordance, people should be made aware that a link to said comment has been added to their clipboard and be shown the specific comment for which the permalink was generated

The requirements above are – in large part – inspired by the permalinking gadget @Esanders implemented which you can experiment with by following these instructions.

Approaches

Approach #1: Show a link/button for copying comment links
E.g. this is the approach the gadget @Esanders wrote, Flow, Github, and reddit take.

GadgetFlowGithubreddit
Mobile#todo#todo#todo#todo
Desktop
Screen Shot 2022-08-22 at 4.32.08 PM.png (372×1 px, 98 KB)
Screen Shot 2022-08-22 at 4.30.51 PM.png (632×1 px, 171 KB)
Screen Shot 2022-08-22 at 4.30.25 PM.png (704×1 px, 189 KB)
Screen Shot 2022-08-22 at 4.28.45 PM.png (410×740 px, 71 KB)

Approach #2: Embed the affordance for copying comment links within each comment's signature/timestamp
This is the approach @nayoub suggested and this demo @Esanders wrote takes.

Mockups

References

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Opennayoub
Openmatmarex
Openmatmarex
Resolvedmatmarex
Resolvedmatmarex
ResolvedPRODUCTION ERRORmatmarex
ResolvedPRODUCTION ERRORmatmarex
Resolvedmatmarex
ResolvedPRODUCTION ERRORmatmarex
ResolvedLadsgroup
Resolvedmatmarex
OpenNone
OpenNone
OpenNone
Resolvedmatmarex
Invalidmatmarex
ResolvedPRODUCTION ERRORmatmarex
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex

Event Timeline

ppelberg renamed this task from Enable people to link to specific talk page comments to Talk page comment permalinks: design and implement user experience.Mar 24 2022, 12:36 AM
ppelberg renamed this task from Talk page comment permalinks: design and implement user experience to Comment permalinks: design and implement user experience.Mar 24 2022, 12:46 AM
ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)

Approach #2: Embed the affordance for copying comment links within each comment's signature/timestamp
This is the approach @nayoub suggested and this demo @Esanders wrote takes.

Is it impossible for a recognized signature’s timestamp to be already a link? What if one’s signature (in preferences) is

[[User:Alice|Alice]] ([[User talk:Alice|talk]]) [[Special:Contributions/Alice|{{subst:#timel:H:i, j F Y (T)}}]]

and the user signs with five tildes instead of four? Is the resulting Alice (talk) 12:00, 24 August 2022 (UTC) not recognized as a signature?

By the way, the black link on Patch Demo is hard to discover, it took me half a minute to find it despite me knowing that it should be somewhere there. If taking this approach, the signature should have some CSS that makes it recognizable as an interactive element.

By the way, the black link on Patch Demo is hard to discover, it took me half a minute to find it despite me knowing that it should be somewhere there. If taking this approach, the signature should have some CSS that makes it recognizable as an interactive element.

I think this is intentional, with the idea being that this is an advanced feature and we don't want to distract from other more important links. Other sites use similarly muted styling (Twitter, Phabricator etc).

That said if we want to call more attention to this feature we could break with what those sites have done, or maybe just using grey text will alert experienced users that something has changed.

Approach #2: Embed the affordance for copying comment links within each comment's signature/timestamp
This is the approach @nayoub suggested and this demo @Esanders wrote takes.

Is it impossible for a recognized signature’s timestamp to be already a link? What if one’s signature (in preferences) is

[[User:Alice|Alice]] ([[User talk:Alice|talk]]) [[Special:Contributions/Alice|{{subst:#timel:H:i, j F Y (T)}}]]

and the user signs with five tildes instead of four? Is the resulting Alice (talk) 12:00, 24 August 2022 (UTC) not recognized as a signature?

We found this case in T252059 where the timestamp links to a diff for unsigned comments. It's an edge case so not a huge problem. We could either:

  • not add permalinks to these comments
  • overwrite the link with our permalink
  • add another link next to the timestamp, e.g. "(link)"
  • modify the offending templates to generated an un-linked timestamp, followed by another link, e.g. "(diff)"

I think this is intentional, with the idea being that this is an advanced feature and we don't want to distract from other more important links. Other sites use similarly muted styling (Twitter, Phabricator etc).

@Esanders I agree, its goal is to be "muted" on the page and it is widely adopted in that way across other platforms. It's a well-spread pattern.

We found this case in T252059 where the timestamp links to a diff for unsigned comments. It's an edge case so not a huge problem. We could either:

  • not add permalinks to these comments
  • overwrite the link with our permalink
  • add another link next to the timestamp, e.g. "(link)"
  • modify the offending templates to generated an un-linked timestamp, followed by another link, e.g. "(diff)"

My first intuition would be to overwrite the link with our permalink for consistency and optionally follow by a "(diff)" link if needed.
To avoid double parenthesis, would it be possible to include UTC close to the hour maybe like this? Username (talk) 12:00 UTC, 24 August 2022 (diff)
This would also make more sense and add consistency with (talk) interaction so both talk and diff have the same treatment.

By the way, the black link on Patch Demo is hard to discover, it took me half a minute to find it despite me knowing that it should be somewhere there. If taking this approach, the signature should have some CSS that makes it recognizable as an interactive element.

I think this is intentional, with the idea being that this is an advanced feature and we don't want to distract from other more important links. Other sites use similarly muted styling (Twitter, Phabricator etc).

That said if we want to call more attention to this feature we could break with what those sites have done, or maybe just using grey text will alert experienced users that something has changed.

Other sites (or even Flow) highlight the date with placement. On wikitext talk pages, the placement does not highlight, so there needs to be something else. It doesn’t need to be very prominent, gray text would suffice IMO, but it needs to be noticeable.

We could either:

  • not add permalinks to these comments

It’s certainly possible, but it would make the new feature less useful.

  • overwrite the link with our permalink

I’d avoid this, as these links may provide important information (or may not, but we don’t know, since it’s user-generated content).

  • add another link next to the timestamp, e.g. "(link)"

It doesn’t look nice, but I think it’s the least bad option of the three.

  • modify the offending templates to generated an un-linked timestamp, followed by another link, e.g. "(diff)"

This can certainly be done, and may be preferable in order to reduce the number of such edge cases, but this can be used only in combination with one of the other three options, since it’s never guaranteed that all offending templates have been modified.

My first intuition would be to overwrite the link with our permalink for consistency and optionally follow by a "(diff)" link if needed.

This is not an option. The two options are that we append our link (“(link)”) in parentheses, or templates append the diff link (“(diff)”) in parentheses. We can’t append a link titled “(diff)” pointing to wherever the template-generated link pointed, because the template-generated link may, or may not, have pointed to a diff. (In my hand-crafted example, it pointed to the user’s contributions, not a diff.)

To avoid double parenthesis, would it be possible to include UTC close to the hour maybe like this? Username (talk) 12:00 UTC, 24 August 2022 (diff)

Signature dates are generated by MediaWiki core. If we’d reformat them on display, it’d be confusingly different among users who opted out and who haven’t; if we’d change them in wikitext, it’d be confusingly different between old and new comments, which would also break the comment parser (it can’t currently handle multiple date formats).

Change 818579 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] [WIP] Turn comment timestamps into permalinks

https://gerrit.wikimedia.org/r/818579