MediaWiki talk:Gadgets-definition/Archive/2012

Gadget for opening search results and suggestions in new tab

Please see the discussion here:

There is more info here:

This section was archived on a request by: Rillke(q?) 14:44, 21 September 2012 (UTC)

default gadgets identified

I've added a parameter to {{Gadget-desc}} to identify default gadgets with a *, and marked current default gadgets with it, and edited MediaWiki:Gadgets-prefstext to explain it. I think it's helpful to be able to see which gadgets you've chosen, and which are the "basic" ones. It's especially relevant for users thinking of using the "restore default settings" button at the bottom, so they'll understand more clearly what that will do. Rd232 (talk) 13:54, 22 April 2012 (UTC)

Good idea, good work, thanks! -- RE rillke questions? 17:34, 22 April 2012 (UTC)
Thanks. Incidentally, MediaWiki:Gadgets-prefstext needs creating in other languages, in order to add the explanation of the * meaning, as I did for the English version. Rd232 (talk) 09:34, 23 April 2012 (UTC)
We now put it into Template:Gadget-state to avoid editing all translations when the default bit changes. -- Rillke(q?) 14:44, 21 September 2012 (UTC)
This section was archived on a request by: Rillke(q?) 14:44, 21 September 2012 (UTC)

Hidden gadgets?

{{editprotected}} I didn't find anything on mw:Extension:Gadgets#Options about this |hidden option. Is that documented somewhere? Helder 00:15, 21 May 2012 (UTC)

BTW: since it is being used also the code "|rights=hidden", could someone create MediaWiki:Right-hidden with something like "Fake user right used to hide some gadget modules (see documentation)". This text will appear on Special:Gadgets where currently is shown the string "<right-hidden>". Helder 00:53, 21 May 2012 (UTC)
Roan mentioned something like this on Bugzilla.
Because no user has this right no one is able to see them on the interface and why not using RL for heavily used code. -- RE rillke questions? 11:27, 21 May 2012 (UTC)
I found some mention to the hidden property on mw:ResourceLoader/Version 2 Design Specification#Storage of Gadget definition, and it will only have effect when the RL2 branch of the extension is live (the current code just ignore it). Helder 13:15, 21 May 2012 (UTC)
The "|hidden" option is a way to create a ResourceLoader module in the Gadgets infrastructure that is not intended to be used (directly) by users. A jQuery plugin for example. Other (visible) gadgets can then use "ext.gadget.jQuerySomething" as a dependency, just like they can use "jquery.cookie" as a dependency already. However in Gadgets 1.0 this keyword does not exist yet. The code "|rights=hidden" is a way to simulate "|hidden" in the current version of the Gadgets extension (hence it is not documented yet). This works because nobody has an inexistent user right ("|rights=hello-there-cute-kitty" would do the same, the word "hidden" in "rights=hidden" has no significance other than being descriptive). I hope this explains it a bit.
PS: Is there an actual edit request here, or were you just grabbing attention?
Krinkletalk 17:16, 21 May 2012 (UTC)
I think the request was to create MediaWiki:Right-hidden and perhaps some documentation page.
Once we have the attention, could you tell us when the new Gadget stuff (we can use MW-messages for translation, ....) will be deployed? Thank you and also for the explanation. -- RE rillke questions? 17:48, 21 May 2012 (UTC)
Edit request nowikied, MediaWiki:Right-hidden has been created, I don’t see anything to do now. --Mormegil (talk) 21:47, 24 May 2012 (UTC)
This section was archived on a request by: Rillke(q?) 14:44, 21 September 2012 (UTC)

Gadget to open search in new tab

Can this gadget be added to Special:Preferences#mw-prefsection-gadgets? It is ready to go, I believe. I assume it has to be copied to the MediaWiki namespace:

Actually, it is still broken at least on Chrome, as reported on Commons:Village pump/Proposals/Archive/2012/08#Revised version that also works for Mac users. Helder 00:14, 10 August 2012 (UTC)
It works for me in Chrome. I could not figure out what you were talking about there. --Timeshifter (talk) 01:35, 11 August 2012 (UTC)

Comment. This working gadget got good support at Commons:Village pump/Proposals and en:Wikipedia:Village pump (technical). See:

This section was archived on a request by: Rillke(q?) 14:25, 21 September 2012 (UTC)

New groups

Is there a limitation how many times a gadget appears on the page?

Given that the topical sort is a bit problematic, maybe we could add additionals sections:

  • To make it easier to get an overview, maybe we could start with a short for frequently used gadgets that are not activated by default. (Might help new users. Selection can be done based on usage stats)
  • Further, to find new gadgets, we could add a section for gadgets created or substantially updated in the last three months. (Makes it easier for regular Commons users to find them)
  • Separately, it might help to list all gadgets that are de-activating features.
  • To conclude, we could list all gadgets that are activated by default.

Cheers. --  Docu  at 09:30, 11 February 2012 (UTC)

I don't know if that would be a good way to organise the Preferences page, but it sounds an excellent idea for a supplementary page (like Commons:Gadgets/Gadget-list say) which can be prominently linked from the top of the Preferences page. The advantage of a supplementary page is that users can watch it and see changes pop up on their watchlist. Finally, as a supplementary page it avoids radically changing the existing page, which will be less work and less likely to annoy an unknown number of people. The downside of a supplementary page would be that it couldn't (I think) use the existing Preferences il8n system, since you can't transclude MediaWiki namespace pages. Well whether it's ultimately a supplement or a replacement, it would help to do a draft to see what it might look like. Rd232 (talk) 12:12, 11 February 2012 (UTC)
Better focused sections should improve the readability of the current page.
If watchlisting is your concern, you can already watchlist this page.
Commons:Gadgets/Gadget-list wont be working properly as it wont show which tools one has activated. --  Docu  at 12:38, 11 February 2012 (UTC)
True. Maybe it would be helpful to provide a "watch this page" link from the top of the Preferences tab? Rd232 (talk) 13:48, 11 February 2012 (UTC)
I like the idea. Problem: We cannot access this page directly with JavaScript. Without JS duplicate gadget-entries seem to be impossible (not tested but it is a HTML-form that is posted and therefore duplicate names (lead to duplicate parameters) are impossible). Docu aren't you an admin in test.wikipedia.org ? Just try it there.
I believe MediaWiki itself should offer a way to display by added-date, usage by active users, type of gadget/category. -- RE rillke questions? 13:16, 11 February 2012 (UTC)
User:Krinkle knows about plans in this area for the future. Sometime this year or next, I think, gadgets will be more like a directory and less like the current list. Rd232 (talk) 13:48, 11 February 2012 (UTC)
The front-end for users will not change on the short term. There's quite a few nice things coming in the near future in Gadgets 2.0. However those are mostly infrastructural changes. We've basically rebuild the Gadgets framework from the ground up in a way that is much more effeciënt and scalable. Among the new features are Gadget repositories (gadgets made on the repo wiki can be shared to all other wikis, much like "Commons" is for embedded files). However there are no significant changes for the end-users of gadgets in the next major version. But this code refactoring does enable a wide range features to be created in the future. Something I personally hope to get in Gadgets 3.0 would be removal of the static preferences tab, and instead introduce a more visual way of ordering, sorting, documenting and searching for gadgets. But for now we need to get Gadgets 2.0 in a stable state so that all existing features still work as expected, which is going to be a tough job considering that with a large wiki farm as the one of Wikimedia, there are practically no unused edge cases –Krinkletalk 14:15, 11 February 2012 (UTC)
Thanks for the explanation. Rd232 (talk) 15:32, 15 February 2012 (UTC)
I tried it at test: currently on gadget can only appear once on the page. I suppose that also avoid issues if the settings are not in identical. --  Docu  at 06:02, 15 February 2012 (UTC)
Right. So where does that leave us? Rd232 (talk) 15:32, 15 February 2012 (UTC)
To a sortable table. Ever bought at amazon? BTW, it is possible to use js, but I won't do (too busy): Bind and event listener to the preferences-link, e.preventDefault(), retrieve the preferences-page with an XHR, insert the body of that page into the DOM, add the functionality that is wanted. -- RE rillke questions? 23:42, 15 February 2012 (UTC)
A sortable table?? Lovely idea, but I don't see how that can be done without a lot of script magic (if script is really reliable as a method; sounds like a security loophole that might get fixed). Rd232 (talk) 00:28, 16 February 2012 (UTC)
They won't get "the loophole fixed". This would require using a different serverdomain for the prefs. And yes, it would require a lot of coding to create such a table. -- RE rillke questions? 00:47, 16 February 2012 (UTC)
A sortable table seems a good idea. --  Docu  at 06:00, 16 February 2012 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 22:14, 13 May 2017 (UTC)

Browser requirement

Is it OK to have as a gadget a script that doesn't work in IE8 or older (but works in Chrome, Firefox etc)? I'd like User:Magog the Ogre/cleanup.js to be a gadget... Rd232 (talk) 00:02, 8 August 2012 (UTC)

Can you elaborate on "doesn't work"? –Krinkletalk 01:12, 8 August 2012 (UTC)
User_talk:Magog the Ogre/cleanup.js/Archive#IE8. It was over a year ago so my memory is somewhat vague, but my tests in IE8 had the script literally freeze the browser. Magog the Ogre (talk) (contribs) 14:00, 8 August 2012 (UTC)
It is ok to have such a script, I think. The fact however must be noted at the gadget's definition and the script must disable itself automatically in incompatible browsers. addOnloadHook is deprecated. There is still invalid JS at /\|(\s*[Dd]ate\s*\=[^\{]*\s*)(\d{4})\s*([\\\\\\/\.\s])\s*(\d{1,2})\s*\3\s*(\d{2})(?!\d)/mg -- Rillke(q?) 15:08, 8 August 2012 (UTC)
How in the world did you manage to find that? Magog the Ogre (talk) (contribs) 16:48, 8 August 2012 (UTC)
There is a lot more work: http://www.jshint.com (use /*jshint maxerr:1000*/). Especially undeclared variables should be fixed. -- Rillke(q?) 17:18, 8 August 2012 (UTC)
Oh I know the script is an utter mess. I only recently found out about JSLint and... not programming it so it looks to an outsider like a three year old was just mashing on the keys. Magog the Ogre (talk) (contribs) 18:27, 8 August 2012 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 22:15, 13 May 2017 (UTC)

Descriptions at Special:Gadgets are unclear

Special:Gadgets is the description page for Special:Preferences#mw-prefsection-gadgets.

I believe many of these gadgets would be used a lot more if people could figure out what they do without having to turn them on first. Even when they do turn them on they may not be able to figure them out, or use all their capabilities.

So longer descriptions, even a few more words, or an additional sentence for some of the items, would help a lot. Some of the descriptions need to be rewritten altogether.

Almost no one has the time to turn them all on to figure them all out. --Timeshifter (talk) 22:11, 9 August 2012 (UTC)

Well, better than descriptions are real documentation − we start to have quite a lot in Special:Gadgets(and even translated), but we sure need more help with that… Jean-Fred (talk) 19:40, 10 August 2012 (UTC)
I think we are talking about 2 separate things. People can go to translate.google.com to translate all of the short gadget descriptions at once on the Special:Gadgets page, or Special:Preferences#mw-prefsection-gadgets. We could even put a translate box there ourselves. So I think we should start there first. Other people can and should work on more detailed documentation and translation at the individual doc pages listed at Category:Gadget script documentation. --Timeshifter (talk) 01:57, 11 August 2012 (UTC)
Special:Gadgets is the description page for Special:Preferences#mw-prefsection-gadgets. - well actually it isn't (descriptions are stored in individual MediaWiki pages, eg MediaWiki:Gadget-HotCat), but that's not important. I totally take your point about gadget functionality needing to be clearer on the Preferences page; I did actually improve a lot of the English descriptions a bit a while ago. Some are fairly self-explanatory; some others have documentation links. We could provide more detail in individual descriptions - even mini-screenshots - but it would make the whole preferences page much bigger. A click or hover to expand solution might work, but that would need MediaWiki changes, since normal javascript is blocked on that page. Also, there is supposed to be a whole new approach to gadgets coming to MediaWiki maybe later this year, and I've no idea what that will look like. Rd232 (talk) 00:21, 11 August 2012 (UTC)
OK, I see now that Special:Gadgets has more info. I think Special:Preferences#mw-prefsection-gadgets should be completely redone. I hope Gadget 2.0 does so. I suggest a table of contents, and an additional gadget tab page or two in My Preferences. I also believe that all the descriptions on Special:Preferences#mw-prefsection-gadgets should be typed there, and not transcluded. That would help tremendously. I could rewrite and make better, short, clear descriptions for many of the gadgets. Others could too. But it needs crowd sourcing the same as any other text page on Wikipedia. Or at least simpler access. Edit-protected page that any admin can edit directly. I am talking about the descriptions only. There should be a space for descriptions after each gadget. On the Special:Preferences#mw-prefsection-gadgets tab page itself. --Timeshifter (talk) 01:55, 11 August 2012 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 22:15, 13 May 2017 (UTC)
Return to "Gadgets-definition/Archive/2012" page.