Page MenuHomePhabricator

Show some of HTML comments' text as an inline labels, like with 'invisible' templates' name
Closed, ResolvedPublic1 Estimated Story Points

Assigned To
Authored By
Sep 30 2016, 7:03 PM
Referenced Files
F4555685: pasted_file
Oct 4 2016, 3:59 PM
F4551398: pasted_file
Oct 3 2016, 6:28 PM
F4550784: pasted_file
Oct 3 2016, 4:57 PM
F4550812: pasted_file
Oct 3 2016, 4:57 PM
F4550835: pasted_file
Oct 3 2016, 4:57 PM
"Doubloon" token, awarded by RandomDSdevel."Cookie" token, awarded by Whatamidoing-WMF.


This is prompted by @Esanders' comment in {T141861#2523435}.

Currently, <!-- hidden HTML comments --> are displayed as a small gray circle: (!) The full text is available on hover (for desktop users). Should we instead display something like (!) hidden HTM (the first few characters/not the entire comment)?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 313833 had a related patch set uploaded (by DLynch):
ce.CommentNode: inline preview of comment

I decided to play with this a bit, as can be seen in the patch...


pasted_file (451×755 px, 66 KB)


pasted_file (462×754 px, 82 KB)

This is with the comment preview being truncated to 20 characters.

There's also the somewhat visually excessive look of faking some comment markup:

pasted_file (461×755 px, 87 KB)

Jdforrester-WMF renamed this task from Consider adding inline labels to invisible comments to Show some of HTML comments' text as an inline labels, like with 'invisible' templates' name.Oct 3 2016, 6:01 PM
Jdforrester-WMF assigned this task to DLynch.
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF added a project: User-notice.

Would be interesting to see on some wiki articles (e.g. Obama). I think it would be styled like the invisible templates, so we can omit the <!-- (a non-wikitext user shouldn't be familiar with that syntax anyway).

Here is Obama:

Seeing the comments inline I'm not so sure it isn't more distracting that useful...

pasted_file (437×787 px, 155 KB)

I think it's reasonable. We're not intending to encourage them anyway.

It doesn't seem particularly distracting to me -- I do prefer it to the current experience, at least.

Change 313833 merged by jenkins-bot:
ce.CommentNode: inline preview of comment

There may also be pages with lots of comments where this makes the page even less readable.

Just... I think that new users will try to delete theses boxes before save, no ?

If we see a rash of deleted comments in edits on comment-heavy pages, we could perhaps invest in some sort of UX for comments (and invisible templates, which presumably suffer from the same issue) to drive home that they're invisible in the final output. Add some explanatory text to the context item, perhaps?

That said, I don't know if the label style is any more at risk from a rash of deletions than the former just-an-icon style.