MediaWiki talk:Gadget-EditNoticesOnMobile.js


Edit request edit

Sync please. — Alexis Jazz (talk or ping me) 15:37, 13 July 2022 (UTC)Reply

@Xaosflux:, you were faster. ;-( Is it okay if I ping you when making edit requests for this? Alexis Jazz (talk or ping me) 19:44, 13 July 2022 (UTC)Reply
Please don't. But I patrol the IPERT queue several times a day. I'm not on a session where I can do this right this moment. Int-admins need to always review the code they are promoting, at least a bit. — xaosflux Talk 20:57, 13 July 2022 (UTC)Reply
  Donexaosflux Talk 21:26, 13 July 2022 (UTC)Reply
Thank you! And I'm sorry  , I won't ping you again for edit requests. Alexis Jazz (talk or ping me) 22:11, 13 July 2022 (UTC)Reply

Edit request edit

Sync please. — Alexis Jazz (talk or ping me) 04:15, 14 July 2022 (UTC)Reply

@Alexis Jazz - is this {{subst:void}} necessary here - since it is tprot, would rather not bring it in to a site js. — xaosflux Talk 10:37, 14 July 2022 (UTC)Reply
Xaosflux, oops. I added that so I could distinguish between the on-wiki version and my Greasemonkey instance of the script. Which I needed because on betacommons the script keeps loading despite removal of the "default" option from gadgets-definition. No idea why that is yet.
I use something similar in other scripts of mine. It was supposed to vanish but I didn't realize it was within the nowiki tags here. It wouldn't have done anything: no transclusion would happen due to the nowiki tags and within the script it's just text on the console. Needless to say I removed it. Alexis Jazz (talk or ping me) 13:17, 14 July 2022 (UTC)Reply
  Donexaosflux Talk 13:18, 14 July 2022 (UTC)Reply

Edit request edit

Sync please. — Alexis Jazz (talk or ping me) 19:58, 15 July 2022 (UTC)Reply

  Donexaosflux Talk 21:19, 15 July 2022 (UTC)Reply

Edit request edit

Sync please. Had a nice idea: CRC32 checksums. Actual notice text is only stored for 2 hours in localStorage now, so localStorage use is much reduced. Notices older than 2 hours were redownloaded anyway to check for changes. This made an increased expiry affordable, so identical notices can now be detected for up to 2 weeks (instead of 2 days). — Alexis Jazz (talk or ping me) 14:02, 16 July 2022 (UTC)Reply

  Donexaosflux Talk 21:09, 16 July 2022 (UTC)Reply

Edit request edit

Sync please. Popup is constrained to a window now. (85% screen width/height) I shouldn't have had to fix this. If you feel you need to remove some of the latest sassy code comments for the MediaWiki namespace version no hard feelings. — Alexis Jazz (talk or ping me) 23:02, 16 July 2022 (UTC)Reply

  Donexaosflux Talk 10:24, 17 July 2022 (UTC)Reply

Edit request edit

Sync please. Seemingly had some regression with reliable button appearance, should finally be fixed now. Alexis Jazz (talk or ping me) 18:07, 17 July 2022 (UTC)Reply

  Donexaosflux Talk 21:34, 17 July 2022 (UTC)Reply

Edit request edit

Please sync.
No more popup resizing/jumping. (or flicker in case of devices that don't show transitions)
Also adds a plaintext header lzsdeflU16, to the compressed localStorage object, similar to how mw.deflate adds "rawdeflate,". If a different compression library is used in the future this allows the current algo to be detected reliably. For existing users the header is added seamlessly without loss of edit notice data. This change isn't strictly needed for proper operation, but it'll prevent some headaches in the future. It also makes it easier for any other scripts to read ENOM's object without worrying about how to detect the current algo. (Bawl will take advantage of this very soon, sharing edit notices with ENOM) Alexis Jazz (talk or ping me) 14:11, 24 July 2022 (UTC)Reply

  Donexaosflux Talk 13:40, 25 July 2022 (UTC)Reply
For ease of processing, would you please just put edit request templates on their own line, then a line break - instead of using html markup? The template should already break the line. Thanks, — xaosflux Talk 13:44, 25 July 2022 (UTC)Reply
Xaosflux, Bawl does that by design. I've made it so that it won't do it for new sections with InputBoxes so combined with {{Request edit button}} which I created today I can hopefully avoid this in the future.
Though.. You're doing that by hand? No script? With Bawl, you could add a custom insert that allows you to edit the section and click one button to mark it as answered and post "done" under it. Alexis Jazz (talk or ping me) 22:15, 25 July 2022 (UTC)Reply
@Alexis Jazz half the time I have to fix a bunch of formatting that other people leave behind, so do that while I'm in there :D — xaosflux Talk 22:44, 25 July 2022 (UTC)Reply
Xaosflux, what kind of formatting fixes? Want me to write more regexes? Alexis Jazz (talk or ping me) 22:48, 25 July 2022 (UTC)Reply
Editors put all sorts of garbage text in to edit requests (not so much for this namespace). — xaosflux Talk 23:20, 25 July 2022 (UTC)Reply
Xaosflux, I checked a few open requests but didn't find any obvious garbage text. Do you have some examples so I can see what's possible?
Edit: there's another update for ENOM available, it should probably be synced as the current version in MediaWiki namespace turns out to affect VE dialogs. It also seems to throw a JS error sometimes which I don't think happens anymore in the userspace version. But you should probably check for yourself. I don't like making edit requests only to revert the request a little later. I've been.. distracted, lately. Alexis Jazz (talk or ping me) 06:31, 26 July 2022 (UTC)Reply
@Alexis Jazz: are you trying to open a new edit request, I don't see one enqueued? — xaosflux Talk 21:43, 26 July 2022 (UTC)Reply
Xaosflux, matmarex made me uncertain. The current MediaWiki: version turns out to affect VE dialogs, which I had missed. I think the current User: version fixes this, but I don't feel entirely comfortable anymore relying on my own testing alone.
Why does the WMF do this? Complain of an issue ("edit notice goes fullscreen!") that's rooted in OO.ui (phab:T313140), refuse to fix it, force me into creating hacks to get their approval, then complain the hack causes flicker on some phone that's not showing transitions or (once I fixed that) affects VE dialogs. :-(
I just don't know how I am supposed to handle this. And all this barely bothers me, I have much bigger things on my mind that I don't know what to do with either, so I'm probably not fully focused. :-/ Alexis Jazz (talk or ping me) 22:29, 26 July 2022 (UTC)Reply
@Alexis Jazz like most things here, there is no deadline. But it does seem like there is something that needs dealing with, so additional rollouts will be paused pending. — xaosflux Talk 23:33, 26 July 2022 (UTC)Reply
Xaosflux, I agree. I don't think time is the biggest issue here, I just don't know how to proceed. Totally open to suggestions. Alexis Jazz (talk or ping me) 00:12, 27 July 2022 (UTC)Reply

Edit request 28 July 2022 edit

Please sync. In addition to the above, when using Wikipedia:Dark mode (gadget) on Firefox position:fixed elements are badly broken, including ye olde OO.ui.confirm. So ENOM won't be loaded on Firefox anymore will scroll to top when displaying a popup when the dark mode gadget is enabled.

This practically breaks editing for that group (and users won't necessarily know who to blame), so I guess we better sync now. Alexis Jazz (talk or ping me) 05:30, 28 July 2022 (UTC)Reply

  Donexaosflux Talk 19:00, 28 July 2022 (UTC)Reply

Edit request 1 August 2022 edit

Please sync. Two minor improvements: scrolls Firefox+Dark mode users back to the original scroll position after popup dismissal and a little regression with cleanUpStyling not running when viewing a notice more than once has been fixed. Alexis Jazz (talk or ping me) 23:29, 1 August 2022 (UTC)Reply

  Donexaosflux Talk 17:55, 2 August 2022 (UTC)Reply

localStorage error potential edit

Every usage of localStorage should always be wrapped with try catch, because your quota can be full, or because you have a privacy mode enabled or cookie blocker which denies you access to localstorage.. See also: https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#exceptions mw.storage also handles this for that reason. —TheDJ (talkcontribs) 12:16, 3 August 2022 (UTC)Reply

@Alexis Jazz:xaosflux Talk 14:27, 3 August 2022 (UTC)Reply

Edit request 3 August 2022 edit

Please sync, see above. Alexis Jazz (talk or ping me) 15:18, 3 August 2022 (UTC)Reply

  Donexaosflux Talk 17:30, 3 August 2022 (UTC)Reply

Edit request 20 August 2022 edit

Please sync. Some code cleanup and a CSS adjustment. Alexis Jazz (talk or ping me) 10:29, 20 August 2022 (UTC)Reply

Switched edit request template to {{edit interface-protected}}, since the page is protected, rather than you having a conflict of interest. Victor Schmidt mobil (talk) 14:41, 21 August 2022 (UTC)Reply
Victor Schmidt mobil, thanks, there was briefly an error on {{Request edit button}} when I made that request causing the wrong template to be used. (it was apparently fixed an hour after I made this edit request) Alexis Jazz (talk or ping me) 15:23, 21 August 2022 (UTC)Reply
  Donexaosflux Talk 15:34, 21 August 2022 (UTC)Reply

Edit request 22 September 2022 edit

Please sync from User:Alexis Jazz/EditNoticesOnMobile.js. Now supports ES5, tested on IE11! See phab:T318249 and phab:T318361. That last one was even triaged as "high priority" by a WMF-staffer, must be serious.

Also added i18n support, please create MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json with the contents from https://commons.wikimedia.beta.wmflabs.org/wiki/MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json to provide translators with a working example and add Dutch interface language support.Alexis Jazz (talk or ping me) 21:59, 22 September 2022 (UTC)Reply

  Donexaosflux Talk 10:22, 29 September 2022 (UTC)Reply

Edit request 17 October 2022 edit

Please sync from User:Alexis Jazz/EditNoticesOnMobile.js. Specified contentmodel to resolve Wikipedia talk:EditNoticesOnMobile#Error at module space.Alexis Jazz (talk or ping me) 11:03, 17 October 2022 (UTC)Reply

  Done ~ Amory (utc) 12:10, 17 October 2022 (UTC)Reply

Edit request 5 December 2022 edit

Description of suggested change: sync from User:Alexis Jazz/EditNoticesOnMobile.js to fix Wikipedia talk:EditNoticesOnMobile#Notice next to search

Makes the CSS selector specific to .editor-overlay.Alexis Jazz (talk or ping me) 21:07, 5 December 2022 (UTC)Reply

  Donexaosflux Talk 14:33, 7 December 2022 (UTC)Reply

Edit request 9 July 2023 edit

Description of suggested change: add "qqq" language to aid translators (see https://translatewiki.net/wiki/FAQ) and Bengali from w:bn:মিডিয়াউইকি:Gadget-EditNoticesOnMobile.js/i18n.json. Please update MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json with the contents from User:Alexis Jazz/EditNoticesOnMobile.js/i18n.json.Alexis Jazz (talk or ping me) 09:22, 9 July 2023 (UTC)Reply

@Alexis Jazz, could you provide an appropriate Special:ComparePages link(s)? Izno (talk) 17:21, 9 July 2023 (UTC)Reply
Izno, is that special page new? I've never encountered it before. Handy!
https://en.wikipedia.org/wiki/Special:ComparePages?page1=MediaWiki%3AGadget-EditNoticesOnMobile.js%2Fi18n.json&rev1=1111792708&page2=User%3AAlexis+Jazz%2FEditNoticesOnMobile.js%2Fi18n.json&rev2=1164456985&action=&unhide=Alexis Jazz (talk or ping me) 01:48, 10 July 2023 (UTC)Reply
Pretty old at this point. Looks fairly uncontroversial. One minute. Izno (talk) 04:25, 10 July 2023 (UTC)Reply
  Done Izno (talk) 04:25, 10 July 2023 (UTC)Reply

Edit request 18 August 2023 edit

Description of suggested change: add support for Portuguese and Ilocano. (ENOM is now also used on ptwikinews and ilowiki) See diff,

Diff: [1]Alexis Jazz (talk or ping me) 23:55, 18 August 2023 (UTC)Reply

  Done Izno (talk) 22:20, 8 September 2023 (UTC)Reply

Edit request 19 August 2023 edit

Description of suggested change: button element in MediaWiki has changed resulting in the edit notice button looking strange as reported by User:Edu! on Wikipedia talk:EditNoticesOnMobile#Icon error.

Please update from User:Alexis Jazz/EditNoticesOnMobile.js (revision 1171105633). Demo test: [2].

Diff: [3]Alexis Jazz (talk or ping me) 02:10, 19 August 2023 (UTC)Reply

  Done Izno (talk) 22:21, 8 September 2023 (UTC)Reply

TypeError: Cannot read properties of undefined (reading 'classList') edit

This error is occurring at a high rate on pages ( 886 in last day) . It's contributing to some e-mail alerts I am receiving right now.

I'm seeing it the logs on various pages including drafts and articles e.g.Draft:Kaisa Hai Yeh Rishta Anjaana#/editor/0 (browsers seem relatively modern - Android 10 Chrome/119.0.0.0 for example. Presumably one of the selectors is not matching the appropriate element.

at enom.attachButton  https://en.m.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.EditNoticesOnMobile&skin=minerva&version=1fbdm:15:461
at eval  https://en.m.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.EditNoticesOnMobile&skin=minerva&version=1fbdm:17:373

@Alexis Jazz:@Izno: can you please take a look? Jon (WMF) (talk) 16:21, 30 November 2023 (UTC)Reply

Jon, I'll take a look (I can reproduce it), but I'm 99% sure it'll be because you changed an element type or classname, so I don't expect this to be a bug.Alexis Jazz (talk or ping me) 17:03, 30 November 2023 (UTC)Reply
Jon, should be fixed in User:Alexis Jazz/EditNoticesOnMobile.js. (test)
I've removed the "view edit notice" button from the toolbar and added a link to the "saveIntent" EditAttemptStep instead. (somewhere near the edit summary) Please beware that it sometimes takes weeks for an interface admin to respond. If this is an issue, umm.. I'm not sure what can be done about that. Let's hope it won't take too long. It probably helps if you test the patched version.Alexis Jazz (talk or ping me) 20:00, 30 November 2023 (UTC)Reply
Pinging me is a good way to get (my) attention, but if an urgent fix is needed, WP:IANB is also an appropriate place to ping. Izno (talk) 21:10, 30 November 2023 (UTC)Reply
  Done Izno (talk) 21:11, 30 November 2023 (UTC)Reply
Izno, thanks for the swift response!
Jon, could you please confirm whether this resolves the issue? https://logstash.wikimedia.org/ requires a login.Alexis Jazz (talk or ping me) 08:07, 1 December 2023 (UTC)Reply
@Yahya, @Lam-ang, @Saimawnkham, you should probably update the gadget as well.Alexis Jazz (talk or ping me) 08:27, 1 December 2023 (UTC)Reply
Done for bnwiki. Thank you for the ping. —Yahya (talkcontribs.) 14:30, 1 December 2023 (UTC)Reply
Thanks everyone for the super-quick response! I can confirm the errors are no longer appearing in our logs! Jon (WMF) (talk) 17:03, 1 December 2023 (UTC)Reply

Edit request 1 December 2023 edit

Description of suggested change: @Izno, I discovered an issue with the fix above: it's no longer filtering the classes that make everything yellow/purple/red/etc so notices that use tmbox/fmbox look pretty bad. Fix:

Diff: Special:ComparePagesAlexis Jazz (talk or ping me) 09:31, 1 December 2023 (UTC)Reply

  Donexaosflux Talk 09:52, 1 December 2023 (UTC)Reply