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

Description

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)?

Restricted Application added a project: VisualEditor. · View Herald TranscriptSep 30 2016, 7:03 PM
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

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

DLynch added a subscriber: DLynch.Oct 3 2016, 4:57 PM

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

Before:

After:

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

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

Jdforrester-WMF triaged this task as Normal priority.Oct 3 2016, 6:01 PM
Jdforrester-WMF assigned this task to DLynch.
Jdforrester-WMF set the point value for this task to 1.
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.
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).

DLynch added a comment.Oct 3 2016, 6:28 PM

With template styling:

Here is Obama:

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

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

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

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.

RandomDSdevel added a subscriber: RandomDSdevel.
RandomDSdevel removed a subscriber: RandomDSdevel.