Page MenuHomePhabricator

Add diff link to Pager HTML generating class
Closed, ResolvedPublic


In Minerva, IndexPager pages e.g. Special:Contributions and the history page show simplified rows which when clicked take you to the diff page

Screen Shot 2022-01-05 at 9.12.45 AM.png (1×2 px, 219 KB)

To support skinning the page in this way we need an adjustment to the HTML

Acceptance criteria

  • It should be possible to click an entire row to get to the diff.
  • In Vector no visual change should occur. The new element will be hidden by default. Styling should occur via a skinStyle defined on the mediawiki.pager.styles module.

Developer notes

See T298639 for prior art to how to do this without impacting Vector skin.

The link can be achieved by adding a diff link to the end of each row. In Minerva the link will be utilized using:
.mw-changelist-diff-link { position: absolute; top: 0; right: 0; left: 0; bottom: 0; color: transparent; }

the link can be added to the element returned by ContribsPager::formatRow

The link can be created like so:

$ret .= $linkRenderer->makeKnownLink(
			'View diff',
				'diff' => $revRecord->getId()

Event Timeline

Jdlrobson triaged this task as Medium priority.Jan 6 2022, 11:25 PM
Jdlrobson added a subscriber: ovasileva.

We decided to take the approach of showing the AMC page to all mobile users and iterate on that design where necessary. As a result this may or may not be needed.

And as I look at this more closely, I realize, the diff is already in the HTML ( .mw-changeslist-diff) so this can already be achieved without any additional changes.