Page MenuHomePhabricator

Implement Gadget Manager
Open, Needs TriagePublic

Description

Tracker and implementation bug for the Gadget Manager that was going to be implemented during the Gadgets 2.0 sprint in July 2011.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@Krinkle, @Legoktm: Thanks. I've started creating some documentation at https://www.mediawiki.org/wiki/Gadgets_2.0. BTW, I've been trying to get the Gadget Manager interface running locally, but haven't had any luck. I've checked out 247869, switched wgGadgetsRepoClass to GadgetDefinitionNamespaceRepo and changed the SpecialGadgets registration to SpecialGadgets2.php. I currently get fatal errors about getDefinitionTitle() being undefined. Is there a particular patchset that I can checkout that will let me load the Gadget Manager and try it out? Do I also need to checkout any pending changesets in core?

Try the "RL2" branch in the Gadgets repository.

Added some documentation on getting the dev code running in case anyone else wants to as well:
https://www.mediawiki.org/wiki/Gadgets_2.0#Temporary_method_until_Gadgets_2.0_code_is_merged

This is done, but waiting for feedback from @Legoktm.

@kaldari: did you get the feedback from @Legoktm ? Is this still only "normal" priority?

This is done, but waiting for feedback from @Legoktm.

kaldari lowered the priority of this task from Medium to Low.Oct 17 2016, 5:03 PM

I'm interested in moving the four gadget namespaces to a shared read-only wiki. I want to refer to those namespaces via interwiki prefixes, mapped to the URL of a wiki that holds these content pages. To edit any page retrieved from a remote wiki, a user would need to login to that wiki to perform the editing.

Would the Gadget manager be impervious to this configuration -- that is, read-access to gadget namespaces would be via the interwiki table ??

thanks for any replies.

Krinkle renamed this task from 2.0: Implement Gadget Manager to Implement Gadget Manager.Feb 25 2017, 4:07 AM
Krinkle updated the task description. (Show Details)
Krinkle removed a subscriber: wikibugs-l-list.

For those interested in implementing this, there is code for a Gadget Manager implementation already, and can be found in the RL2 branch of the mediawiki/extensions/Gadgets repo. This is from the 2011 prototype that @Catrope and myself worked on at the time.

It is however based on the deprecated jQuery UI. I suggest migrating it to HTMLForm instead.

Comments

  • ...
  • Gadgetmanager wise, I don't see many problems.
    • It's all jQuery UI, which we are trying to get rid off.. but it is fairly self contained, so I think that's ok for now, but is there a ticket for that ?

For those interested in implementing this, there is code for a Gadget Manager implementation already, and can be found in the RL2 branch of the mediawiki/extensions/Gadgets repo. This is from the 2011 prototype that @Catrope and myself worked on at the time.

It is however based on the deprecated jQuery UI. I suggest migrating it to HTMLForm instead.

Comments

  • ...
  • Gadgetmanager wise, I don't see many problems.
    • It's all jQuery UI, which we are trying to get rid off.. but it is fairly self contained, so I think that's ok for now, but is there a ticket for that ?

@Krinkle, hi! Would you like to rethink the manager and implement it on the community configuration?

SD0001 raised the priority of this task from Low to Needs Triage.Dec 27 2024, 4:23 PM
SD0001 removed the point value 13 for this task.
SD0001 subscribed.

I started implementing a UI for editing gadget definitions using HTMLForm. I considered Community Configuration as well but that doesn't seem to precisely fit the use case. Community Config would have been suitable if there were only one gadget to configure instead of several. But let me know if there are ways to work around that.

Iniquity added a subscriber: Urbanecm_WMF.

@Urbanecm_WMF hi! Do you think it would be useful to use CC for gadget managment? And is this possible? :)

Change #1107096 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/Gadgets@master] Add special page UI for configuring gadgets in JSON repo

https://gerrit.wikimedia.org/r/1107096

SD0001 changed the task status from Open to Stalled.Jan 8 2025, 8:29 PM

Blocked on subtask T382995

SD0001 changed the task status from Stalled to Open.Feb 20 2025, 7:00 AM
SD0001 claimed this task.

I went ahead and created a user script. There are a few rough edges, but it is generally usable.

How hard would it be to make this use CommunityConfiguration? It's basically a tailored JSON editor just like all the other CC modules, so it's almost odd for it not to be in CC.

I do think Gadgets should not hard-depend on CommunityConfiguration, though. For tests, you can skip on the file level (outside the class structure) if the test class uses a trait that lives in CC.

Could you render that sections as details-summary and only keep the basic sections opened? Maybe also re-order a bit like so:

obraz.png (699×776 px, 119 KB)

I think most gadgets are like hotcat:
HotCat (⚙️) [ResourceLoader | dependencies = mediawiki.api, mediawiki.user, mediawiki.language ] | HotCat.js
or even simpler:
colored-discussion (⚙️) [ResourceLoader] | colored-discussion.css
OldDiff (⚙️) [ResourceLoader] | OldDiff.css
searchFocus (⚙️) [ResourceLoader] | searchFocus.js

So you definitely need: a code name, description, pages, and in many cases dependencies. The rest is fairly rare. Even deps are sometimes loaded by gadgets internally.

And BTW. ResourceLoader should probably be selected by default.

How hard would it be to make this use CommunityConfiguration? It's basically a tailored JSON editor just like all the other CC modules, so it's almost odd for it not to be in CC.

I do think Gadgets should not hard-depend on CommunityConfiguration, though. For tests, you can skip on the file level (outside the class structure) if the test class uses a trait that lives in CC.

CommunityConfiguration makes sense for cases where there's a single JSON blob for the whole site. In case of gadgets, there's one for each gadget. I don't think CC supports that use case. Also, Codex doesn't support several of the widgets used here. (Even HTMLForm required several improvements to support this: 1108173, 1106741, 1107093).