Community Tech/Global preferences

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

The Global preferences project aims to make it easier for contributors who work on multiple wikis to set some of their preferences once, and have that setting apply across all wikis. The prime example is setting the interface language -- without global preferences, a user whose primary language is French has to change the language in their preferences on Meta, Commons, Wikidata, Spanish Wikipedia, etc. For people whose work involves multiple wikis -- functionaries, developers, program organizers, gadget creators -- this is a tedious step that should be handled automatically.

This was the #4 wish on the 2016 Community Wishlist Survey, and the Community Tech team is working on it, starting in summer 2017.

Community Tech's work is building on the GlobalPreferences extension, which was created by Kunal Mehta (User:Legoktm). The team is rewriting some of the backend code, and making some changes to the user interface.

Here's how it works:
Global prefs link on special preferences.png


There will be a link in the top box on Special:Preferences that says: "Set your global preferences". That link takes you to a separate page, Special:GlobalPreferences.

Global preferences radio buttons.png


GlobalPreferences will have the same structure as the regular Preferences page. There will be an extra column of checkboxes along the left side, which allow you to choose a specific preference that you'd like to set globally. Then you save your choice by clicking the Save button, as you normally do on Preferences.

There are a handful of items on the Preferences page that can't be part of GlobalPreferences: signature, gadgets, and items in Basic Information that are wiki-specific, like user groups and edit count.

You can choose to set all of the available preferences as global, but you don't have to. For the preferences that you don't specifically choose to be global, nothing will change.

Global preferences - setting the preference 2.png


On the regular Special:Preferences page, you'll see the preferences that you've chosen to be global as grayed out, with the message: "This preference has been set globally and must be modified through global preferences." You can visit GlobalPreferences to change the setting, or to remove it from your list of global preferences.


Here's a video that shows how you can switch from Preferences to GlobalPreferences, and back again.

Local exceptions[edit]

Version 2 of the Global preferences feature will allow users to make local exceptions for their global preferences.

For example: You want to see Dutch as your interface language on all wikis except for French Wikipedia, where you want to see French. Here's what you would do: navigate to Global Preferences, set Dutch as your interface language, and then check the box that makes that preference global. Then navigate to French Wikipedia, and go to your Preferences. You'll see that the global value is in effect, with a checkbox under the language preference. Check "Set a local exception for this global preference", and then you can set the French Wikipedia language to French. For all other wikis, the global preference is still in effect.

Global prefs local exceptions 1 with no global.png

Current Special:Preferences layout
The current preferences layout, without global preferences.

Global prefs local exceptions 2 without local exception checkbox.png

Local preferences, when there's a global preference (current version)
The current version of the extension that we're building.
You've set a global preference in Special:GlobalPreferences, and now you're looking at the local Preferences page on your home wiki.
The preferences that have been set globally are grayed out, with a line underneath telling you that you can change that preference on GlobalPreferences.

Global prefs local exceptions 3 with local exception checkbox.png

Local preferences, with a new "make a local exception" checkbox (proposed change)
The proposed change, to add local exceptions.
You've set a global preference in Special:GlobalPreferences, and now you're looking at the local Preferences page on your home wiki.
The preferences that have been set globally are grayed out, plus there's a checkbox underneath that says, "Set a local exception for this global preference."

Global prefs local exceptions 4 with local exception checkbox checked.png

Local preferences, with the "make a local exception" checkbox enabled
The proposed change, using the local exception checkbox.
The preference is live again, and you can set it to whatever you want the local exception to be. The global preference is still set on the GlobalPreferences page.
If you uncheck this checkbox, the preference will return to the state it was in on the previous wireframe -- a grayed-out preference that shows what you've set as a global preference.

With this approach, you can always see the preferences of the wiki that you're currently on, and if you see a preference that you want to change locally, then you can change it right there.

Important links[edit]

August 23, 2017[edit]

Work has started in earnest on Global preferences, and we've got some questions about how to approach local exceptions in the section above.

So far, the responses on the talk page about local exceptions have mostly focused on language and notifications. If we build local exceptions for specific preferences like language, here's one way that could work: an extra checkbox under the preference that says "Set an exception to this global preference". When you click that checkbox, a field opens underneath it, which says "If you want to use the default language on specific wikis instead of your global preference, list the wiki(s) in the field below, one wiki per line, using the form en.wikipedia."

July 28, 2017[edit]

Here's wireframes for a tweak to the UI, putting the global checkboxes in a column on the left, along with a dropdown switch to set "all" or "none" at once.

Current questions[edit]

  • We haven't figured out how to handle local overrides yet.
  • Which sections can't be globalized? Sam says in phab:T68869#3480376: Email address, gadgets, timezone offset. These should be removed from the GlobalPreferences interface. (Also signature? These sometimes have links to specific wiki pages.)
Signatures should not be localized. Not only because different wikis have different conventions regarding these, but also because this will enable users to shoot themselves on foot: for example, a Spanish user might set their signature to [[Usuario:Foo|Bar]], but that will not work on most wikis. Max Semenik (talk) 23:33, 28 July 2017 (UTC)
Timezone can be globalized I think, it's not at the moment but that's a bug. The current list of non-globalisable preference form items is: 'realname', 'userid', 'usergroups', 'editcount', and 'registrationdate'. To this list should be added gadgets, but surely it'd be good to find a way to globalize email addresses? How many people want different email addresses on different wikis? Although, perhaps because it's a different storage structure we could leave it for now? Other things to remove from globalpreferences are 'Edit watchlist', and 'Watchlist RSS Token'. Sam Wilson 01:47, 31 July 2017 (UTC)
  • How will new settings be handled, when they're introduced on Preferences?
This doesn't need anything from us, GlobalPreferences just uses whatever preferences available. Max Semenik (talk) 23:33, 28 July 2017 (UTC)
The only thing might be to provide some way for extensions to say whether their preferences should be allowed to be global? e.g. Gadgets would do that. Sam Wilson 01:47, 31 July 2017 (UTC)
  • Would this release as a Beta feature?
Beta features are enabled per wiki, which makes no sense for this extension. And because GlobalPreferences is already opt-in based, an extra beta feature would not make sense anyway. Just flip it on and advertize it to users. Max Semenik (talk) 23:33, 28 July 2017 (UTC)

July 19, 2017[edit]

Current interface for setting global preferences

Kunal (User:Legoktm) has worked on two different solutions for this problem: an extension (Extension:GlobalPreferences) and a Toolforge tool (Legoktm/globalprefs).

Extension:GlobalPreferences is currently being used on Shoutwiki -- see swmerchandise.shoutwiki.com (or any other Shoutwiki site) for an example. The extension adds a link on the first box ("Basic information") in the user's preferences: "Set your global preferences". This links to another special page, Special:GlobalPreferences, which offers the same options as the regular Preferences page, plus an extra checkbox for each item that says "Use this preference on all wikis."

The Toolforge tool is an experiment in a different direction -- a separate form that a user could use to set a preference, and then copy it to all wikis. The existing tool only changes the user's interface language.

Community Tech could go in either direction -- there's pros and cons to both -- but we've decided to adapt the extension, improve it and get it released. The extension's strongest advantage is that it's adaptable -- it can include new settings as they're added to Preferences, and it would only show preferences for the wiki that the user is currently on. A separate tool would have to keep updating with new settings as they're released, which isn't likely in the long-term.

One drawback for the extension is that it adds extra checkboxes under each choice on the preferences page, which is messy and difficult to use. We can improve the UI to make things clearer.