The expand all sections setting shows at low resolutions on https://en.m.wikipedia.org/wiki/Special:MobileOptions and the code lives in MobileFrontend (resources/dist/mobile.special.mobileoptions.scripts.js)
{F41417431}
In preparation for introducing the new client preference interface we will need to update this to use the client preferences API.
# TODO
Following the discussion in T350418.
[x] Finalize support for toggle switches in the @wikimedia/mediawiki.skins.clientpreferences library. (e.g. https://gerrit.wikimedia.org/r/991442)
[] Update the existing code to use the new @wikimedia/mediawiki.skins.clientpreferences library.
[] Remove the OOUI font size controller dropdown in favor of the @wikimedia/mediawiki.skins.clientpreferences produced radio buttons
[] The control for font size should render as radio buttons rather than a dropdown
[] The expand all sections toggle should render as a toggle switch.
[] Replace the existing AMC toggle with the Codex equivalent for consistency.
# QA steps
Resize to desktop browser (logged out):
[] Visiting Special:MobileOptions no night mode options should be available.
[] Visiting Special:MobileOptions a font size option should be available with 4 options. Selecting a font size will show a toast notification. Visiting an article page will show the article in that desired font size.
[] No expand sections setting is shown.
[] No advanced mode should be available.
Resize the browser to a mobile resolution (still logged out)
[] When resizing the browser a "Expand sections" setting is provided. Selecting it will show a toast notification. Visiting an article at mobile resolution will show the article with sections expanded by default.
When logged in
[] A new advanced option appears
[] Enabling the advanced mobile mode AMC should reload the page and show a new menu in the top right next to the existing notification (bell icon)
[] Disabling the advanced mobile mode AMC should reload the page and only a notification (bell icon) in the top right.
(You will require a separate test environment for the following tests) and is blocked on T356074.
After visiting Special:MobileOptions:
[] The default is light mode for anonymous users
[] The default is light mode for logged in users
[] I should see options to change night mode on Special:MobileOptions
[] When enabled, certain parts of the UI should reflect a darker color theme. Note: not all UI is expected to be in night mode at this point so look for any indication that a night mode has been enabled.
[] When auto mode is selected, night mode is enabled when configured at the operating system level.
[] When light mode is selected, I should get the default experience.
[] The controls work for anonymous users and logged in users
[] The user preference should only impact the Minerva skin (turning on dark mode for Minerva will not turn on dark mode for Vector)