Page MenuHomePhabricator

User groups in user link
Closed, DeclinedPublic

Description

Author: mwh

Description:
Usergroups as user link classes

Append user groups as class names in user link.
Useful for styles and scripts.

Use case: user flags gadget in ru-wiki. https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%93%D0%B0%D0%B4%D0%B6%D0%B5%D1%82%D1%8B/%D0%A4%D0%BB%D0%B0%D0%B3%D0%B8_%D1%83%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2


Version: 1.21.x
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=11800

Attached:

Details

Reference
bz42314

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:49 AM
bzimport set Reference to bz42314.
bzimport added a subscriber: Unknown Object (MLST).

Hi! Thanks for your patch!

You are welcome to use Developer access

https://www.mediawiki.org/wiki/Developer_access

to submit this as a Git branch directly into Gerrit:

https://www.mediawiki.org/wiki/Git/Tutorial

Putting your branch in Git makes it easier for us to review it quickly.
Thanks again! We appreciate your contribution.

If you have any questions, please let us know:
https://www.mediawiki.org/wiki/Communication

System usage of user groups is generally discouraged in favour of rights-based identification.

What is the purpose of this gadget?

mwh wrote:

(In reply to comment #2)

What is the purpose of this gadget?

For me it's useful in some situations. Such as visual search for some *events* like revert of vandalized edits or something. In our wiki we mark group of users who have shown themselves as attenstion who^W well, you get it. We also plan to mark admin's reverts to prevent edit wars.

Jdlrobson changed the task status from Open to Stalled.Jan 13 2021, 8:22 PM
Jdlrobson subscribed.

Can this be expanded with a clearer description? Not sure if it's still relevant and what's actually being asked.

Can this be expanded with a clearer description? Not sure if it's still relevant and what's actually being asked.

@Jdlrobson This task is a suggestion for adding, let's call it so, prefix, before the username, which will show that he is sysop/bureaucrat... I'm neutral regarding this.

Are we talking about CSS classes being added to specific links ?
I can't read Russian, so it's hard to tell from the example URL.

Are we talking about CSS classes being added to specific links ?
I can't read Russian, so it's hard to tell from the example URL.

It adds just a letter after the username. (A) if is user a sysop, B if a user is a bureaucrat and so on..

image.png (992×1 px, 384 KB)

Right got it! Thanks for humoring my questions @Kizule. from what i can see this looks like this is about adding classes in the Linker::userLink method which is primarily used in pages like Special pages and Special:Log so adding these tags to make it clearer.

I think adding this to core in the specific way requested here would add significant HTML bloat sent to all users that contribute, and give us a very difficult, narrow, and expensive API to maintain for almost no public benefit.

The idea of indicating visually who is priviledged on the wiki is questionable by itself and something Growth-Team may want to think about. Even this is not really a means to an end, but merely a tool for a larger user case, which is worth understanding and perhaps solving properly. For example, is it about curation/review during diffs? Or about trust in discussions? Or about the fact that our history page is so hard to use and to find when vandalism was added we have to go through 100 diffs and these might help you intuitively skip unlikely suspect? The fact that there are so many uses for it does not (in my opinion) justify its existence. It just means we have a lot of poor interfaces that need improving for everyone, not just a few people that came up with a creative workaround that is unusable for most people but happens to suite them during the years that we continue to ignore those problems at WMF.

The use during diffs is largely obsoleted by RCFilters / WatchlistFilters, and can be improved upon further there as-needed. If some of the other uses we think and can agree together are beneficial, we could pick up some of those and add that to the subset of links where we want to show it, explicitly and narrowly tied to the display of an icon or symbol. Not generalised. It could internally (not in the HTML) be generalised/configurable to e.g. iterate on what symbols to show and for whom etc.

I will also note that there are numerous workarounds for this that seem pretty good as-is for the handful of people that want it, which is presumably why this task has seen no activity in 8 years. The workaround is generally that a bot or person updats an array of user names inside the gadget script, and use that to add the symbols. This list is based on an API request to fetch admin users. This is essentially an optimised build step and seems ideal in terms of cost/benefit distribution and speaks to the flexibility of the gadget ecosystem. Doing this inside core is imho worse for everyone involved (readers, contributors, gadget authors, core devs, oppertunity cost for WMF).