Page MenuHomePhabricator

On contributions page add hidden "No edit summary" element when an edit had no edit summary
Closed, ResolvedPublic

Description

On mobile when viewing contribution rows on history or contributions page, for edits which have no edit summary, we show the text "No edit summary"

On desktop we show no message.

We will adjust the code in core to show this message. The message will have a special class mw-comment-none and hidden by default so that this doesn't change the display for Vector users.

Acceptance criteria

  • When a row has no edit summary, there is HTML in the DOM.
  • A hidden edit summary is hidden so it does not show on Vector or any other skin
  • Styling should occur via a skinStyle defined on the mediawiki.pager.styles module.
  • Hide this text in such a way that a screen reader can pick it up.

Developer notes

The comment on Special:Contributions is controlled via template
includes/templates/SpecialContributionsLine.mustache
The data is passed down from includes/specials/pagers/ContribsPager.php

Event Timeline

Jdlrobson triaged this task as Medium priority.Jan 6 2022, 11:25 PM
Jdlrobson renamed this task from On history page show "No edit summary" when an edit had no edit summary to On contirbutions page show "No edit summary" when an edit had no edit summary.Jan 6 2022, 11:44 PM
Jdlrobson renamed this task from On contirbutions page show "No edit summary" when an edit had no edit summary to On contributions page add hidden "No edit summary" element when an edit had no edit summary.
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

Could this message be of interest for screenreader users too (hidden vs visually hidden)?

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Ammarpad.

Sorry Ammarpad. Didn't mean to remove you as assignee on this one.

On mobile when viewing contribution rows on history or contributions page, for edits which have no edit summary, we show the text "No edit summary"

It's also shown on mobile diff page: https://m.mediawiki.org/wiki/Special:MobileDiff/5013367, I suppose we want retain it there too?

The changes proposed here should have no impact on Special:MobileDiff so Special:MobileDiff should behave before/after these changes the same (so yes it should be retained).

We're looking to eventually get rid of that page too (see T117279), but for now let's keep this scoped to contributions page.

Change 756412 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/core@master] Add default comment when there's no comment on some changeslist pages

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

Change 756412 merged by jenkins-bot:

[mediawiki/core@master] Add default comment when there's no comment on some changeslist pages

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

I've tested this on beta cluster and locally and it appears to behaving exactly as expected on Vector and Minerva skins.

It's not. I think it appears now because there's content after the char difference in the document (it's invisible). The separator is added if there's any content after that and there was check for emptiness before. The check is removed in the above patch since now every changeslist row has summary and the check will always be true because of that.

We can hide it somehow now if it's known the comment is the default one since Minerva (the potential user of that comment) doesn't seem to use (the separator) currently.

It wasn't intended, but I don't think it's a big deal.
On non protected pages, an undo button will follow so that seems helpful:

Screen Shot 2022-02-03 at 11.56.02 AM.png (74×472 px, 12 KB)

It might also be useful if a community/or product wants to display the no edit summary message to non-screenreaders using .mw-comment-none { display: inline; position: relative !important; margin: auto;}
I've opened up T300921 to track future work.