PHP extension to allow users to enable JS-based, user-provided gadgets from their preferences page (Homepage). This is not meant for reporting bugs or problems with local gadgets themselves.
Details
Thu, Jun 27
Wed, Jun 26
Just mentioning this discussion I opened, wondering if an hidden gadget will surely become loaded for everyone if the "default" keyword is added afterwards, i.e. not at the time the gadget definition was created.
Mon, Jun 24
Sun, Jun 23
So (unless I'm mistaken), basically the rule is "RL may find the category if its wikicode tag exists in the currently displayed content". For instance:
Sat, Jun 22
Fri, Jun 21
Change #1047718 merged by jenkins-bot:
[integration/config@master] Add Scribunto as a phan dependency for Gadgets extension
Thu, Jun 20
This can be done now using the new categories option. The interface messages on top of change list pages (watchlist-summary, recentchanges-summary, recentchangeslinked-summary, histlegend) can be customised to include the category.
Change #1047718 had a related patch set uploaded (by SD0001; author: SD0001):
[integration/config@master] Add Scribunto as a phan dependency for Gadgets extension
Wed, Jun 19
Change #1047603 had a related patch set uploaded (by SD0001; author: SD0001):
[mediawiki/extensions/Gadgets@master] Add lua library for retrieving gadgets metadata
Tue, Jun 11
Another issue: I have a case with a gadget that is defined with a "category" condition, but this gadget may also be loaded using mw.loader.load()/ mw.loader.using(), on pages that do not have the category.
Sun, Jun 9
Most of those issues could probably be fixed by using the ContentAlterParserOutput hook instead of BeforePageDisplay, to detect the relevant categories and add the gadgets to the parser output.
I don't think this should be closed just yet. This is still the "more correct" approach. The categories stuff is just a hack to avoid introducing new wikitext.
The category detection does not work when using quick preview and visual editor.
tested on fr:Moulinet_(échecs), Diaporama gadget works fine in all cases but these two
Jun 6 2024
Similarly, if the action if a history view, will the page categories be known?
Jun 4 2024
About the conditional loading based on categories: If we edit a section (instead of the entire page) and the category wikicode is outside the section, will the gadget be loaded, or not?
Jun 2 2024
May 31 2024
This should already be possible. The gadget description messages which are used in preferences support full wikitext.
May 26 2024
May 23 2024
Big +1 for this I've now hit this issue on two important widely used gadget efforts and have had to resort to creating my own i18n solution or hardcoding strings in a certain language which is not ideal :/
May 22 2024
May 16 2024
@Majr: Removing task assignee as this open task has been assigned for more than two years - see the email sent to all task assignees on 2024-04-15.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!
@Jdlrobson: Removing task assignee as this open task has been assigned for more than two years - see the email sent to all task assignees on 2024-04-15.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!
@SD0001: Removing task assignee as this open task has been assigned for more than two years - see the email sent to all task assignees on 2024-04-15.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!
May 4 2024
I was wondering today why on earth a gadget defined on MediaWiki:Gadgets-definition cannot be loaded using mw.loader.load(). This should have been documented on mediawiki.org; better late than never.
May 3 2024
Change #1014636 merged by jenkins-bot:
[mediawiki/extensions/Gadgets@master] Replace EditFilterMergedContent hook with ContentHandler override
Apr 29 2024
Apr 24 2024
I don't think there are hackathon-sized improvements to MediaWiki core specifically that would help here.
Apr 23 2024
How does this sound?
Some remarks:
- This should not be a separate Special:GadgetPreferences but part of Special:Preferences in Gadgets section, when entire usage of one particular tool can be toggled. If this tool is activated, the preferences GUI should appear immediately below (and vanish if toggled off).
- The JSON spec should be subpage like MediaWiki:Gadget-myTool/preferences.json, while site configuration might be MediaWiki:Gadget-myTool.json and implementation is at MediaWiki:Gadget-myTool.js
- Texts do need localization mechanism. A global root may contain English, French, Japanese and German, and on Commons users will expect their user language. Further translations need to be added easily by global collection of local languages.
Apr 22 2024
With MultiGadgetRepo, adoption will be gradual with users having full autonomy at the individual gadget level. This means adopting a JSON gadget is as easy as creating the appropiate page (JSON will have precedence over the entry from the legacy definition page). And switching back would involve deleting or moving said page, or changing its content model, so as to not be loaded.