Page MenuHomePhabricator

Last-modified bar in Minerva is hidden on small screens
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Problem has been reported by a user on dewiki, I can replicate it. Seems like a recent change.

Steps to replicate the issue (include links if applicable):

What happens?:
The last-modified bar gets a display:none and is hidden. There is no history icon at the top of the page

What should have happened instead?:
The last-modified bar should remain visible, as it is the only way for mobile users without AMC to reach the page history.

QA

TODO

Sign off steps

Make sure there are tickets that represent the following issues:
T350515#9314743

QA Results - Beta

ACStatusDetails
1T350515#9339642

QA Results - Prod

ACStatusDetails
1T350515#9343016

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

There is a history link at the top of the page (clock icon). With AMC disabled i still see the modified bar. What am I missing?

Okay got it - this impacts anonymous users right? I think this might be a license violation so important to fix. Thanks for the report.

There is a history link at the top of the page (clock icon). With AMC disabled i still see the modified bar. What am I missing?

The reporting user says they don't see the last-modified bar anymore even when logged-in; I wasn't able to test it because I am somehow unable to deactivate AMC for my account (not sure why that is). So my tests were indeed in incognito mode. There is an argument to be made that the last-modified bar is not necessary anymore once you have a history button in the header, but an additional link to the history in the footer certainly does no harm and is kind of expected at this point, so just hiding it does not seem like a good idea to me. And of course, if both the link and the button are missing, there is a major license problem.

Also, it looks like a specific dewiki problem. Could it be related to T350514 (wild guess)? Thus caused by styles only loaded on dewiki.

Yep. Looks like FlaggedRevisions loads mediawiki.diff.styles unexpectedly on the page - on mobile diff pages the last modified bar is hidden since there is a fixed drawer at the bottom of the page.

So ideally FlaggedRevs shouldn't lose these diff styles:
https://gerrit.wikimedia.org/g/mediawiki/extensions/FlaggedRevs/+/010c12da68018e69e387657ad8e3e4024fbf745c/extension.json#287

In the short term we can scope this rule to the diff page class (if such class exists). I'll take a look on Monday if nobody meets me to it!

Reviewers have a preference called Show the pending changes diff when viewing the latest pending revision (flaggedrevsviewdiffs), which renders diffs on read views of pages with pending changes; I suppose the dependencies are because of this. On the one hand, this means that we should count with diffs appearing on pages that are not “diffs”, so the Minerva styles are wrong, although on the other hand, most pages and most users never see these diffs, so loading these styles could be optimized.

The font also appears larger in the history and the text overlaps (example from Wikidata). Could it be related? I only see this when I'm logged out.

Digging into Git history, these dependencies were introduced recently, in c03ec9e by @matmarex. Couldn’t the styles (and scripts and MediaWiki messages) be loaded only when the user actually clicks the toggle link (which happens very rarely compared to the page loads that include the ext.flaggedRevs.advanced module)? Instead of showing an incomplete diff with a spinner while loading the actual diff, it could show just a spinner while the actual diff and the necessary ResourceLoader modules and MediaWiki messages are loading.

Also would like to point out that the mobile history pages (whether with AMC or not) are additionally affected by this change. In e.g. https://de.wikipedia.org/w/index.php?title=Jonne_J%C3%A4rvel%C3%A4&action=history&useskin=minerva, the Undo button looks very different from the Thank button and especially the Rollback button. Also, the colours indicating flagged versions are not covering 100% width anymore, but only the width of the summary text. And on windows below 1000px, the "talk/contribs" links after the user name get hidden, while the user icon will suddenly show up. It just seems all very broken.

EDIT: And the button to show/hide selected versions (admin only) now causes overflow.

Daimona subscribed.

This is not (only) caused by flaggedrevs. See for instance enwikis' VPT, or the equivalent page on itwiki, where FlaggedRevs is certainly not welcome. This seems to be a direct regression of r962095, which assumes that the mediawiki.diff.styles is only loaded on diff pages, but that is apparently not the case.

I'm not sure what's responsible for loading this style in non-diff pages, and that's something that might need to be fixed. But also, the rule in Minerva's mediawiki.diff.styles.less should make sure that it's only targeting diff pages, if that's the intent of the rule.

Jdlrobson raised the priority of this task from High to Unbreak Now!.EditedNov 6 2023, 4:15 PM

Because this impacts ability to access history I'm marking this UBN with the aim to get a fix out today. I've open T350596 for the more general issue.

But also, the rule in Minerva's mediawiki.diff.styles.less should make sure that it's only targeting diff pages, if that's the intent of the rule.

There is no way to distinguish diff pages from article pages using the BODY tag for example on desktop so this requires refactoring the HTML.

The patrol link is disappeared from diff pages. I can see the link (labeled "برچسب گشت بزن") on this diff page when on desktop, but the link is not present on mobile devices. I was not sure if I had to open a separate task for the issue, looks link it's related to this one.

Please can you open a new ticket @Jeeputer with replication instructions.

Digging into Git history, these dependencies were introduced recently, in c03ec9e by @matmarex.

That was in August September and did not cause issues at the time. The problematic styles were added in a3f03245 in October.

Couldn’t the styles (and scripts and MediaWiki messages) be loaded only when the user actually clicks the toggle link (which happens very rarely compared to the page loads that include the ext.flaggedRevs.advanced module)? Instead of showing an incomplete diff with a spinner while loading the actual diff, it could show just a spinner while the actual diff and the necessary ResourceLoader modules and MediaWiki messages are loading.

Sure, they could.

Change 972013 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Omit the last modified bar in the HTML rather than hiding it via CSS

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

Change 972013 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Omit the last modified bar in the HTML rather than hiding it via CSS

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

Change 972030 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@wmf/1.42.0-wmf.3] Omit the last modified bar in the HTML rather than hiding it via CSS

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

Change 972030 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@wmf/1.42.0-wmf.3] Omit the last modified bar in the HTML rather than hiding it via CSS

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Jdlrobson lowered the priority of this task from Unbreak Now! to Medium.Nov 6 2023, 10:26 PM

Should be fixed now.

Yes, thank you! However, the element is now double the height it should have, I guess that should still be fixed.

Change 972066 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Last modified bar should not be double height

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

We can fix that too. I've opened T350637 which it was attempting to fix.

Jdlrobson added a subscriber: Edtadros.

That was in August September and did not cause issues at the time. The problematic styles were added in a3f03245 in October.

I know that your commit didn’t directly/immediately cause the display issue, I just realized that it causes unnecessary styles to be loaded – it makes readers load diff styles, which they likely won’t ever see applied, so not only do they have extra CSS to be processed, they also have to load them from the server (for the first time), as it wouldn’t appear in the client-side cache otherwise.

Sure, they could.

Should I create a new task for that?

Change 972066 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Last modified bar should not be double height

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

Also would like to point out that the mobile history pages (whether with AMC or not) are additionally affected by this change. In e.g. https://de.wikipedia.org/w/index.php?title=Jonne_J%C3%A4rvel%C3%A4&action=history&useskin=minerva, the Undo button looks very different from the Thank button and especially the Rollback button. Also, the colours indicating flagged versions are not covering 100% width anymore, but only the width of the summary text. And on windows below 1000px, the "talk/contribs" links after the user name get hidden, while the user icon will suddenly show up. It just seems all very broken.

EDIT: And the button to show/hide selected versions (admin only) now causes overflow.

Is there already another task for the broken history pages?

That was in August September and did not cause issues at the time. The problematic styles were added in a3f03245 in October.

I know that your commit didn’t directly/immediately cause the display issue, I just realized that it causes unnecessary styles to be loaded – it makes readers load diff styles, which they likely won’t ever see applied, so not only do they have extra CSS to be processed, they also have to load them from the server (for the first time), as it wouldn’t appear in the client-side cache otherwise.

Sure, they could.

Should I create a new task for that?

Yeah, if you think that needs to be changed, please do.

Is there already another task for the broken history pages?

@XanonymusX I agree it looks broken. There seems like a few issues here with different components. I'll make sure we at least capture them before closing out this ticket.

Minerva

*The undo button appearance is covered by an intentional change to remove technical debt in Minerva that I merged: T345768. It's not great, but the history page HTML for mobile and desktop is converging, so we can't make something a button in mobile without also making also making a button in desktop and nobody was enthusiastic about that, since it doesn't meet the current definition of a button. The background on .mw-pager-tools a, .mw-history-undo a seems unexpected so should likely be removed.

Minerva or FlaggedRevisions

The following issues are caused by FlaggedRevisions loading the diff code on the history page. I can't fix these easily without some guidance on T350596. There is no way for styles to currently target a diff page from what I can tell as there is no class on HTML or body element:

  • The icon next to the username:
  • the "talk/contribs" links after the user name get hidden at lower resolutions: this is also being caused by

FlaggedRevisions

  • The colours indicating flagged versions are not covering 100% width anymore: not sure what happened here but the rule that makes ul.mw-contributions-list li > * float left was merged in 2019 ( 5e7a35946 ) so this doesn't look like a new problem, it seems like an existing issue. We should raise an issue against FlaggedRevisions.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Open a WP page in Minerva skin, e.g. https://de.wikipedia.org/wiki/Paul_Gleeson?useskin=minerva or https://de.wikipedia.beta.wmflabs.org/wiki/Schweizerdeutsch?useskin=minerva in an incognito window.
Scroll to the page footer and identify the last-modified bar ("Zuletzt bearbeitet vor …").
Reduce the screen width to below 1000px.
✅ AC1: The last-modified bar should remain visible, as it is the only way for mobile users without AMC to reach the page history.

screenshot 118.mov.gif (980×1 px, 3 MB)

Mabualruz claimed this task.

All tasks needed for addressing issues mentioned in T350515#9314743 are created and this task is mentioned on them

@Mabualruz Could you please list those tasks? I can’t find any of them in the “Mentioned In” section of the top of this page.

Test Result - Prod

Status: ✅ PASS
Environment: dewiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Open a WP page in Minerva skin, e.g. https://de.wikipedia.org/wiki/Paul_Gleeson?useskin=minerva or https://de.wikipedia.beta.wmflabs.org/wiki/Schweizerdeutsch?useskin=minerva in an incognito window.
Scroll to the page footer and identify the last-modified bar ("Zuletzt bearbeitet vor …").
Reduce the screen width to below 1000px.
✅ AC1: The last-modified bar should remain visible, as it is the only way for mobile users without AMC to reach the page history.

screenshot 127.mov.gif (666×1 px, 2 MB)