Page MenuHomePhabricator

It should be cheap to rename skins
Closed, DeclinedPublicBUG REPORT

Description

While talking about the new Vector 2022 skin many community members noted that they would like to change the skin name.
This is currently not an easy thing to do as the skin name is tied to the skin key which is tied to various concepts such as skin styles, gadgets and on-wiki scripts.

Practically https://en.wikipedia.org/wiki/MediaWiki:Skinname-vector-2022 could be changed to "Snow" but it would be confusing for a skin to be called "Snow" with the skin key "vector-2022" and not "snow"/

How might we make it easy to change the name of a skin without causing confusion/disruption?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Just to be clear on the loose outlines of what's being proposed, since this brings up the potential confusion between a skin name / skin key disconnect, I think that taking on and accepting that confusion directly is what's being proposed. Which might well still be too much to ask! Ideally, there'd be an internal codename key that is static, known mostly to developers, and used to refer to the skin, and then a display name which could be anything and changed on a dime. (And probably best to intentionally make the internal codenames different from the start so as not to surprise developers... they'd know the 2026 skin as Aardvark or whatever which it'd stay forever internally, the 2031 skin as Bittern, the 2036 skin as Crane, etc.
The old skins can be grandfathered in with names = keys, of course.)

This ticket should be closed as won't fix. "Vector 2022" and similar names were terrible from the start and that was obvious to nearly everyone. The issue isn't that skins are difficult to rename, the issue is that a very small number of people have chosen incredibly poor names for skins.

@SnowFire various projects are already localizing the skin name to their own language yet still have to useskin=vector so this change would likely benefit many non-English projects too if we were able to localize skin key.

larissagaulia subscribed.

This doesn't seem to fall under our scope, being more core rather than Performance or ResourceLoader. I'm untagging us, but feel free to ping us again if this work is prioritized.

One problem is that "vector" is already the key of another skin, the one currently used by most desktop readers and editors and which will continue in widespread use. Giving a different skin the user-facing name "Vector" is bound to lead to confusion.

@Certes I am not sure I understand your concern? The keys are unique for both skins (vector and vector-2022). e.g. useskin=vector or useskin=vector-2022 and are already in use on various communities for gadgets/site scripts e.g. https://eu.wikipedia.org/wiki/MediaWiki:Vector-2022.css

The user facing name is Vector 2022 and easily changed by editing the interface message https://en.wikipedia.org/wiki/MediaWiki:Skinname-vector-2022 (provided the project is happy to have a mismatch between the internal skin key and the name shown in preferences).

Tgr subscribed.

Not really ResourceLoader-related, as far as I can see.

(Also not really possible IMO; I'd just decline. Skin styles / scripts need to specify which skin they are for, somehow. Site configurations and user preferences also need to refer to the skin somehow. If you want to change the identifier by which they do that, of course they'll all have to be updated.)

@Tgr : I can't speak to if this ticket was correctly categorized for Resource-Loader or Platform. But to be clear, of course there needs to be a way to refer to a skin, and somehow removing that idea was never the point of this ticket. Nor was having to update every string that points at Vector or Vector 2022. I think the original ticket was pretty clear: it's a very common pattern to have an internal identifier and a localized string. For existing skins, they'd be grandfathered as having the exact same name. But if there was some sort of internal name to external name mapping, then it'd be trivial to call the newest skin Delta or Phi or whatever internally, and then change the string it's mapped to at the press of a button while all the internal code points out skin Delta. The mapping would be stored in a config file or a DB table somewhere. If that's not a priority, fine, but I just want to be clear what is being asked for.

The task description explicitly says that the skin name is already localizable but it would be confusing to change the localized name but not change the internal identifier. Are you asking for another of level of mapping (internal identifier -> publicly exposed identifier -> localized string)? It seems like a lot of potential complexity for dubious value - the disparity would still be confusing (e.g. technical documentation would still use the internal identifier, since that's the one that's the same on all wikis), it would add one more problem to copying gadget code between wikis, and the internal identifier would still have to be publicly exposed (because e.g. JS code in source control can't account for how a site might set up its mapping). Just changing skinname-vector-2022 seems like a strictly less bad option at that point.