This reverts commit ff5a61e9c6.
Reason for revert: The behaviour introduced in this patch needs some more consideration.
Bug: T364015
Change-Id: Ieab4ca4084df4f1b5c942fe81c7fb99b058e0623
Allocate specific space for each installed extension based on
whether it is installed. This should reduce false positives (assuming
we have accounted for every installed extension)
If we haven't we'll follow up with additional budgets as we learn
about them.
Bug: T365480
Change-Id: Ie487fc56eb199f94e0b72f59d5c54f623570773a
- 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 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
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
* 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
Unblocks CI for Wikibase extension.
CI failed in I824acad352c366a35a243dac2086e3c5e98bc6eb
Bug: T350338
Change-Id: Id9926ff9a60cb0cac56a612a792d5ffde55c4c63
- Loaded new skins.vector.search.codex.scripts module in skin.json, with only the CdxTypeaheadSearch component with codexScriptOnly flag set to true.
- Included skins.vector.search.codex.scripts in the script loading configuration for Vector22 within skin.json.
- Turned off the "interface-message-box" feature within Vector22's skins.vector.styles configuration in skin.json, as Codex now supplies these styles.
- Fix the style selector to add `.cdx-button` to `.vector-limited-width-toggle` in BottomDock.less since using the codex style
- Substituted "codex-search-styles" with "skins.vector.search.codex.styles" in the existing configuration.
- Ensured the availability of skins.vector.search.codex.scripts module for use, marking it in the list of modules in skin.js.
- Modified App.vue to utilize skins.vector.search.codex.scripts instead of @wikimedia/codex-search.
- Update App.test.js.snap to the latest output form
- Update bundlesize.config.json with newest values
Bug: T356677
Change-Id: I7fc223db01171efe6656792530d4b625be4c8edc
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
Adds tests for LanguageService in Vector skin.
Covered:
- `testConstruct`: Validates property initialization.
- `canWordsBeSplitSafely`: Tests that the language is splittable or not.
Change-Id: Icc1c269c56e0e53c624074516aee95ba242a55d7
Adds tests for VectorComponentMenu in Vector skin.
The test suite includes the following validations:
- Constructor initialization with expected parameters and behaviors.
- Validate counting logic for menu items.
- Validates `getTemplateData` method's output for correctness.
Change-Id: Ia52aa70e9213f6627d063d520fdbb2e353f0bfcb
Adds tests for VectorComponentMainMenu in Vector skin.
The test suite includes the following validations:
- Constructor initialization with expected parameters and behaviors.
- Correct identification of 'is-pinned' state
- Inclusion of data for first portlet and rest portlets
- Handling of pin/unpin actions and language alert considerations
- Proper integration of menu elements based on user and feature flags
Change-Id: Ie408ff668893d1de2cf9dd1211a9c82c0b882f99
Adds tests for VectorComponentMainMenuAction in Vector skin.
The test suite includes the following validations:
- Constructor initialization with expected parameters and behaviors.
- Validates `getTemplateData` method's output for correctness.
Change-Id: I5deda64dc1bd3db85df69d0bb5a5a27f6fb8c1ff
Adds tests for VectorComponentLanguageDropdown in Vector skin.
The test suite includes the following validations:
- Proper handling based on page type (subject/talk).
- Correct labeling and icon selection.
- Accurate class and aria label configuration.
Change-Id: I145cb250c513f3f81e780195485907897788f5c4
Adds tests for VectorComponentDropdown in Vector skin.
The test suite includes the following validations:
- Correct template data generation.
- Proper label, tooltip, and icon handling.
- Accurate CSS class construction for various states.
Change-Id: Iafd28cfe62eb4b8c6039f819b9d8f005b0b32d48
Adds tests for VectorComponentClientPrefs in Vector skin.
The test suite includes the following validations:
- Both pinned and unpinned states
- Correct structuring of 'data-pinnable-header'
Change-Id: I745559b2f738b4bed0f152fc8de3af1653b96ecd
Adds tests for VectorComponentButton in Vector skin.
The test suite includes the following validations:
- Various button configurations and expected CSS classes.
- Accurate template data for label, icon, href, and custom attributes.
- CSS classes according to weight, action, and iconOnly.
Change-Id: I228c197e5adee59a79ab6e2aad74ff0f18ef6b38
Adds tests for VectorComponentPinnableHeader in Vector skin.
The test suite includes the following validations:
- Correct template data generation based on constructor parameters.
- Accurate label generation from MessageLocalizer.
- Conditional logic for 'moveElement' affecting container ID attributes.
Change-Id: I2412c86e08dfca088ca57330b4dd078c212513f9
Adds tests for VectorComponentPinnableContainer in Vector skin, ensuring:
- Proper initialization with ID and pin status.
- Correct template data based on init params.
- Consistent template data for pinned/unpinned states.
Change-Id: Iec33c11b0afbe2bea5b6708b83b9ea618f7e809b
Adds tests for VectorComponentPinnableElement in Vector skin, ensuring:
- Proper instantiation with an ID parameter.
- Correct return of template data containing the ID.
- Reliability in handling element ID for use in templates and UI.
Change-Id: I3758f042ad43b90ee94a3b5aa14537fa1b0657d1
Adds tests for VectorComponentLink in Vector skin, ensuring:
- Initialization with parameters.
- Generation of html-attributes string with title and aria-label.
- Consistency in link attributes for accessibility and UX.
Change-Id: I80b8a84d1d10bc7274ba5267910206d7f6e68534
This commit introduces several changes to improve the structure and
readability of the FeatureManagement code in the Vector skin. Key
changes include:
- In ABRequirementTest.php, improved test method names for clarity.
- In ABRequirement.php, simplified property declarations and cleaned up
code structure.
- In DynamicConfigRequirement.php, cleaned up property declarations.
- In LimitedWidthContentRequirement.php, cleaned up property
declarations and added type hints.
- In LoggedInRequirement.php, cleaned up property declarations.
- In OverridableConfigRequirement.php, cleaned up property declarations.
- In OverrideableRequirementHelper.php, cleaned up property declarations.
- In SimpleRequirement.php, cleaned up property declarations.
- In UserPreferenceRequirement.php, cleaned up property declarations.
Each change aims to enhance the codebase's maintainability and
understandability. No functional changes were introduced.
Change-Id: I23283c5a6799b1f03a6a9b5832c34c7dbbcca527