User:Krinkle/Gadgets 3.0

Rough notes
ala Chrome market place / Firefox Add-ons

Search, Find, Inform, Install

Search: - Search: [_____________________] - [x] Search through descriptions as well - Source: -- [x] Local wiki -- [x] Foreign repositories the site trusts --/ [+] Add repo - Filter: -- [x] Only search for gadgets known to support the MediaWiki version this wiki has (1.18.1) -- [x] Only search for gadgets known to work with your current skin (Vector)

Find: - Search engine result pages [      ]   {Title of gadget} [{Thumb}]     from: {repo}                               {Category}    { [+] Install gadget } [      ]   {Description (snippet)}   .. .....           [{Rating}]  {# users} .... .......  .......  .... ...  ....

Inform: /head - Title of gadget -- Rating, Category, # users - Authors (from repowiki) - + [+] Install gadget /tab: intro - Screenshot slider - Short description /tab: details - Larger description   - Authors (from repowiki) - Screenshot slider    - Report bug | Support | Website - Last updated: #date# - Compatible with: [\/ MediaWiki 1.20] [\/ Monobook] [ Not officially supported] (402 people say it works, 9 people say it's broken) - This gadget can access: (Nice to have, is this possible?, closure could include a fake window/document/mw variable to shadow the real ones) * [ ] mw.user.options * [ ] mw.user.tokens * ..                       - This gadget is an add-on to the following gadgets, these will be automatically enabled upon enabling this one: * ...                            * ...

([Report abuse], reports to repo-owner)

/tab: changelog - version, date, changes - version, date, changes - version, date, changes

/tab: stats - download stats

Install: /write to user_options.gadgets_custom_sources ["http://localhost/mw-scriptpath/"] /write to user_options.gadgets_enabled {   "local": {"gadgetid": false, "gadgetid": true}, "mediawikiwiki": {"gadgetid": true, "gadgetid": true}, "http://localhost/mw-scriptpath/": {"gadget.id": true} }

Once installed, on Special:MyGadgets - List of installed gadgets (a bit like chrome://settings/extensions) - Uninstall / Options

/write to user_option.gadget_options {   "gadgetid": { "some-pref": 123 },   "gadgetid": { "some-pref": 123 } }

Assumed / consequence

 * Gadget IDs become hashes, no longer meaningful to human readers
 * Gadgets enabling moves out of Special:Preferences
 * User scripts and gadgets merge, no longer separate
 * On Special:Gadgets when searching one can enter custom repositories. These are either:
 * Wiki urls (e.g. https://www.mediawiki.org/wiki/Main_Page) in which case we auto-detect the wiki's RL repo (the way your RSS reader detects the feed from the main page, there should be a generic tag to discover the main API path)
 * Specific wiki repo urls that return a JSON with gadget definitions:
 * https://www.mediawiki.org/w/api.php?format=json&action=query&list=gadgets
 * or for example:
 * https://meta.wikimedia.org/w/index.php?title=User:Krinkle/gadget-repo.json&action=raw&ctype=application/json https://gist.github.com/raw/Krinkle/gadget-repo.json which is how user scripts could be shared in the future.
 * , this repo is not trusted by the site, do you want to retrieve information from it? -> "Install gadget->getTitle ?" ...

Gotchas learned from Gadgets 2.0

 * Deal with naming conflicts between gadgets from different repositories by identifying them with both the repository ID and the gadget ID.