Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

Implement Gadget Manager
Open, Stalled, 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: Could you explain what a "Gadget Manager" is in the bug description? Is this a front-end UI or a back-end feature for ResourceLoader?

Specified at https://www.mediawiki.org/wiki/ResourceLoader/Version_2_Design_Specification#Gadget_Manager

The gadget manager is the user interface, to be hosted on Special:Gadgets, that effectively replaces MediaWiki:Gadgets-definition. From there gadget definitions can be created, modified and deleted.

In Gadgets 2.0, the definitions are stored in a separate content model in the revision store. However they're not meant to be modified directly, there is a GUI for it.

Change 247869 had a related patch set uploaded (by Kaldari):
[WIP] Add Gadget manager, overhaul Special:Gadgets

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

For Community Tech: the task is to remove code from Legoktm's WIP patch related to cross-wiki/global gadgets, and update to current standards.

@Krinkle, @Legoktm: The documentation at https://www.mediawiki.org/wiki/ResourceLoader/Version_2_Design_Specification#Gadget_Manager leaves me with several unanswered questions:

  • What is Special:Gadgets/<id> for? What information or interfaces are shown there?
  • What is the actual process for editing a gadget definition (starting from the Gadget Manager (Special:Gadgets))?
  • Can you edit or delete a gadget from the corresponding Gadget_definition page, or do you have to do it through the Gadget Manager?
  • If you delete a gadget from the Gadget Manager, what happens? Does that just disable it? Does it delete the corresponding CSS and JS pages? Does it delete the Gadget_definition page?
  • When you create a gadget, is it immediately available in the preferences?
  • Is there a separate "enable/disable" function?
  • What aspects of Gadgets 2.0 will be included in the first iteration? What features will be added later?

I guess what I'm lacking is a very general bird's eye view of how Gadgets 2.0 is supposed to work. Mock-ups of Special:Gadgets, Special:Gadgets/<id>, and the interface for editing gadgets would help a lot, but I understand if you don't have time to do that. At the least, a description of what the new Special:Gadgets page is supposed to contain would be helpful, as I only have a very vague idea at this point.

@Krinkle, @Legoktm: The documentation at https://www.mediawiki.org/wiki/ResourceLoader/Version_2_Design_Specification#Gadget_Manager leaves me with several unanswered questions:

  • What is Special:Gadgets/<id> for? What information or interfaces are shown there?

The same as Special:Gadgets overview, but a permalink to the details of just one gadget definition. This is also from which definitions can be exported or deleted, e.g. Special:Gadgets/:id/export.

  • What is the actual process for editing a gadget definition (starting from the Gadget Manager (Special:Gadgets))?

View Special:Gadgets. This outputs a table-like interface with one row for each gadget. Click "Modify gadget" in the row you want to modify. Without javascript, this points to action=edit of the gadgets definition page. With javascript (and user right), this opens a dialog for a visualised editing interface to modify each of the properties where most fields are autocompleted (e.g. skin names, message keys, script/style page names).

  • Can you edit or delete a gadget from the corresponding Gadget_definition page, or do you have to do it through the Gadget Manager?

The Gadget manager points to action=delete of the gadgets definition page.

  • If you delete a gadget from the Gadget Manager, what happens? Does that just disable it? Does it delete the corresponding CSS and JS pages? Does it delete the Gadget_definition page?

It deletes the gadget definition page only. Wiki pages for script, style and interface messages (in Gadget and MediaWIki namespace respectively) are retained and may be deleted separately if desired (and not used elsewhere).

  • When you create a gadget, is it immediately available in the preferences?

Yes.

  • Is there a separate "enable/disable" function?

No.

  • What aspects of Gadgets 2.0 will be included in the first iteration? What features will be added later?

The proof of concept RL2 branch implemented all features kind of. In the recent clean up work by @Legoktm and yourself the "Global gadgets" aspect was removed pending outcome of T71445. I don't expect this to be added later. Rather it will receive its own solution, likely based around Git and a friendly deployment model.

I guess what I'm lacking is a very general bird's eye view of how Gadgets 2.0 is supposed to work. Mock-ups of Special:Gadgets, Special:Gadgets/<id>, and the interface for editing gadgets would help a lot, but I understand if you don't have time to do that. At the least, a description of what the new Special:Gadgets page is supposed to contain would be helpful, as I only have a very vague idea at this point.

The code in the RL2 branch should work fine to get a general sense. I've checked it out just now, ran update.php and viewed Special:Gadgets. Here's what it looks like:

Screen Shot 2015-11-07 at 00.29.07.png (238×1 px, 23 KB)

Screen Shot 2015-11-07 at 00.29.44.png (1×1 px, 163 KB)

Screen Shot 2015-11-07 at 00.30.19.png (841×1 px, 174 KB)

@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.Fri, Dec 27, 4:23 PM
SD0001 removed the point value 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.Wed, Jan 8, 8:29 PM

Blocked on subtask T382995