Last modified: 2013-12-10 02:14:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31301, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29301 - Gadgets for anonymous users
Gadgets for anonymous users
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Gadgets (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-07 20:08 UTC by Helder
Modified: 2013-12-10 02:14 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2011-06-07 20:08:10 UTC
Currently, it doesn't seems to be possible for an anonymous user to enable any of the options (scripts and/or stylesheets) available through gadgets.

On English Wiktionary, there is the page [[wiktionary:Project:Per-browser preferences]], which complements Gadgets extension and can be used by all users to turn on/off some additional JS/CSS features, even if they are not logged in. Such user preferences are stored in a browser cookie and need to be refreshed every 30 days.

I think the Gadgets extension should be enhanced in order to provide a better user experience for anonymous users in the same way which is currently done on English Wiktionary. Specifically, the extension would:
* Continue to be as it currently is for logged in users;
* Provide some page (e.g. [[Special:Gadgets]], but with checkboxes) where unlogged users could have the chance to enable (or disable, since Bug 13742 was fixed) the tools which are available for logged in users. In this case, though, the preference would be browser-specific (as happens on Wiktionary).
Even if the user needs to refresh his preferences after some time of use (30 days), and every time they change of browser/computer, this approach seems to be a good improvement compared to the current situation.

Any thoughts?

== See also ==
* Bug 16266 - Gadgets extension should have the ability to disable gadgets with a URL parameter
Comment 1 Max Semenik 2011-06-07 20:10:10 UTC
This would kill caching for anons, not acceptable from a performance point of view.
Comment 2 Brion Vibber 2011-06-07 20:13:45 UTC
Something could be rigged up with cookies and localstorage and whatnot, but to date we tend to prefer that stuff like that goes in a user account's preferences; otherwise you lose all your preferences when you jump to another browser, and you still don't get any of the other account conveniences.
Comment 3 Helder 2011-06-07 20:25:43 UTC
I don't know much about caching (almost nothing, indeed), but if we put something like
-----------------------------------------------------------------
    for (var i = 0; i < gadgetsList.lenght; i++) {
        if( $.cookie( gadgetsList[i].name ) == 1 ){
            mw.loader.load( 'ext.gadget.' + gadgetsList[i].name);
        }
    }
-----------------------------------------------------------------
in an startup module for anonymous users, will it have caching issues?

(the cookies used above would be set once the user submit the changes to the checkboxes in a specific special page such as [[Special:Gadgets]])
Comment 4 Helder 2012-08-01 21:05:39 UTC
What about this?
-------------------------------------------------------------------------------
var gadgetsList = $.grep( mw.loader.getModuleNames(), function( module ){
    return module.substr(0,11) === 'ext.gadget.' && $.cookie( module ) === '1';
} );
mw.loader.load( gadgetsList );
-------------------------------------------------------------------------------


Then a page could have buttons which when clicked would execute thinks such as this:
-------------------------------------------------------------------------------
$.cookie( 'ext.gadget.HotCat', 1 );
-------------------------------------------------------------------------------
Comment 5 Krinkle 2012-08-02 07:39:55 UTC
As long as it isn't handled in the server output, it isn't a problem.

I'd recommend implementing this as an actual gadget. This is possible because as of a little while now, gadgets can be enabled by default as well as for anonymous users (not *by* anonymous users, though).

One comment though: Use a more elaborate cookie name.
* Prefix with wgCookiePrefix
* Include something like "anonModuleLoad" or something. So that it clear what the cookie is for.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links