Jump to content

Wikipedia:EditNoticesOnMobile

From Wikipedia, the free encyclopedia
(Redirected from Wikipedia:ENOM)
EditNoticesOnMobile
DescriptionIt gives you edit notices.. on mobile
Author(s)User:Alexis Jazz
StatusIt works
UpdatedJuly 15, 2022; 2 years ago (2022-07-15)
Skinsminerva (on mobile front end)
SourceUser:Alexis Jazz/EditNoticesOnMobile.js / MediaWiki:Gadget-EditNoticesOnMobile.js

This gadget does exactly what it says on the tin. It was made as a workaround due to this functionality not being supported by the Mobile Frontend system at the time. (A feature request for this had been open since 2018.) In Q3 2023 support for edit notices on Mobile Frontend came to MediaWiki: phab:T316178. This implementation is lacking some features when compared to EditNoticesOnMobile, see #Comparison.

Usage

[edit]

A default gadget is enabled for users. This gadget uses client-side javascript to check for, and then display, edit notices when editing pages. This gadget only runs on mobile versions of pages using the Minerva skin. This gadget is default for all users.

For edit notice creators: if you add an element with the "nopopupnotice" class anywhere in the notice, automatic popups will be suppressed for that notice. (but the user could still view them using the button)

Screenshots

[edit]
It does exactly what it says on the tin!!

How can I opt-out of this?

[edit]

Registered users may disable the gadget in preferences. This is not recommended, as edit notices provide important information for editors. You may disable the automatic pop-up using the popup dialog controls. Note, as disabling the automatic pop-up relies on local storage this setting is specific to each browser. Once opted-out, you may opt-in again by using the same process.

Where do I report feature requests and bugs?

[edit]

On the talk page. Please ping the author if you want a quick response.

Installation on other projects

[edit]

First copy the contents of MediaWiki:Gadget-EditNoticesOnMobile.js to your wiki. For language support besides English, copy MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json as well.

If the {{Editnotice load}} template on your project (d:Q6854142) includes the "nomobile" class you need to remove that. (like Special:diff/1097074576)

As a gadget

[edit]
  • Create MediaWiki:Gadget-EditNoticesOnMobile with for example Enable [[Wikipedia:Editnotice|editnotices]] on the mobile site. ([[MediaWiki:Gadget-EditNoticesOnMobile.js|source]])
  • Add this line in a relevant section in MediaWiki:Gadgets-definition: EditNoticesOnMobile[ResourceLoader|targets=mobile|skins=minerva|supportsUrlLoad|default]|dependencies=mediawiki.storage|EditNoticesOnMobile.js

Users will be able to turn off the script in their preferences. (if they are logged in) EditNoticesOnMobile supports both mobile and desktop Minerva.

Desktop Minerva

[edit]
Note: The desktop version of Minerva (not via mobile front end) is rarely used by editors.

In Mobile.js

[edit]

Add

mw.loader.load(mw.config.get('wgServer')+'/w/index.php?title=MediaWiki:Gadget-EditNoticesOnMobile.js&action=raw&ctype=text/javascript');

to MediaWiki:Mobile.js. Users won't be able to turn the script off.

You need to be an interface administrator to install a script for all users.

Projects using EditNoticesOnMobile

[edit]

See [1].

Translations

[edit]

Translations are stored in MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json. (currently just Bengali and Dutch) They are loaded from the project you are on, not English Wikipedia. (unless you are on English Wikipedia) To translate, copy the "qqq" language, change "qqq" to your language code and translate the messages.

[edit]

Comparison

[edit]

Comparison of EditNoticesOnMobile and the functionality that was added to MediaWiki (phab:T316178):

EditNoticesOnMobile MediaWiki
Type Gadget Available by default
Can be disabled? Yes Can be disabled by enabling EditNoticesOnMobile, otherwise unsure
Allows users to disable popups? Yes No
Allows users to revisit notice? Yes, with a button that is only visible when at least one of the following is true: the user is editing in source mode, automatic popups have been disabled or their screen is >767px wide No
Notice fatigue Avoids ever showing the user the same notice for the same article unless they haven't edited the article in 2 weeks (some considerable logic behind the scenes, but ENOM strongly avoids notice fatigue) After 24 hours the same notice on the same article will show again
Time until changes to a notice become visible to users Can take up to 2 hours due to local caching Can take up to 24 hours as it doesn't recognize changes to the notice
Dialog width Adjusts depending on your screen Always narrow
Flattening Removes various classes and elements to improve readability on mobile devices but is generally conservative. Removes layout elements more aggressively. For example, removes all images. (afaik)

Background

[edit]

Some historical background: in a very limited sense, EditNoticesOnMobile could be considered a kind-of spinoff from Factotum. The projects didn't initially share a lot of code but the author was able to reuse functionality on how to display an edit notice from that tool. Once EditNoticesOnMobile was in a reasonably matured state most of it got ported back into Factotum, to the point where the two tools now share the same localStorage object.

See also

[edit]