Page MenuHomePhabricator

Change skin ordering in Special:Preferences
Closed, ResolvedPublic3 Estimated Story Points

Description

Currently when viewing Preferences we show the default skin at the top of the list followed by the other skins in alphabetical order:

Screen Shot 2022-01-10 at 6.03.17 PM.png (538×1 px, 132 KB)

With the introduction of new Vector while it is opt in:

Screen Shot 2022-01-10 at 6.03.53 PM.png (548×1 px, 122 KB)

AC

  • The currently selected skin will appear at the top (not the default skin defined in LocalSettings.php as currently)
  • Preferred skins come after, in the order that they are defined in by $wgSkinsPreferred. Specifically Vector-2022 and Vector skins should be next in that order (assuming neither are currently selected)
  • All other skins should follow in alphabetical order

Developer notes

Sort order is defined in core and can be tweaked, but should not require knowledge of which skins are installed: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/751813

  1. Use a new core config flag $wgSkinsPreferred to achieve the following order:
  2. Selected skin
  3. Preferred skins (defaults to [], in production we make this ['vector-2022', 'vector']
  4. Other skins in alphabetic order

QA Results - Beta

ACStatusDetails
1T298933#7669649
2T298933#7669649
3T298933#7669649

QA Results - Prod

ACStatusDetails
1T298933#7687664
2T298933#7687664
3T298933#7687664

Event Timeline

Jdlrobson triaged this task as Medium priority.Jan 11 2022, 4:07 PM

the first question that comes to mind for me is: from what perspective/usage does the order we list the skins in matter? so far I can't think of much.

we could reason that without a clear ordering need we might as well order the skins reverse chronologically, so that the newest skin is at the top, however this is complicated because skins get updated over time, so a "newer" skin might not have been updated as recently as an older one.

the only clear need I can think of so far is that keeping Vector and Legacy Vector next to each other will make things less confusing (but even that seems pretty thin, as far as reasoning goes). so one option would be:

[currently selected skin]
Vector
Legacy Vector
Minerva
Monobook
Timeless

examples of how it would look below...


if you had a non-vector skin selected:
Monobook
Vector
Legacy Vector
Minerva
Timeless

if you had Vector selected:
Vector
Legacy Vector
Minerva
Monobook
Timeless

if you had Legacy Vector selected:
Legacy Vector
Vector
Minerva
Monobook
Timeless

The above is possible.
One thing to note however is if we call it "Legacy Vector" if the sorting is based on alphabetical order this could result in different orderings for skins in different languages.

We could use skin key to counter that, but then Legacy Vector would be "v" in the alphabet so last, which might look a bit odd.

I think we can avoid this issue by making the label "Vector (legacy version)" or "Vector legacy"

@Jdlrobson can we hardcode the order, rather than sorting it alphabetically?

In T298933#7614856, @alexhollender wrote:

@Jdlrobson can we hardcode the order, rather than sorting it alphabetically?

MediaWiki core knows nothing about what skins are installed so hardcoding would be difficult.

If we show the currently selected skin at the top and then sort by skin key we get the situation where Vector and legacy Vector are always next to each other. Would that be acceptable?

  • Monobook (skinkey=monobook, selected)
  • MinervaNeue (skinkey=minerva)
  • Timeless (skinkey=timeless)
  • Vector (skinkey=vector-2012)
  • Legacy Vector (skinkey=vector)

    We could use reverse order too which would make sure Vector and Vector legacy are at the top, but that ordering would break if we ever decided to introduce the Zebra skin :)
  • Vector (skinkey=vector-2012, selected skin)
  • Legacy Vector (skinkey=vector)

Timeless (skinkey=timeless)

  • Monobook (skinkey=monobook)
  • MinervaNeue (skinkey=minerva)

the first question that comes to mind for me is: from what perspective/usage does the order we list the skins in matter? so far I can't think of much.

I don't think the order matters at all personally. As desktop improvements evolves, Vector and Vector legacy become less like each other and the name becomes more of a historic artifact. As an end user, some kind of intuitive sort order makes sense with name being the most obvious. If the order seems arbitary it sounds like it might warrant explaining to the user.

MediaWiki core knows nothing about what skins are installed so hardcoding would be difficult.

right, that makes sense. the approach you mentioned above sounds good. I'm un-assigning myself.

right, that makes sense. the approach you mentioned above sounds good. I'm un-assigning myself.

Just to confirm... selected skin at top and using alphabetical order or reverse alphabetical?

Jdlrobson renamed this task from Work out correct skin order and skin labels to Change skin ordering in Special:Preferences.Jan 13 2022, 5:14 PM
Jdlrobson updated the task description. (Show Details)

right, that makes sense. the approach you mentioned above sounds good. I'm un-assigning myself.

Just to confirm... selected skin at top and using alphabetical order or reverse alphabetical?

hmm, i guess reverse alphabetical is the only way to insure (at least until the Zebra skin comes out), that the two vector options are next to each other always...because one of them might be selected as the current skin...

@alexhollender thinking about this some more, I suppose we could add a configuration option which allows us to define "preferred skins"

The order would be:

  • selected skin
  • preferred skins in alphabetic order
  • other skins in alphabetic order

Obviously if unconfigured, the skins would just be in alphabetical order.

Would that be helpful? I think that gets you the hardcoding with out the technical debt.

@Jdlrobson that also sounds like a good solution to me, happy either way

Jdlrobson removed the point value for this task.
Jdlrobson updated the task description. (Show Details)
Jdlrobson set the point value for this task to 3.Jan 20 2022, 4:19 PM

Change 755814 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/core@master] Update skin ordering to prioritize skins set through a new config

https://gerrit.wikimedia.org/r/755814

bwang removed bwang as the assignee of this task.Jan 20 2022, 11:11 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.
bwang subscribed.
bwang updated the task description. (Show Details)

Change 755814 merged by jenkins-bot:

[mediawiki/core@master] Update skin ordering to prioritize skins set through a new config

https://gerrit.wikimedia.org/r/755814

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: The currently selected skin will appear at the top (not the default skin defined in LocalSettings.php as currently)
✅ AC2: Preferred skins come after, in the order that they are defined in by $wgSkinsPreferred. Specifically Vector-2022 and Vector skins should be next in that order (assuming neither are currently selected)
✅ AC3: All other skins should follow in alphabetical order

Screen Shot 2022-02-01 at 3.33.43 PM.png (284×659 px, 58 KB)

Screen Shot 2022-02-01 at 3.34.46 PM.png (299×794 px, 64 KB)

Screen Shot 2022-02-01 at 3.34.25 PM.png (275×670 px, 47 KB)

Screen Shot 2022-02-01 at 3.34.02 PM.png (309×746 px, 66 KB)

Screen Shot 2022-02-01 at 3.33.25 PM.png (287×804 px, 57 KB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: The currently selected skin will appear at the top (not the default skin defined in LocalSettings.php as currently)
✅ AC2: Preferred skins come after, in the order that they are defined in by $wgSkinsPreferred. Specifically Vector-2022 and Vector skins should be next in that order (assuming neither are currently selected)
✅ AC3: All other skins should follow in alphabetical order

Screen Shot 2022-02-06 at 7.35.58 PM.png (440×946 px, 83 KB)

Screen Shot 2022-02-06 at 7.36.39 PM.png (440×946 px, 90 KB)

Screen Shot 2022-02-06 at 7.37.19 PM.png (440×946 px, 83 KB)

Screen Shot 2022-02-06 at 7.37.04 PM.png (440×946 px, 76 KB)

Screen Shot 2022-02-06 at 7.36.17 PM.png (440×946 px, 87 KB)

@Jdlrobson - I'm seeing an issue with the current skin appearing at the top in production, I have vector 22 set as a global preference, unsure if that's part of the reason:

Screen Shot 2022-02-07 at 1.44.43 PM.png (652×1 px, 113 KB)

Which URL it this Olga? Can you add some replication steps?

Which URL it this Olga? Can you add some replication steps?

It was https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering but I can't seem to replicate again - looks good now. Tentatively resolving