Page MenuHomePhabricator

FlaggedRevs incorrectly causes icons to be displayed next to usernames & user-links to be hidden when viewing a page history on mobile (with AMC enabled)
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
A_smart_kitten
Feb 23 2025, 4:02 PM
Referenced Files
F58341677: screenshot.png
Feb 23 2025, 4:06 PM
F58340532: screenshot.png
Feb 23 2025, 4:06 PM
F58340523: screenshot.png
Feb 23 2025, 4:06 PM

Description

Steps to replicate the issue

What happens?

  • An icon (which shouldn't be shown with AMC enabled) is displayed to the left of each editor's username.
  • (talk | contribs) links (which should be shown with AMC enabled) are not displayed alongside each editor's username.

What should have happened instead?:
The icons shouldn't be shown, and the (talk | contribs) links should be shown.

Software version
1.44.0-wmf.17

Screenshots (taken from https://en.m.wikipedia.org/wiki/Square & https://en.m.wikipedia.org/wiki/Circle)

Article history entry (FlaggedRevs enabled), screen width >=640pxArticle history entry (FlaggedRevs enabled), screen width <640pxArticle history entry (FlaggedRevs not enabled), screen width <640px
screenshot.png (1,118×452 px, 57 KB)
screenshot.png (1,228×438 px, 56 KB)
screenshot.png (1,176×360 px, 64 KB)

Other information
I did some investigating as to why I think this might be the case, and will leave my notes as a comment on this task.
I'm going to subtask this to T238885: AMC mobile history page layout messed up (FlaggedRevs) rather than raising it in that task itself; as while it does seem to be in scope for that task, I can't see that this specific issue has been brought up within it, and I don't want to unintentionally complicate that task's history :)

Event Timeline

I did a little bit of investigating to try and find out why - when a user has Advanced Mobile Contributions enabled - having FlaggedRevs active on a page causes the "(talk | contribs)" links to disappear (and an icon next to the editor's name to appear) when the screen width is <640px.

From what I can see in my browser, the CSS statement causing "(talk | contribs)" to not be displayed is one that targets .mw-usertoollinks, with the rule display: none !important;. Looking through this codesearch, the only fully matching CSS rule I could find was this block within MinervaNeue's skinStyles/mediawiki.diff.styles.less.
Another codesearch for what might be loading mediawiki.diff.styles when viewing a page's history found this line in FlaggedRevs' extension.json that declares it as a dependency for ext.flaggedRevs.advanced - a module that appears to be loaded (among other places) by a function called by the BeforePageDisplay hook.

My working theory is therefore that FlaggedRevs seems to be loading MediaWiki diff styles when an end user views the history of a page that has FlaggedRevs enabled; which in turn is loading Minerva's skinStyles/mediawiki.diff.styles.less, which in turn is causing the "(talk | contribs)" links to not be displayed & an icon to appear next to the editor's name (and potentially also some other issues, though I haven't looked into anything else).
I've therefore tagged MinervaNeue (Tracking) on this task, as - unless I've completely messed up (which is always possible) - this seems to be a side effect of Minerva stylesheets being loaded where they shouldn't be.

Jdlrobson-WMF subscribed.

While MobileFrontend provides the mobile domain, the codebase here has nothing to do with the bug.

The module mediawiki.diff.styles should only be loaded to style diffs but I don't see a diff on https://en.m.wikipedia.org/w/index.php?title=Square&action=history
What am I missing? If no diff is being rendered the module mediawiki.diff.styles should be removed.

As a short term fix .mw-usertoollinks could be scoped to the .diff selector e.g. .diff .mw-usertoollinks.

While MobileFrontend provides the mobile domain, the codebase here has nothing to do with the bug.

Fair enough - I was probably assuming that (as an issue affecting AMC, which I believe is provided by MobileFrontend) it would go under MobileFrontend (Tracking) if nothing else, but apologies if I got this wrong/should have just added it to the 'Tracking' column myself.