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
- Remove unused override of getDefaultModules
- Call getActionName() directly
- Remove some use of empty()
- Fix line indent
- Call some functions only once
- Write query parameter as array
- Have all parent:: at function top
Change-Id: I4c807b0a170eef0742586beb87b80eaade4bb4c5
Merges all of the styles in the Zebra module into the default styles.
- skins.vector.zebra.styles ResourceLoader module is removed.
- FIXME's related to Zebra styles are removed.
- Top-level "&" that were used for scoping to feature-flag are removed.
- `$wgVectorZebraDesign` feature flag is removed.
Bug: T347712
Change-Id: I0177541ae87a5d070d5317629ca38de93613d620
- Add appearance.svg file and classes
- Update the icon name in php
- Update icon name in test data and Snapshot
To test: change return value of
isClientPreferencesPinned() from SkinVector22
PHP Class to false
Bug: T351142
Change-Id: If61f3019430be3cb9c926b09bc397e27d8e636f2
Calling this method twice within the same function introduces
uncessary performance decline.
Bug: T351807
Change-Id: I5a28f2a3884ea22a6e0bba666f73bd8596ccafbe
This was being flagged by Pixel
Follow up to I0b1ec445c4d292bbf417a39dbc5d2032b563f525
Bug: T350195
Change-Id: I7e4b7b453a518a94a75e952bdeaf4e84b23396c8
Known problems:
- For now, this can only be rendered by manually updating
the isClientPreferencesPinned local variable in SkinVector22
This will be addressed in T351141
- The icon is not correct. This will be addressed in
https://phabricator.wikimedia.org/T351142
Bug: T350195
Change-Id: I0b1ec445c4d292bbf417a39dbc5d2032b563f525
No need to check $tocData for empty before checking if a key is set on
the array, as empty suppress the error when $tocData is null
Change-Id: I3f1fd4bfdfd7f29e6750d72af75c286668b5f09c
Problem: Edit-links are shown in static order in sticky header always source edit 1st, then visual editor
Patch Changes:
- We now read the configuration from the visual editor extension.
- Based on the order that page views portlet shows of the tabs, we add the icons to the sticky header in the same order as it shows in the portlet.
Bug: T318447
Change-Id: I2d926bf84131b13c881b09c87ccd5d2010c0dffc
Creates an interactive prototype for gathering
feedback on users typography preferences.
This prototype is meant to be temporary and is
built soley for feedback purposes for the
WMF Accessibility for reading project.
The prototype code is:
- for logged-in users only
- hidden under the API user preference "vector-typography-survey"
- disabled by default
It is intended to be enabled via a banner that calls
code similar to:
new mw.Api().saveOption( 'vector-typography-survey', 1 )
Bug: T347208
Change-Id: I8d8914a0fa16d40cb22ed0e61832bc5bbabe1c78
CVE-2023-PENDING
The line param can contain some markup (since headings can contain
markup), so make that a raw param.
Bug: T340217
Change-Id: I9295a8e0f9f00b62d5206f6d7e40bb657f43651a
Notes:
* This is functional but intentionally not designed until the design
has been finalized.
* A feature flag is added that swaps out the limited width toggle with
a settings cog
* The preferences module is kept in a separate ResourceLoader module
(skins.vector.clientPreferences) to make it more portable for
when we eventually want to add it to Minerva as well.
* Intentionally have not focused on non-jS version given we will
likely revise this again in a future version/upstream to core.
Bug: T345363
Change-Id: I0c793b73e0676e32f031c6168c292f63908c72e3
- VectorComponentMenuVariants.php is renamed to VectorComponentVariants.php, and returns menu and dropdown data
- Remove TabsMenuContents.mustache in favor of MenuContents.mustache
- Fix the variants dropdown to use the full Menu template
Follow-up: Idf05c1664c026f58487ba34af5ede8a11e695baf
Change-Id: I0e9b1ab3306b04ee0d226048c6885beab4f310c6
The languages alert is misleading when there are no languages and the user has JS disabled.
This change adds a class to the alert if there are 0 languages, and then adds "display: none" to the alert if the client-nojs class is present. This is the same approach being used for the language switcher button.
Bug: T326185
Change-Id: Iee292d661ed1f47700f588053712f5f547022b17
Changes:
- mw-ui-button to cdx-button
- mw-ui-quiet to cdx-button--weight-quiet
- mw-ui-icon-element to cdx-button--icon-only
- mw-ui-icon to vector-icon
- mw-ui-icon-flush-right/left to vector-button-flush-right/left
- Removes $isSmallIcon param in Hooks.php
85 Visual Changes
- ~36 changes from minor pixel changes from the new button classes in the main menu, language button
- 22 from standardizing the padding of the TOC in page title
- ~10 changes from addition of .cdx-button to the TOC toggle buttons
PERFORMANCE:
This will result in an overall increase of 2.7kb of render blocking
CSS, 1kb will be reclaimed when
I6c1ed1523df8cc9e2f2ca09506f12a595b8b013d is merged.
Co-author: Bernard Wang <bwang@wikimedia.org>
Bug: T336526
Change-Id: Ibd558238a41a0d3edb981e441638f9564f43d226
When AB bucketing via ABRequirements.php in Vector,
the browser has no awareness of this bucketing and buckets users
once more via mw.experiments.getBucket() in AB.js.
mw.experiments uses a different algorithm than ABRequirements.php,
causing a mismatch between the server-side bucketing
and the client-side bucketing.
This patch overrides that client-side bucketing by
adding classes to the HTML element that are recognized
by AB.js
Bug: T335972
Change-Id: I0549a8dee23ebe7cd68465f8403e4f7aac76633e
Remove everything related to the `wgVectorLanguageInHeader` feature flag and
rely on the LangaugeInHeader feature instead.
Bug: T297237
Change-Id: Ida2c588e03f759d2eefc7c67ff44dcdd9a100f9a
This change scopes the styles related to the Zebra
update by wrapping the imports in a top-level feature
flag selector,
i.e
.vector-feature-zebra-design-enabled {
@import "./screen.less"
}
To account for this extra selector, ampersands are
added wherever the html element is targeted in the
affected files. This applies to both zebra enabled
and disabled files.
getDefaultModules() is used in SkinVector22.php to
conditionally load the new skins.vector.zebra.styles
module when the feature is enabled.
Bug: T332600
Change-Id: I5e673df383ff31f296010f982e4188c82f095590
Removes configuration for
1. Custom sidebar pinning
2. Default sidebar visibility for logged in & anons
The first config is no longer necessary because
the main menu now uses the pinnable header for
showing/hiding and persisting it's state.
The second config is no longer necessary since
the Page Tools menu moves many sidebar items into
a different location.
Bug: T332090
Change-Id: Iaf25237757dc1e43e096b8c5991e9dd31ad25c2d
Removes the config option for Page Tool menu,
its associated logic, along with the associated HTML from
the mustache templates.
Hardcodes the `vector-feature-page-tools-enabled` class
into the HTML element to prevent breakage.
Bug: T332090
Change-Id: I6466d80c6970bcc8e28d897b6bdff911a90e3655
On non-subject pages we should the compact language tool at the
top of the page, and we should show no tool in the sticky header.
Bug: T322153
Change-Id: I4168eb0947f994acb25759c6118567c49796a055