Last modified: 2014-06-08 00:46:15 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 T49812, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47812 - Create Mediawiki:Group-user.css to allow content differentiation for logged-in editors versus readers
Create Mediawiki:Group-user.css to allow content differentiation for logged-i...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: 1.23.0 release
Assigned To: Scimonster
https://www.google-melange.com/gci/ta...
gci2013
: easy
: 57486 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-29 00:32 UTC by Robert Rohde
Modified: 2014-06-08 00:46 UTC (History)
12 users (show)

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


Attachments

Description Robert Rohde 2013-04-29 00:32:59 UTC
Presently, Mediawiki provides the system messages:

Mediawiki:Group-sysop.css
Mediawiki:Group-sysop.js
Mediawiki:Group-checkuser.css
Mediawiki:Group-checkuser.js

etc.

Such that most user classes can have specific CSS and JS associated with them.

See also: http://www.mediawiki.org/wiki/Manual:User_group_CSS_and_Javascript

As written, the code explicitly excludes the ability to manage content based on membership in the "user" group of logged-in editors.  Is there a good reason for this?

If there is not a specific reason for prohibiting

Mediawiki:Group-user.css
Mediawiki:Group-user.js

Then I would suggest that they should be added.

Such a mechanism would provide a natural way to differentiate some content for logged-in editors vs. readers.  For example, many message boxes and error messages can be rather cryptic or unhelpful for readers, and it may make sense to provide readers with a more general explanatory statement while showing editors a different and more specific "how do I fix this" kind of message.  Obviously any such differentiation would have to be mindful of the fact that IPs can be editors too, but I think decisions about if/when message differentiation is appropriate is more a community issue than a technical one.

So, if there isn't a technical reason that would block this, can we add "user" to the set of classes that can have class-wide CSS and JS pages?
Comment 1 MZMcBride 2013-12-05 05:26:49 UTC
I think this is trivial; we already have Group-autoconfirmed.css.
Comment 2 Kunal Mehta (Legoktm) 2013-12-05 05:31:56 UTC
Pretty simple, code is at https://github.com/wikimedia/mediawiki-core/blob/master/includes/resourceloader/ResourceLoaderUserGroupsModule.php#L62

Will also need i18n messages.
Comment 3 Tim Weyer 2013-12-05 07:03:40 UTC
I see a need in MediaWiki:Group-user.css/js since autoconfirmed is not granted from the user's registration in some wikis.
I've tried to do some CSS for non-autoconfirmed but logged-in users in MediaWiki.org and was just wondering about that behaviour.
Comment 4 MZMcBride 2013-12-05 07:06:50 UTC
Copying Happy-melon on this bug in case he'd like to weigh in here (he authored r82285).
Comment 5 Happy-melon 2013-12-05 09:21:31 UTC
> Obviously any such differentiation would have to be mindful of the fact that
> IPs can be editors too, but I think decisions about if/when message
> differentiation is appropriate is more a community issue than a technical
> one.

My reason for not originally implementing Group-user is basically a personal philosophy, that I do not trust wiki communities (enwiki especially) to *actually* remember the point above.  "Logged in verses logged out" is **not** the same as "readers verses editors", and as such, I felt (and still feel) that this feature had *only* misuses, not legitimate uses.  If this was made available as the only way of cleanly leveraging one of these distinctions, it would be used as "well this is the best we've got", but it's use would actually be quite detrimental to the wiki's openness.
Comment 6 Liangent 2013-12-05 09:36:38 UTC
*** Bug 57486 has been marked as a duplicate of this bug. ***
Comment 7 Kunal Mehta (Legoktm) 2013-12-05 16:46:48 UTC
(In reply to comment #5)
> My reason for not originally implementing Group-user is basically a personal
> philosophy, that I do not trust wiki communities (enwiki especially) to
> *actually* remember the point above.  "Logged in verses logged out" is
> **not**
> the same as "readers verses editors", and as such, I felt (and still feel)
> that
> this feature had *only* misuses, not legitimate uses.  If this was made
> available as the only way of cleanly leveraging one of these distinctions, it
> would be used as "well this is the best we've got", but it's use would
> actually
> be quite detrimental to the wiki's openness.

Agreed, some people probably will misuse it. That said, I don't think we should limit the software in a way like this. If you have a fishbowl wiki, the distinction between readers and editors *is* whether you're logged in or not.
Comment 8 Happy-melon 2013-12-05 17:25:22 UTC
(In reply to comment #7)

> Agreed, some people probably will misuse it. That said, I don't think we
> should limit the software in a way like this. 

Are you saying that because you believe that the potential for legitimate use outweighs the potential for misuse in this instance, or because you think as a general principle we should *never* not implement features because they have the potential to be misused?  If so, I don't think that's a very realistic position.  The damage to new editor recruitment that creating a UI distinction between logged-in and logged-out would do is creeping and insidious (user makes first tentative step towards editing, is suddenly attacked by a barrage of weird new functionality; conversely reader does not see any of the invitations to edit, so does not make first step).

If you have a fishbowl wiki, the
> distinction between readers and editors *is* whether you're logged in or not.

This has never been an issue that's particularly hard to work around; the main benefit to having it done 'formally' is mainly proper caching via ResourceLoader, and reduction of redundant code load.  Both of which are less important on a fishbowl wiki, which will generally be smaller.
Comment 9 Scimonster 2013-12-05 17:54:45 UTC
I've taken up this task in the Code-in, and should have a working patch very soon.
Comment 10 Gerrit Notification Bot 2013-12-05 18:07:52 UTC
Change 99434 had a related patch set uploaded by Scimonster:
Add group-user-css/js messages.

https://gerrit.wikimedia.org/r/99434
Comment 11 Bartosz Dziewoński 2013-12-05 18:57:53 UTC
One use-case I ran into myself is scripts which use custom preferences (see https://www.mediawiki.org/wiki/API:Options#Changing_options) – these can sometimes only be reasonably ran for registered users.
Comment 12 Gerrit Notification Bot 2013-12-06 08:12:41 UTC
Change 99434 had a related patch set uploaded by Scimonster:
Unblacklist group-user-css/js

https://gerrit.wikimedia.org/r/99434
Comment 13 Gerrit Notification Bot 2013-12-06 20:45:30 UTC
Change 99434 merged by jenkins-bot:
Unblacklist group-specific JS/CSS for the user group

https://gerrit.wikimedia.org/r/99434
Comment 14 Bartosz Dziewoński 2013-12-06 20:46:20 UTC
Done by Scimonster as a GCI task. Thanks!

I updated the documentation at [[mw:Manual:User group CSS and Javascript]].

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


Navigation
Links