Background
Parent: T360092
To enhance the flexibility and customisation capabilities of developers working on the Vector and Minerva skins, this task is to expand the configuration options. The goal is to allow developers to define multiple default values for various features such as page width, font size, and themes depending on specific conditions like main page status, page title, namespace, or query string actions. This approach builds upon the previous exclusion logic and introduces the ability to specify exceptions within certain namespaces. This task is designed to refine the developer experience so it would be easier to tailor the user experience more accurately based on content type or user interactions, thereby enhancing accessibility and usability across Wikimedia sites.
User story
As a developer of Vector and Minerva skins, I want the ability to configure multiple default feature values conditionally based on page characteristics such as title, namespace, or specific user actions, so that I can deliver a more customised and effective user experience.
Requirements
- Purpose and Discuss the suggested configuration scheme, and get feedback and agreements from other team members.
- Enhance the configuration system to allow developers to dynamically set multiple and different default values for a feature in the skin.json file.
- Configuration options should support:
- Conditional Application: Capability to apply settings based on the main page status, specific page titles, namespaces, and query string parameters.
- Flexibility and Control: Provide developers with the ability to specify exceptions in settings within defined namespaces.
- Utilise, refactor and enhance the ConfigHelper class in the PHP code base to develop logic that reads and enforces these settings from the configuration file during runtime.
- Ensure the configuration changes are parsed efficiently and do not impact the performance of the skins.
- Ensure compatibility with both Vector and Minerva skins, with configurations being easy to manage and update
Acceptance criteria
- Developers can specify and save conditional configurations for feature defaults in the skin.json file.
- The system must accurately apply these settings based on the conditions outlined in the configuration.
- Documentation must be clear, providing sufficient examples to assist developers in setting up and customising configurations.
- The following pages should get Standard as the default font size: Namespaces=0,4,12,118.
- All other pages would get Small as the default font size.
Open questions
- Is this for mobile and desktop or just desktop?
- When I visit a page where small is the default font size, can I change font size in the appearance menu? Is it disabled?
- When I visit a page where small is the default font size would small be selected?
- When I visit a page where small is the default should there be a banner saying "This page always appears as small?"