Page MenuHomePhabricator

Make switch to old look a one-click button
Closed, DeclinedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

On en:wp, when using Vector 2022: click "Switch to old look" in the left sidebar and try to switch.

What happens?:

  • I am taken to the "Skin" preferences section, and have to figure out to click on Vector 2010, scroll down, and click Save
  • After saving, I am still on that preferences page, with the changes applied, and have to manually navigate back to the page I was on before

What should have happened instead?:

  • A one-click change back to my previous skin selection, while staying on the page I was reading. (what I thought the on-wiki discussion was pointing towards; I didn't find another phab task for this)

(In the same conversation, I thought that Vector 2010 would also have a persistent "Switch to new look" link in the same place in the sidebar, making it easy to switch back and forth; see T313747)

Developer notes

This should reuse the code in the banner we made. Ask Szymon for the code. Note, that there is special handling for global preferences and the code works in the opposite way to what we want it to do.

$( document ).on( 'click', '#vector-banner-opt-in', function ( ev ) {
    event.preventDefault();
    var confirm = window.confirm( "{{{warning}}}" );
    if ( confirm ) {
        var api = new mw.Api();
        api.saveOption( 'skin', 'vector-2022' ).then( function (r) {
            try { 
                if ( r.warnings.options.warnings.indexOf('globalpreferenceoverrides') > -1 ) {
                    return api.postWithToken( 'csrf',
                        { action: 'globalpreferenceoverrides', optionname: 'skin', optionvalue: 'vector-2022' }
                    );
                }
            } catch ( e ) {
                // do nothing
            }
            try {
                localStorage.setItem('vector-banner-switcheroo', 1 );
                mw.track('counter.MediaWiki.vector_banner_signup');
            } catch (e) {
                // do nothing
            }
        } ).then( function (r) {
            location.reload();
        } );
    }
});

Event Timeline

?setskin=vector or something similar may do the trick. The functionality needs to be tested under multiple circumstances in which the link is visible, such as following a #Sectionlink or viewing a diff page.

Jdlrobson renamed this task from "Switch to old look" on en:wp doesn't make clear how to do that, doesn't return to source page to Make switch to old look a one-click button.May 16 2023, 1:14 AM
Jdlrobson updated the task description. (Show Details)
Jdlrobson subscribed.

What is the hypothesis with this change? What are we hoping to achieve with a one click experience? Surely we shouldn't be pushing people to an older skin, especially if there is no way to undo the change? In the proposed solution, clicking the button (even accidentally) would throw a confirmation step that if followed would put the user in Vector skin. There is no corresponding link in Vector to try the new skin so they'll be stuck.

@Jdlrobson the original proposal was a pair of links in the identical place in the sidebar. (possibly with a confirmation popup, but no switching URLs, and the only page refresh would be to load a different skin). When implemented that way it is fast to switch, and clear what just happened and how to switch back. (It's not a novel idea; many products present a "switch back" toggle during a new rollout in this way)

(In the same conversation, I thought that Vector 2010 would also have a persistent "Switch to new look" link in the same place in the sidebar, making it easy to switch back and forth; see T313747)

More generally, pref-changing could be part of a flow state. Switching to a prefs page and not being returned to the page of origin can be frustrating. (I'd love to see stats on how many people fail to complete prefs updates, or to return to the prev page, or just end their session.)

This request could be rewritten as
"Apply 2.-3. from this pattern for [rollout w/ "switch back" option] :

  1. One-time banner to invite opt-ins to the change (one-click implementation, no confirmation)
  2. Move that link (upgrade to new) to somewhere persistent during transition period.
  3. Add reverse link (switch to old) in the same place for those who have switched.
  4. During a forced upgrade, keep a control group that are not forced
  5. Remove both links after transition period

"

The persistent sidebar link to upgrade to new invites opt-ins more aggressively (change is coming!), including from those who set a pref once because the new thing didn't yet suit them, to help migrate over time. It can itself be a skin pref for those who don't want to see it. The persistent links in both directions, w/ minimal friction, makes it easier to switch back and forth. (Active users especially will often like the new thing, but not for edge cases where it still breaks their old workflow.)

If the change is clear and snappy enough, this doesn't need a confirmation step (or just a popup like you get now on changing page width); just click again to undo. And definitely doesn't need a confirmation step more than once per user.

This should improve data on usage + user prefs, and be a distinct quality-of-click improvement.

Seems like the ship has sailed on this one. I don't think we should be encouraging switch to old look at this time, we'd effectively be pushing them into a lesser-maintained skin.