Jump to content

Manual talk:User preferences/Flow

About this board

Most discussion happens at


How to inject a different Preferences object?

1
Samwilson (talkcontribs)

I'm working on Extension:GlobalPreferences and trying to figure out how best to do things with the all preferences, after they've been defined (in order to show various extra Preferences-form bits and pieces). At the moment, we're using $wgExtensionFunctions and hacking the $wgHooks global to add a new callback at the end of $wgHooks['GetPreferences'].

One idea is to add a new MediaWiki service called 'PreferencesFactory', that can be used to retrieve a new Preferences object. Extensions would then be able to use the MediaWikiServices hook to redefine the PreferencesFactory (with MediaWikiServices::redefineService()). Of course, only one extension would be able to do that (which maybe is a bit odd?).

Apart from being able to override the Preferences class, a service for this would also mean the Preferences class could be refactored (gradually?) to not be such a collection of static methods.

The proposed patch is: https://gerrit.wikimedia.org/r/#/c/374451/

I'd love to hear anyone's ideas about this, including completely different and better ways to do things. :-)

Reply to "How to inject a different Preferences object?"

User Preference descriptions - Where stored & changed, and where documented? - How to mark the "defaults"?

11
Quiddity (talkcontribs)

I suggested at en.wiki, that default preferences should be marked, and I'm bringing the synopsis here.

Ideally, we mark the defaults within mediawiki itself, so that all wikis can benefit. (Versus, us hacking together a custom fix at every language/project).

It would be best if they were all marked within the Special:Preferences page/tabs itself, and automagically updated when a sysop changes the default itself (rather than, any change requiring a separate edit to a documentation page).

A few defaults are mentioned at m:Help:Preferences and mw:Help:Preferences and etc, but not many, and the docs are not always up-to-date.

There are no specific bug-tickets that I can see. However bugzilla:17188, bugzilla:18961, and bugzilla:33327 ask for, or hint at this, in the comments.

Context / rationale:

Marking ALL the Special:Preferences defaults, on every tab, would be helpful. There's the "Restore all default settings" button-of-doom which wipes out all our customizations (except email-address, afaik), but often I'll want to make sure that I'm seeing a page the way most other editors do. Eg. setting thumbnail size defaults. I know I've changed a few options at Special:Preferences#mw-prefsection-editing, but I'm not sure which...

Options, for the visual indicator of "default":

  • Markers. (Placed either next to the check-box/form-field, or after the description. Needs to support true/false checkboxes, and strings.)
  • A mouse-over tooltip. (Downside: Requires user-discovery. Also hard to see at-a-glance how many items I've changed from default.)

Documentation:

I searched for 30 minutes, but got very lost. I was hoping to find a page that explained where the descriptions are kept. Manual:$wgDefaultUserOptions seems to contain info on changing the values, but not the descriptions. Possibly it's not documented anywhere? (Or possibly I've just had insufficient coffee and/or experience with mediawiki...).

Hope that helps!

88.130.81.67 (talkcontribs)

Hi!

I would not take a mouse over tooltipp - not visible enough. And imagine you have a list with say 10 items; how long do you think the average user will invest until he found the default? No. A text "(default)" sounds nice.

But please don't add it to all and every field there: Yes, an empty name and e-mail-address are the default... ;-)

I think the right place to actually get it done would be an issue in bugzilla or even better the corresponding patch in Gerrit. :-)

Ssscienccce (talkcontribs)

I'm looking for those default settings as well. I noticed I had a (40 alfanum ) watchlist token, but I can't remember ever having enabled that feature and I don't use RSS feeds.

Quiddity (talkcontribs)

The random watchlist token example is automatically created. Everyone gets one. The feature is safely ignorable.

Ssscienccce (talkcontribs)

I know that's an example (changes when you refresh the page), but I meant the one in the edit field. Anyway, I removed it and saved my settings, but I still don't know if I entered it in the first place.

Quiddity (talkcontribs)

I found 6 descriptions at Mediawiki:Tog-..., but where are the rest? (I assume they're buried in the mediawiki code itself, but what sections/keywords, so that I can fill out a better bugreport?)

And, where should I request input next (I'll just post a link pointing to this thread), given that my question here, and at en.wiki, and at bugzilla:17188, haven't been responded to? Thanks :)

MarkAHershberger (talkcontribs)
Mattflaschen (talkcontribs)

I saw this when it got moved to this page. I don't know what the exact UX might be, but I've definitely seen other preference pages where the default is shown, and I think this is a good idea. Has anyone filed a bug yet?

This post was posted by Mattflaschen, but signed as Superm401.

Quiddity (talkcontribs)

Currently, there are just the 3 bugs I linked in the top post, which either mention or get close to the fundamental issue.

As mentioned above, Commons adds d markers, but only for the Gadgets section, and they have to be manually kept up-to-date. We really want/need something that is automagically updated, when a site setting is changed. I don't understand the technical aspects well enough to file a bug for that, or to flesh out the idea beyond what I wrote above.

(Sidenote: I also added this issue as a crucial "High level requirement" (#3) at Requests for comment/Redesign user preferences, all of which could use more feedback/brainstorming/assistance over the coming weeks and months. :)

Nemo bis (talkcontribs)

The "d" is not a Commons thing, it comes from the extension itself when a gadget is defined as default.

P.s.: Only two other watchers for this page and 50 % of them replied to the moved thread, an incredible success rate. ;-)

Quiddity (talkcontribs)
Reply to "User Preference descriptions - Where stored & changed, and where documented? - How to mark the "defaults"?"
There are no older topics