This changes nothing about the existing classes, it just improves
how they are documented.
The FIXME comment was making things confusing.
Make sure every feature class is accounted for and audited and
throw a RuntimeException if we forget to document it.
Change-Id: I9d8f6553fe6b8c2ae80d8b2490c8895a8334a537
Follow up to Ic40da2af8ea46bd42cbebbdbceda2431bd8600ae
Only show these if the feature is available for the current user,
otherwise, we are effectively shipping these features to all logged in users.
Bug: T341278
Change-Id: I99c28af807fbf7bbf575b8d4712e1dbad364ec63
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I84dc0ec8a909fce94db2b958eadac9caf661972b
Fixes 9 warnings generated by https://validator.w3.org/nu/
- The navigation role is unnecessary for element nav.
- The main role is unnecessary for element main.
- The contentinfo role is unnecessary for element footer.
Bug: T365938
Change-Id: Ibdbe70900f9a85d904252ad8ac26e4bb6e813a1c
Should only have one HTML ID per page. I've decided to remove
the first of the two duplicate IDs and to replace it with
#vector-variants-dropdown, to match the code style of the similar
#vector-user-links-dropdown
Bug: T343730
Change-Id: I6abdc293c1dbb18faf9751b4633a572a019593ab
There is a missing span tag in the table of contents where text is placed directly into a div, breaking convention.
Change-Id: I12280e2c6a6e688b36a906d5b5a5c5deba42c977
This reverts commit ff5a61e9c6.
Reason for revert: The behaviour introduced in this patch needs some more consideration.
Bug: T364015
Change-Id: Ieab4ca4084df4f1b5c942fe81c7fb99b058e0623
* Use !== instead of !=
* Avoid else after return
* Use falsey check for object is null
* Use consistently spaces inside of brackets
Change-Id: I2928664acbab315ab3eae38c74f87b019d46cf29
- Adds the notice "This page is always wide" and disables
the inputs for the "width" options in the Appearance menu
when pages are excluded via configuration ( `$wgVectorMaxWidthOptions`).
- Changes layout behaviour so that pages in the
$wgVectorMaxWidthOptions['exlcude'] configuration
stretch the entire viewport width.
- Stops the width settings in the Appearance menu from
being hidden on smaller resolutions.
Bug: T364015
Change-Id: Idee294adf3b309e03834276ea75e4ae43b0cffcb
1) Icon optimizations
* Load styles for expand icon in
JavaScript since it relates to table of contents and that is only
enabled with JavaScript
* Drop vector-icon--x-small class since it only applies to this icon
* Remove some FIXMEs to an issue that has already been fixed
upstream
2) Move styles that do not need to be render blocking to skins.vector.js
* Move sticky header to skins.vector.js since it doesn't work without
JavaScript
* Move popupNotification to skins.vector.js since this is never server
side rendered.
Change-Id: I98e6c0826b514aaefcf88f66275bba37125129b1
This patch introduces the ability to configure font size exclusions
for specific pages within the Vector skin, ensuring certain pages
always use a small font size. This change is part of ongoing improvements
to the Vector skin's customizability features.
Changes:
- Updated `skin.json` to include `VectorFontSizeConfigurableOptions`
- Added new i18n string `vector-feature-custom-font-size-exclusion-notice`
- Modified logic for font size exclusion handling in `FeatureManager.php`
Additional Notes:
- Affects testing and beta deployment environments, ensure relevant
settings are updated in `LocalSettings.php`.
For testing and on beta deployment, these settings should be set in
the LocalSettings.php of the environment, example:
$wgVectorAppearance = [
"logged_in" => true,
"logged_out" => true,
"beta" => true
];
$wgVectorFontSizeConfigurableOptions = [
"exclude" => [
"namespaces" => [ -1, 2, 6, 8, 10, 14, 100, 710, 828 ],
"querystring" => [
"action" => "edit|submit|diff|info|protect|delete|undelete|diff|history",
"diff" => ".+"
]
]
];
Bug: T364887
Change-Id: I23b9c4fb63f35c7d27544197fead3ad7619c67f1
This was not well documented but it seems that anything that
can be a beta feature needs to be added to this constant for it
to function as a beta feature.
Bug: T363814
Change-Id: I556114c65d9507829d9eb737edf09245ae14c0f4
This reverts commit 89c250c18e.
Reason for revert: We need some more time to test this one and
the resulting behaviour. After discussing this morning we decided
to remove from the next train release.
Bug: T364015
Change-Id: I0dfc17d9c8a8697b8b4f590acdbc2d2c54de9429
Adds the notice "This page is always wide" and disables
the inputs for the "width" options in the Appearance menu
when pages are excluded via configuration ( `$wgVectorMaxWidthOptions`).
Bug: T364015
Change-Id: Ie99b41c9130f496ab23b60c95e551a9ea602d5a0
- New night theme added via Codex `.cdx-mode-dark();` mixin.
- CSS custom properties separated from skin.less.
- Font-size rem conversion removed since Codex now uses rems.
- bundlesize increased by 1kb ( followup from
Icfcb5c7418061a5727580f0685054356ba4edb72 ).
- Icons that use background-images are inverted for night-theme.
- Linter error fixed for long-lines in clientPreferences.js
Co-Author: <Bernard Wang> bwang@wikimedia.org
Bug: T354889
Depends-On: I1f54bf4f144eaec6ed317c04bd0c851c2f01b42c
Change-Id: I3a8a147b6be67bc830f0d3b816a4b85c26f99cf1
If night-mode is disabled on a certain page via the
exclude list in skin.json, then the following class:
".skin-theme-clientpref-excluded" will be added to the HTML element.
In this scenario, the related client-preferences
menu options are visible, but disabled, and a notice
is rendered below the options informing users of this state.
Bug: T361158
Change-Id: I46d335d079a2d27c7a4122e23ac7e479c286b886
Refine Feature Management in Vector Skin, in this patch we simplify the feature management criteria within the Vector skin by adjusting the requirements for the Constants::FEATURE_CLIENT_PREFS_PINNED feature. By removing the Constants::REQUIREMENT_LOGGED_IN constraint, we aim to enhance and unify the user experience by making certain preferences more accessible to users, regardless of their login status.
Changes:
- Updated FeatureManagerFactory.php by removing the Constants::REQUIREMENT_LOGGED_IN from the list of requirements for Constants::FEATURE_CLIENT_PREFS_PINNED. This modification aligns with our goal of making the Vector skin more user-friendly and accommodating to both logged-in and anonymous users, ensuring a broader range of users can benefit from customized features and settings.
Rationale:
The decision to remove the login requirement for accessing certain client preferences stems from an ongoing evaluation of user engagement and feedback, as detailed in Phabricator task T360099. This change is part of a series of improvements aimed at enhancing the accessibility and usability of the Vector skin, making it more adaptable to the diverse needs of our user base. By enabling more features for anonymous users, we anticipate an increase in engagement and a more personalized browsing experience for all users.
Bug: T360099
Change-Id: Ic477cd66df34c1caeb822d8d2162a7299cd648a0
* Using the new ConfigHelper, support disabling night mode on certain
pages via configuration options
* In addition, adds test coverage for this case and the query parameter
case (in a new integration test file as we now require accessing the
service container for request context)
* Finally, supply a default configuration in skin.json with all the
values set to null
For the easiest possible approach while we evaulate our general feature
management system, this logic is handled inside of getFeatureBodyClass
using the new shouldDisable general function. In the future, it may
make sense to break this out into its own requirement class, but for now
that feels premature
Bug: T359606
Change-Id: I3e7a4720ec3cc2afd9777e36f59aa56b682258f0
This class is being used in both vector and minerva, and we are
currently depending on it working for our night mode rollout, so let's
add some test coverage! Also fixed a small spacing issue in production
code that was bothering me lol
Note: these are not totally exhaustive - next steps would be to ensure
that the exclusions/inclusions work with arrays and not only single
elements, but hopefully this helps build some confidence ☺️
Change-Id: Iebea43eae6b1517fd778763db4f5db3b0fd9c30f
The classes:
- skin-night-mode-clientpref-0
- skin-night-mode-clientpref-1
- skin-night-mode-clientpref-2
is being replaced with
- skin-theme-clientpref-day
- skin-theme-clientpref-night
- skin-theme-clientpref-os
Other Changes:
- Change vector-night-mode preference to vector-theme
- Add skin-theme-os-label and other messages to skins.vector.clientPreferences
- Remove skin-night-mode-* messages from skins.vector.clientPreferences
Bug: T359983
Change-Id: I31eb086e623a97df9fbd004425559e05b0cae170
In preparation for a decision around how we share code, the generic code in
LimitedWidthContentrequirement is moved to ConfigHelper class. A fix
recently applied to Minerva (Ied3ed927202dd9356ebeb7e404230f571a1d910d)
is also incorporated into the new class.
The expectation is this code will be either:
1) be replaced by a submodule
OR
2) Used directly by Vector
after a decision tomorrow.
Bug: T359607
in I3967803bd75cf78d27c1a7c08e62730e46678a68 or removed
Change-Id: I04066acc86594e721e071e9096e1b12e1255b54b
Some feature requirements needs access to the request user or title.
Currently the context is given in the ServiceWiring callback,
access to RequestContext::getMain() should be avoided during service
wiring (T218555).
Create a factory to hold the code from the service wiring and call the
factory with the request context from the skin to get a feature manager.
Bug: T359665
Change-Id: I57515ec02ed454620f729a109d0ace43b447b6ce