Commit graph

443 commits

Author SHA1 Message Date
Moh'd Khier Abualruz a8eb85f3d5 Replace use of codex-styles in beta feature with CodexModule ResourceLoader
- Add new module 'skins.vector.search.codex.styles' to skin.json
- Added 'skins.vector.search.codex.styles' to bundlesize.config.json
- Replace the old styles module 'codex-search-styles' with the new one 'skins.vector.search.codex.styles' in skin.js

Bug: T353844
Change-Id: If3cbcac64242c403b42811159882741fda132555
2024-02-27 17:40:11 +00:00
bwang e964cbb785 Add Vector night mode feature flag
Bug: T355065
Change-Id: Ica63eb61ee042e8684168f6787b27a5e58e38bee
2024-02-05 11:33:37 -08:00
Jon Robson 63b3a23ead Register night mode as a client preference
The night mode setting should only show up if the feature flag
is enabled.

The messages are currently added to Vector, but we may want to upstream
these to core in future.

Change-Id: Idcd53399fa06821bbf5f463d1a242ecf59442c70
2024-01-31 10:14:30 -08:00
jenkins-bot f2eb6fb2e8 Merge "Generalize skins.vector.clientPreferences library for use in MobileFrontend" 2024-01-18 05:28:00 +00:00
Jon Robson 7d5caf3f66 Generalize skins.vector.clientPreferences library for use in MobileFrontend
Bug: T354224
Change-Id: I6949c4f49ec34b8e47036da4222a5f3ff491af32
2024-01-17 14:51:29 -08:00
Umherirrender a5486b3a35 Use namespaced SkinModule and OOUIIconPackModule in extension.json
Change-Id: I3465f2708965c57bc268105c55042638cd014025
2024-01-13 22:45:46 +01:00
James D. Forrester e5eb3f9523 skin.json: Drop 'es6' flag, always true since MediaWiki 1.41
Change-Id: I1a66eb4d066f335b3ca0433725ec4a0c8b003692
2024-01-12 19:11:15 -05:00
Umherirrender b2f091ea95 Remove empty MakeGlobalVariablesScript hook
Last usage was removed in d983dada

Follow-Up: I2c28a4e253b4dc17578793e1e4ce73e80392d08c
Change-Id: I76947280762b33943bb5df53444067d61116b0e1
2024-01-12 01:13:50 +01:00
Moh'd Khier Abualruz f83cca3cc5 [Zebra] Merge skins.vector.zebra.styles module into skins.vector.styles
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
2024-01-09 15:46:11 +01:00
Jan Drewniak a749da6e6d Change client preferences beta config
Change the default value for client preferences
config to beta=true.

Bug: T351339
Change-Id: Ia2adf58cc2461685162f57410cca499390c6c0e5
2023-12-19 18:08:47 -05:00
jenkins-bot 0108ec3f32 Merge "Remove typography survey" 2023-12-07 16:36:31 +00:00
Jon Robson dd7a4e9083 Use Codex upstream icon
Don't use icon defined in mixin which can get repeated every
time mixin is imported.

Bug: T352642
Change-Id: I5716a71a8347f519e13687a475d80233813756ed
2023-12-06 14:49:10 +00:00
ksarabia 515af497db Remove typography survey
* Removes code related to typography survey

Bug: T349337
Change-Id: Iae871ec0c61d630078108a5710705b4d3d118a54
2023-12-05 14:32:00 -06:00
gerritbot febf3e635e Update UserOptionsLookup's FQN
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I084e01a29884f338fae22d7239d068823a2657c3
2023-11-29 12:42:02 +00:00
bwang a304223f04 Fix misc client pref bugs
- fixes unpinned popup message not showing
- fixes radio button spacing in client pref dropdown in Zebra

Bug: T351141
Change-Id: Ieeb5caaa6ccbd83d28dae41d3ca30791c355fcc6
2023-11-27 11:40:53 -06:00
Jan Drewniak edfdf05f12 Implement new font-sizes for custom front-size preference
Adds different font-sizes and line-heights for the custom
font-size UI. The custom font-size preference options are now:

1. Compact - 14px font-size & 22px line-height
2. Standard - 16px font-size & 24px line-height
3. Open - 20px font-size & 26px line-height

This removes the "xl" font-size option
(`vector-feature-custom-font-size-3`) and it's related i18n messages,
and changes the remaining message to match the new options.

The default font-size, when the custom font-size feature is disabled,
is "compact".

Bug: T351693
Change-Id: I5975a78ce7327f314fd55de55c222ac08d801fbd
2023-11-24 15:23:56 +00:00
bwang d2b413a721 Make client prefs fully pinnable
Bug: T351141
Change-Id: Ic4a166fb3234b27dbf3d37891abfdf15781c8867
2023-11-22 14:39:28 -06:00
Jon Robson 845a0ab71d Make the limited width and font size controls work for logged in users
For time being manage classes inside Vector. Document with FIXME and a
test.

Bug: T351447
Change-Id: Icc084a59a0141ec2b7c772cf92e8cc58c11f15b1
2023-11-21 02:16:52 +00:00
Bartosz Dziewoński ef7605257c Remove unused styles for .mw-specialpages-table
This element has been removed from MediaWiki core in 2015
(change I1b0c0a38f0842fb259a4e525f1578980acfa4cd6).

Change-Id: Ibff977259c504c50eca83752b882c5683e4f53c1
2023-11-17 17:50:57 +01:00
Jon Robson 0a33ffffac Remove Zebra A/B test code
Additional change:
* Remove duplicate A/B test requirement for language in header

Bug: T339957
Change-Id: I0258e71ac0e270682ec1f3bcb0f10198892f058d
2023-11-13 21:56:34 +00:00
Jon Robson 44d9f74c8f Client preferences: Support different render locations, use Codex
* Refactor client preferences to support different render locations
such as the sidebar or user menu.
* Make use of Codex markup.

Bug: T350195
Bug: T350417
Change-Id: I13eeb9cafc888faba4a5bf0390c1b6db1e3f0259
2023-11-09 19:04:03 +00:00
Bartosz Dziewoński 3f3da39ee0 Restore OOUI dialog styles for compatibility
Follow-up to 6cf1757eed.

Bug: T350544
Change-Id: If90fbc583954f6ae3f836e8db7c6348b3186dc1d
2023-11-06 01:40:23 +01:00
Jon Robson 6cf1757eed Simplify teleport styles
.vector-body is applying to the teleport target and
that in turn sets to the font size and z-index meaning
these existing rules are now redundant.

Depends-On: I17d78ac94e2fa8ca0558306497beb278fef40969
Bug: T348289
Change-Id: I174a1c125e4ee451ec9b203654f6eff2d335bb5d
2023-10-25 12:36:05 +00:00
Moh'd Khier Abualruz 173c91a0f5 Make Vector feature flags compatible with beta features
- Added Key 'beta' to features config in skin.json. As usual this also supported by global configs.
- Added feature management logic to check for beta feature enabled status and the user's selection of utilising the vector beta features.
- Added VECTOR_BETA_FEATURES to Constants.php which is an array that holds features names that would be enabled.
- Removed final from class declaration of OverridableConfigRequirement class, as it does interfere with the mocking in the current setup

Remaining Work:
- Missing images to be added in the hook to show in beta features under Special:Preferences -- this will be added in a followup

Bug: T347772
Change-Id: I7bf8284e328c66c019c392f57207cab21ce0d4f6
2023-10-19 18:22:57 +02:00
Jon Robson 004b4c96f3 Add multiple font size to frontend
Use integer value going forward as it will be easier
to manage.

Bug: T346954
Change-Id: I041a0cb21e872700ceeeddd3a39922e456aa7bb8
2023-10-17 12:43:02 +00:00
Jan Drewniak dcdcecd3db Add config option to disable Readability survery & minor fixes
Adds a config option to control the Readability prototype
survey tool on a per-wiki basis.

Minor fixes:
- Adds missing i18n messages to the tool for slider labels
- Ensures tool only runs on Vector 2022 skin
- Wraps the initialization in an IIFE

Change-Id: Ia65a0043dab5e9a23d4ef401ed83914e4f3d2882
2023-10-16 00:45:59 +00:00
Jon Robson 07c886a19b Fixes Echo skin style for user message bar
Additional change: Skin Style is limited to Vector 2022
as none of the styling rules apply to legacy Vector

Bug: T348530
Change-Id: Iad310bbc6732135832986c287571744c846cea7f
2023-10-10 11:57:12 -07:00
bwang bfcdbd544b Copy common styles into legacy vector
Bug: T345766
Change-Id: I78fd91fa397a731d22aa6264f61f324f6fc22054
2023-10-05 13:32:29 -07:00
bwang 967fc5d350 Copy common styles into vector
Bug: T345766
Change-Id: Ib7a10d3351ad99c025237ab03ece84c1e2c1e257
2023-10-05 13:28:16 -05:00
Jan Drewniak d4246e6ca6 Web typography prototype survey
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
2023-10-02 10:56:40 -07:00
Jon Robson d35db97615 It should be possible to persist Vector font size for registered users
Bug: T346987
Change-Id: I01e0fac5ba781480ee32a8b32f6ef7fafb8d1ca5
2023-09-27 20:04:22 +00:00
Jon Robson 2edf135018 Disable client preferences by default
Also make code safe to run when the preferences are
disabled.

Bug: T345363
Change-Id: I00554f3d7b0338170c537ae21d937da35303e8e6
2023-09-19 19:52:21 +00:00
Jon Robson 65c48d4eb2 Feature: Client preferences interface
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
2023-09-15 10:03:28 -07:00
James D. Forrester 24cebb3d1f build: Update MediaWiki requirement to 1.41
All skins in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: Ic3635684c09e5589a1951ed0e98f08a87d3e5e8c
2023-09-05 23:32:46 +00:00
Moh'd Khier Abualruz 7fc6bb0a6a Update label for Page tools navigation region
- Set aria-label to read 'Page tools' in the nav elements

Bug: T330326
Change-Id: I99119aebe98b329d6d1f4e2f8c9f37f77692e8ab
2023-09-05 18:41:38 +02:00
Bartosz Dziewoński 0bb02c9c57 Only show notification after CentralAuth autologin on Vector 2022
This brings in CentralAuth for phan analysis, using config patch
8063720d68ee1d2db2c37c1ad55da3fbef688bce in CI.

Bug: T345112
Change-Id: Iddd94b38f04a34dc18df8978c2bf45e8e204a85c
2023-08-30 08:53:53 -04:00
Eric Gardner 61392b87fe Apply teleport target styles to mediawiki.page.ready module
Updates the style overrides for the #mw-teleport-target element
based on its new location.

Bug: T343476
Depends-On: Id106a36f8ead7424c2ad2881ad79586e48f7bf1d
Change-Id: Id81d7c5c87daeea1b26f4ceda509eb4626364aa8
2023-08-28 22:49:31 +00:00
Eric Gardner 9504b7fb97 Add skinStyles for mediawiki.page.teleportTarget
As part of the fix for T343476, we need to ensure that Dialog
componenents which are teleported out of the main body content
element still receive the appropriate font size from Vector.

Bug: T343476
Depends-On: Ia79b76c0e73890dd18477e5c3ea307d753cedb3a
Change-Id: I545df434f85f38c4074e2fcdfff51e686c9b465a
2023-08-25 21:10:20 +00:00
jenkins-bot 580b7a022f Merge "Add font size feature flag" 2023-08-24 21:33:39 +00:00
ksarabia 1805561923 Add font size feature flag
Add feature flag that for new (eventually customizable) font size.
Enabled via url param VectorCustomFontSize=1 and font size set to
a hard-coded 16px value for testing purposes.

Bug: T343928
Change-Id: I75801db7506ba2a8212df94bb2079c33a3b64614
2023-08-24 20:57:46 +00:00
gerritbot b5c38e7158 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I7283b3a22bedf6d05d0959cd6edb40b0b15c57b0
2023-08-19 04:23:07 +00:00
Timo Tijhof b7ab3b1f76 skin.json: Enable 'clientPrefEnabled' option
Ahead of core change Ib0b5ee29ec7acc.

Bug: T344069
Change-Id: If9b83dd559cda2dac315afcb65a4761b9e97f319
2023-08-11 18:33:06 +00:00
Jon Robson 967965b260 Add mw.util.addPortlet handler for legacy Vector
This copies the Vector 2022 hook approach and applies
it to legacy Vector.

Bug: T342814
Change-Id: I382bfa3b25f4814fbf627856fa5957f7e50bf8a8
2023-07-26 14:05:16 -07:00
jenkins-bot 48af341410 Merge "Add hook support for mw.util.addPortlet method" 2023-07-26 11:42:17 +00:00
Moh'd Khier Abualruz 4b4fc6c6c9 Add hook support for mw.util.addPortlet method
- Hooking into mw.util.addPortlet
- merged in tests from: I3258388d74c103515e3f0680304f9a376e439a35

possible follow-ups:
- tooltips support
- custom attributes support
- Adapting portlets of types dropdown, tab to vector skin. Check patch set 10 for a starting point

Depends-on: I79bad8661e34e653d41e6cb1cd4462ac5c6bc3b1
Bug: T303488
Change-Id: I35a51df6ece2e48e086e722337d4c6bba427eeb4
2023-07-26 13:37:09 +03:00
Jon Robson d3748704ca Show limited width icon alongside help button
Depends-On: Ia4495f75b51626ab6dd2805574dfdc6199535015
Bug: T341740
Change-Id: I3b8881ad37fa0fb06b60e50f2a7608f7d7b3e0ab
2023-07-24 20:14:59 +00:00
Jon Robson 4ce3c38c5a Remove anonymous user icon
Bug: T340789
Depends-On: Iba0d5532bdb7134330a452e16c05d848c1c3b2a3
Change-Id: I55676b472f48777f657573b68fc56ae84c6e1f82
2023-07-20 16:08:09 -07:00
Jon Robson bcc7a977c1 Add temporary user icon
Bug: T340789
Change-Id: Ice9bf9c51e7b6ad875417090d05d4630e11f26c2
2023-07-20 18:32:58 +00:00
Jan Drewniak 916e64513a Remove "interface-temp-user-banner" option
In mediawiki core change Ie2631221b0a07dd3bf55e970805d30fbb3cac190
the interface-temp-user-banner option is removed.

Bug: T339379
Change-Id: Id5a4a9a00e50420c50868c54f899d36d7ddd373d
2023-06-29 23:07:36 +00:00
Jan Drewniak af2afe264d Enable interface-temp-user-banner on Vector 2022
Enables the new temporary user banner on Vector 2022.

Bug: T330510
Change-Id: I6ca6b737fc6b891da89a0854e597533820c5cf0d
Depends-On: I1e137dbd29f3c73efac901f43f8a8258e2a111fc
2023-06-16 13:22:50 -04:00