Page MenuHomePhabricator

Mobile Page history HTML differ, making scripting hard
Closed, DuplicatePublicBUG REPORT

Description

On test.wikipedia with MediaWiki 1.40.0-wmf.19 Page history list is now composed of

<ul class="page-list diff-summary-list side-list">
  <li class="page-summary">

whereas User contributions are same as/similar to non-mobile

<ul class="mw-contributions-list">
  <li data-mw-revid="555618" class="mw-contributions-current mw-tag-visualeditor-wikitext">

The new format breaks several user scripts (e.g. inline diff expansion, inline patrol) that rely on DOM selection by "mw-contributions-current" and are using revid data from "data-mw-revid" for their actions.

Is this the future of all mobile lists (Recent changes, User contributions, Watchlist...)?

Can you at least provide data-mw-revid in all <li's>?
Some consistency between the pages would be appreciated — ideally both on desktop and mobile sites?

"mw-changeslist-separator"s are also gone, and they were useful for inserting additional buttons. Mind putting some back? Or adding any other elements that are the same accross the pages and sites, which can be used as hooks?

Event Timeline

@Jdlrobson: yes, that helps, though I'd expect this to work out of the box. Thanks!

And here's why I'm asking: Comunity Wishlist Survey 2023 – Inline diffs and inline patrol

@Ponor T117279 may also be interesting to you then! :-D

Jdlrobson renamed this task from Mobile Page history and User contributions lists differ, making scripting hard to Mobile Page history HTML differ, making scripting hard.Oct 16 2023, 11:17 PM

Now it's not only mobile vs. desktop, but mobile itself changes its state considerably depending on the screen size. Things, unsurprisingly, are broken: T350438

Jdlrobson changed the task status from Open to Stalled.Nov 6 2023, 5:51 PM

This should be addressed by T350609