Background
As part of the Wikipedia 25 Easter egg celebrations, we want to give users the option of enabling a "birthday mode" on desktop and mobile Web.
On Vector 2022, we would like to add a "birthday mode" toggle switch to the appearance menu, and persist this option using the ClientPreferences functionality when the user enabled it.
the "play mode" in the screenshot above
User story
As a reader, I'd like to be in control of whether or not I see the Wikipedia 25 birthday celebration experience, and I'd like to easily be able to turn it on or off.
Requirements
- The ability for extensions to add an item to the Appearance menu in Vector 2022 via some kind of public interface.
- The ability for extensions to use the client preferences functionality to persist a preference for logged-out users.
Implementation proposal
This could potentially be a front-end mw.hook() that fires after the Appearance menu renders all the existing client preferences. Alternatively, or additionally, we could expose some of the private methods in clientPreferences.js, such as makeClientPreference(), in order to enable this functionality.
