Page MenuHomePhabricator

Don't treat fmbox class as a page issue [Padlocks don't display on mobile (Wikimedia Commons)]
Open, Needs TriagePublic

Description

Please see: https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&oldid=337795329#The_new_padlocks_don't_show_up_on_mobile

The page protection padlocks don't see to display on the mobile version of the wikibrowser.

Developer notes

Example URI:
https://commons.m.wikimedia.org/w/index.php?title=User_talk:Dr._Bernd_Gross&action=edit&mobileaction=toggle_view_mobile

".fmbox" are treated like page issues and subject to ambox rules per https://www.mediawiki.org/wiki/Recommendations_for_mobile_friendly_articles_on_Wikimedia_wikis#Making_page_issues_(ambox_templates)_mobile_friendly

The code for page issues incorrectly identifies them as page issues. Removing "fmbox" class from the template would be the quickest way to solve this.

Luckily the page is still usable.

Event Timeline

zhuyifei1999 subscribed.

This is caused by https://commons.wikimedia.org/w/load.php?debug=true&lang=en&modules=skins.minerva.content.styles&only=styles&skin=minerva (matches .content a > img)

.content a > img,
.content a > .lazy-image-placeholder,
.content noscript > img {
  max-width: 100% !important;
}

This is caused by https://commons.wikimedia.org/w/load.php?debug=true&lang=en&modules=skins.minerva.content.styles&only=styles&skin=minerva (matches .content a > img)

.content a > img,
.content a > .lazy-image-placeholder,
.content noscript > img {
  max-width: 100% !important;
}

This is not the problem. The problem is the template is being incorrectly identified as a page issue/ambox template. See my notes in the description. I'm not 100% sure how to fix this in the code level right now.. but there are certain short term template fixes that can be made.

.fmbox shouldn't be treated like a page issue because the class is not used for page issues - it is used for edit notices and system messages (see documentation of template here). Treating fmbox as a page issue also breaks things on enwiki e.g on (view logged out)
https://en.m.wikipedia.org/w/index.php?title=Barack_Obama&action=edit&mobileaction=toggle_view_mobile

A not useful "learn more" link is created and the padlock image removed.

Jdlrobson renamed this task from Padlocks don't display on mobile (Wikimedia Commons) to Don't treat fmbox class as a page issue [Padlocks don't display on mobile (Wikimedia Commons)].Apr 21 2021, 10:56 PM

This one was removed by 4c60fd328dc41ea18adaea0adb59882c7369610c. (Just marking it down, IDK if that has progressed the issue documented in this task.)

Ok, in today's world post the above patch this is now the issue with this task:

This is caused by https://commons.wikimedia.org/w/load.php?debug=true&lang=en&modules=skins.minerva.content.styles&only=styles&skin=minerva (matches .content a > img)

.content a > img,
.content a > .lazy-image-placeholder,
.content noscript > img {
  max-width: 100% !important;
}

Disabling (the modern version of) this rule fixes the issue and makes the padlock nice and big on attempt to edit the example page (while logged out i.e. in private browsing) at https://commons.wikimedia.org/w/index.php?action=edit&title=User_talk%3ADr._Bernd_Gross&useformat=mobile

Which makes it a duplicate of T282588: images wrapped in flex item styling get really small in Timeless/Minerva and T367463: Tables with images inside them appear at minuscule size or disappear due to responsive image CSS and T116318: Images in tables are too small and maybe others, IDK. Maybe there is still work to do e.g. on the 367463 solution. The patch ultimately applied there says it "doesn't apply in MobileFrontend" [sic - I expect this meant Minerva], so maybe that's an actual improvement to make (use the new corer style in Minerva or mobile resolutions or something).

The image is still not displaying in the context of the newer mobile edit notices implemented for T312587: Show edit notices within mobile editing interfaces but that's pretty clearly by design since in that context the images would dominate the space. (See also T377611 I suppose.)

This line continues to exist but doesn't appear to be relevant to this task. Or at least, the original formulation of this task as submitted by DonTrung 6 years ago. It may still be necessary to clear that out for some other reason (custom hackery if nothing else), but it's not the root cause at present.