Jump to content

Extension talk:MobileFrontend/2024

Add topic
From mediawiki.org
Latest comment: 1 year ago by 77.227.173.60 in topic git repo not found:

If you have a feature request just request it here you'll get a much quicker reply :-) We are also around in #wikimedia-mobile if you want a quicker answer!


If you are trying to replicate behaviour you see on Wikimedia sites, please be sure to read through the configuration options before asking a question here.

Set custom response header to aid caching reverse proxies?

[edit]

Would it be possible to make this extension add a custom response header, like X-MobileFrontend? This would make it easier for caching reverse proxies like Varnish, or the Nginx FastCGI module's caching feature, to tell apart a mobile response from a desktop response, when using the extension's own auto-detection based on User-Agent. TaylanKammer (talk) 12:39, 14 January 2024 (UTC)Reply

Very slow

[edit]

Hey there! I am optimizing my wiki. I used Google Speed Insights to measure the impact of the optimizations I made. However, MobileFront seems to slow down the wiki dramatically:

Mobile

  • First Contentful Paint 4,5 s
  • Largest Contentful Paint 4,6 s
  • Total Blocking Time 220 ms
  • Speed Index 5,4 s

Desktop

  • First Contentful Paint 0,3 s
  • Largest Contentful Paint 0,4 s
  • Total Blocking Time 0 ms
  • Speed Index 0,6 s

Is there any way to speed up the mobile experience? Nekky-chan (Discussion | User contributions) 11:57, 18 January 2024 (UTC)Reply

Mobile web html (m.wikipedia) - mobileformat parse prop

[edit]

Hello,

I have a question regarding "mobileformat" param for parse API, we've seen that it is expected to be deprecated in favor of PCS here.

but, no notice at all under parse API docs here: https://www.mediawiki.org/wiki/API:Parsing_wikitext#API_documentation

I guess what I am asking is if the endpoint https://en.wikipedia.org/w/api.php?action=parse&page={title}&mobileformat is stable or will be deprecated anytime soon?


Thank you 🙏 TomerLerner (talk) 18:27, 7 March 2024 (UTC)Reply

Jdlrobson (talk) 20:02, 7 March 2024 (UTC)Reply

MobileFrontend loads Minerva.css and not Mobile.css

[edit]

After updating my wiki site to 1.41.0, MobileFrontend no longer load Mobile.css, instead it loads Minerva.css. Using Chrome's inspection tool, the loaded CSS has this URL:

https://www.tunguyentiengviet.com/load.php?lang=en&modules=site.styles&only=styles&skin=minerva

Adding mw.loader.using('mobile.site.styles') did not help. Faragona (talk) 08:47, 26 March 2024 (UTC)Reply

hCaptcha not appearing in MinervaNeue

[edit]

Hi, I am trying to get ConfirmEdit to work for the action "edit" as in WMF Wiki, I have MobileFrontend and MinervaNeue installed and ConfirmEdit uses hCaptcha. Now, when I edit a page on mobile and try to save it, I just get a placeholder text box that says "確認コードを入力" ("Enter confirm code", I am using a Japanese client, so it is in Japanese), The hCaptcha module does not appear. This is not a problem when creating an account on mobile or editing on PC. hCaptcha module appears without any problem. MobileFrontend 2.4.1 (8e9aead), ConfirmEdit 1.6.0. How can I resolve this? 鈴音雨 (talk) 05:43, 3 April 2024 (UTC)Reply

Excluding access to code on mobile devices

[edit]

Hi all, I'm not sure this is the right place to ask it, but I'll go ahead anyway.

I'm trying to find a way to exclude a header (introduced between double curly brackets as a template) in the mobile version. This specific header creates an undesired design failure in the mobile version, but not on the desktop, so I wouldn't like to supress it altogether.

The span class="nomobile" doesn't help, since it first compiles the header, and afterwards it just doesn't parse it on mobiles (it's a css solution after all, so the error is still there, and it affects the data outside the span tags).

I need a way for the code to actually not access the header page at all in the mobile version (not to even reach the compilation phase).

I though about using an #if, but I can't find a magic word which informs of the used platform.

Is there such a magic word o something of the sort? Is there any way to exclude access to code on mobile devices (not only prevent it from showing)?

Thanks. Virum Mundi (talk) 06:37, 15 May 2024 (UTC)Reply

Mobile.js not loading

[edit]

I have installed the MobileFrontend extension on an external wiki, and set the Minerva skin as default for mobile. The Minerva skin is loading correctly when viewing from mobile. However, I'm noticing that Mobile.js never gets loaded. I put a simple console.log('Hello World from Mobile.js') in Mobile.js, but I never see that message in the console even viewing as mobile from the Chrome developer tools. Are there any settings that need to be set so that Mobile.js gets loaded? Here is my Mobile.js: https://en.seminaverbi.bibleget.io/wiki/MediaWiki:Mobile.js . Lwangaman (talk) 11:50, 25 August 2024 (UTC)Reply

I'm also seeing that Common.js is loading always, instead of being replaced by Mobile.js. I added a console.log('Hello World from Common.js!'); to my Common.js, and I'm seeing this message in the console even when viewing as mobile from Chrome developer tools... Lwangaman (talk) 12:33, 25 August 2024 (UTC)Reply
Yes this is the correct behaviour. MobileFrontend loads Common.js and Minerva.js now. Mobile.js is in the process of being removed.
Use Minerva.js for anything specific to the Minerva skin. Jdlrobson (talk) 15:02, 25 August 2024 (UTC)Reply

Declaration of MobileFormatter::parseItemsToRemove() must be compatible with HtmlFormatter

[edit]

MW 1.39.8. I am getting this error and blank page when I try to use the extension (tried php 7.4 and 8.1).

Fatal error: Declaration of MobileFormatter::parseItemsToRemove() must be compatible with HtmlFormatter\HtmlFormatter::parseItemsToRemove(): array in MobileFrontend/includes/MobileFormatter.php on line 67

Using

wfLoadExtension( 'MobileFrontend' ); wfLoadSkin( 'MinervaNeue' ); $wgDefaultMobileSkin = 'minerva';

Edit: Looks like it is an issue with HTML formatter versions. If I use in vendor/wikimedia/html-formatter

HTML formatter 3.0.1, MobileFrontend works BUT TextExtracts/Popups DO NOT work

Conversely with HTML formatter 4.0.3, TextExtracts/Popups work but not MobileFrontend.

See https://phabricator.wikimedia.org/T376029 Spiros71 (talk) 13:27, 28 September 2024 (UTC)Reply

git repo not found:

[edit]

https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend 77.227.173.60 (talk) 13:32, 12 November 2024 (UTC)Reply