Commit graph

507 commits

Author SHA1 Message Date
Jon Robson fc8513e61a Do not load CodexTypeaheadSearch styles on page load
Move CdxTypeaheadSearch out of render blocking module - it is not
needed - only CdxSearchInput is rendered by default.

Bug: T378636
Change-Id: Id4feb26f73413826cf04ec200d0d501c6b057bfc
2024-10-31 20:34:15 +00:00
Jon Robson 171ab9b9f9 Match production for night mode configuration
Night mode is now enabled for all logged in users so update
skin.json to reflect that.

Change-Id: I917a24e5a6b598f44c076dd8c3d0f749e86f602f
2024-10-16 19:55:18 +00:00
Jon Robson 111b3155e0 Drop support for non-Codex message box styles in Vector 2022 and Vector
Going forward these styles will be provided where needed by
the mediawiki.legacy.messageBox module.

Bug: T360668
Change-Id: I58d9e41f0c98adbd816240b161b5145a667436cd
2024-09-18 21:08:01 +00:00
Ebrahim Byagowi 475f80cf76 Use browser native URL instead of mw.Uri
Bug: T374314
Change-Id: I66be10c017e853ea130b0919789b22c4c3f12622
2024-09-13 07:08:12 +03:30
jenkins-bot 6bf48eee89 Merge "Drop unused code relating to old limited width toggle." 2024-09-11 18:47:27 +00:00
jenkins-bot 663e73e60d Merge "Disable font size scaling on Special: pages, and other namespaces" 2024-09-11 17:56:58 +00:00
Ed Sanders 48cdb7e8e8 Disable font size scaling on Special: pages, and other namespaces
Bring in the WMF defaults for namespaces and actions
so that they apply to 3rd party wikis, and dev instances.

Bug: T373875
Change-Id: I865aebb4c2934ab6bc1cc55d9af9143f5fd75816
2024-09-11 17:08:19 +00:00
Jon Robson 3fbf5b49f0 Drop unused code relating to old limited width toggle.
Follow up to Ie2617e2fa83b6a888a7a2799cc39f048731dc60d

Bug: T367591
Change-Id: I270f1902f40946f31de29777735dee2e10ebfebe
2024-09-11 00:12:59 +00:00
Jon Robson ea8660bb60 Cleanup: Remove dark mode banner code
This is not being utilized any more, tested or maintained so should
be removed.

Change-Id: I9410171e1025e428b48e5dd12c7dc1161cc800f6
2024-09-06 21:11:04 +00:00
Ed Sanders 882ed44615 Use UI font size for mw-teleport-target
mw-teleport-target is used for UI components (popups) that
are part of the interface, not the content, so should not
change when the user changes their content font size.

Bug: T373875
Change-Id: If2fa517499a00e726076035cd6d94ad4a6642b30
2024-09-06 14:54:50 +01:00
ksarabia ae6f0d5486 Remove old limited width toggle
* Removes js
* Updates bottomDock style rules
* skin mustache updated
* Remove appearance feature flag - show appearance menu
to all users.

Bug: T367591
Change-Id: Ie2617e2fa83b6a888a7a2799cc39f048731dc60d
2024-09-03 11:25:23 -07:00
Jon Robson 9695647608 VISUAL CHANGE: Use mask-image for all Vector icons
Visual changes are subtle, but impact 43 scenarios. The color
and positioning is slightly modified to match Codex.

Bug: T363920
Change-Id: Ie5c88e0aa243f73f2dc9f310d18fd59b831edc64
2024-08-29 17:17:35 +00:00
Jon Robson 1b4d07e1d2 Add tooltip to reporting link
Bug: T369849
Change-Id: I225c83e9ee1c95957479a684527d1297b7a471c1
2024-08-27 21:37:54 +00:00
James D. Forrester ac90c9ada3 build: Update MediaWiki requirement to 1.43
All skins in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I10aa7300a7771699a0fded0e114e646bfabdf580
2024-08-22 19:22:01 -04:00
Ebrahim Byagowi 8e134155b5 Don't use i18n-all-lists-margins module
It's now provided by elements thus not needed.

Depends-On: I404710209d59241991716bb7180bcaabcafffcec
Change-Id: I6c18607b132c93513c0fbe8034c14e98d4091770
2024-07-25 14:16:30 +03:30
Jdrewniak 7b35e6b1e8 Create dark mode launch banner for Vector 2022
Creates a dark mode launch banner, (copied from the MinervaNue skin) to
announce the launch of dark-mode for Vector 2022.

The banner itself is not invoked anywhere by default, but will be
invoked through CentralNotice as a banner as part of a launch campaign.

To invoke the banner manually, execute the following in the dev console:

```
mw.loader.using( 'skins.vector.DarkModeLaunchBanner', function( require ) {
    require( 'skins.vector.DarkModeLaunchBanner')();
} );
```

Bug: T370303
Change-Id: I1ca4aab8c302ef418bc1d12dde0d80c96c3b8d4f
2024-07-22 16:13:56 -04:00
jenkins-bot b158601f8b Merge "[Vector 2022] Indicate support for new heading HTML" 2024-07-12 00:30:07 +00:00
Jon Robson 801c5285eb Dark mode should default to day theme
Given the issues with dark mode we are making this an opt-in
release.

Bug: T369833
Depends-On: I1c8115e95749bcb5e6b55d0ebe31267178042783
Change-Id: Ia017d2b5a31d5a19fee7c1433457a1e394ceeb01
2024-07-11 22:24:51 +00:00
Jon Robson 11654b7bce [Vector 2022] Indicate support for new heading HTML
Add `"supportsMwHeading": true` to the skin definition,
so that MediaWiki 1.43+ will output new heading markup
when using this skin.
https://www.mediawiki.org/wiki/Heading_HTML_changes

The required CSS changes were already made in commit
3c2602b682.

Bug: T367601
Change-Id: I0ceace61899d0b1bd047e5011acaddd4428c944e
2024-07-11 20:58:10 +00:00
Jdrewniak f1150164e1 Add beta tag & feedback link to Appearance menu
Adds the word "(beta)" beside the Color options in
the Appearance menu, as well as a link for user
feedback related to dark-mode issues.

Re-orders the "Color" options to come last in the
Appearance menu.

Bug: T367871
Depends-On: Iac6316cf7010b5ea92672e9ad6f09e8ee57e066b
Change-Id: I46f7554b4bcdcfae0e4ef2e849d52774242e3497
2024-07-02 22:29:07 +00:00
jenkins-bot 2f92e61a13 Merge "Inject service LanguageConverterFactory into VectorComponentVariants" 2024-06-24 18:32:00 +00:00
Jon Robson 0f594e0af7 Make all frontend stored preferences global
Additional change:
* Delete some unused messages

Bug: T341278
Depends-On: I254d7d883771dbd394ba97799d731012f7aaaefc
Change-Id: Ic40da2af8ea46bd42cbebbdbceda2431bd8600ae
2024-06-18 16:37:53 +00:00
bwang 75fce0d5bc Remove external link variables, and replace content-links modules with Codex
Change-Id: I55d062de1624b77bc5214942368a3fbd545635df
2024-06-17 14:35:33 -05:00
Fomafix c9408c027e Inject service LanguageConverterFactory into VectorComponentVariants
Change-Id: I0e1fa5a8f8f6705e2439bdbc914b9d80b0072c30
2024-06-14 11:23:51 +00:00
Jon Robson 0991d5ef79 Make Vector 2022 pseudo-responsive
We want Vector 2022 to exhibit more responsive behaviours when the
window is resized by forcing these on mobile users

The skin--responsive class is added to the body alongside the
viewport. For now we'll add it in Vector 2022.

Depends-On: I5e3cba54a8d52852e4c33cebdeb76d8ce3257017
Depends-On: I604ea436a816939cd6b2d9ef8c352e319ffcbec0
Depends-On: I0a74a18707dca582bac094e38fa5a0db7298033a
Bug: T113101
Change-Id: Ic5365fc82e2f52486abcd6c52f6cc8964f80a5bd
2024-06-10 22:09:37 +00:00
jenkins-bot 1e4e03395b Merge "Add width exclusion notice" 2024-06-05 19:37:29 +00:00
bwang 716aad56af Add width exclusion notice
Bug: T366216
Change-Id: If50e9adcec6f2fa139e793b3a8108f3b4dd689ca
2024-06-05 19:15:11 +00:00
Jon Robson 78136827ce Vector and Vector 2022 no longer share site styles or scripts
Bug: T365771
Change-Id: I508eeb143ecd0a972e2b8790ca2b5982b1d83e71
2024-06-03 18:13:28 +00:00
Bartosz Dziewoński 25cc1d2ad7 [Vector legacy] Indicate support for new heading HTML
Add `"supportsMwHeading": true` to the skin definition,
so that MediaWiki 1.43+ will output new heading markup
when using this skin.
https://www.mediawiki.org/wiki/Heading_HTML_changes

The required CSS changes were already made in commit
3c2602b682.

Bug: T365736
Change-Id: I2fd2ef99e49f1c3d0711a08f7bc72fc3cff9e444
2024-06-03 03:33:12 +00:00
jenkins-bot 3fb0bb484b Merge "Disable night mode if gadget detected" 2024-05-30 22:53:51 +00:00
Steph Toyofuku 4a0c2cb684 Disable night mode if gadget detected
While our implementation of night mode is in beta, we want to respect
the existing night mode gadget and disable night mode in favor of the
gadget, providing a notice with an option to disable the gadget and
reload the page

Additionally, raise the max bundle size to account for the additional
code added

Note: the tests still aren't exactly where I'd like them to be, but
hopefully they raise confidence a little bit with reviewing this patch

Additional changes:
* Upgrade to latest version of TypeScript types and remove several
@ts-ignore statements

Bug: T365083
Change-Id: I9583ee7ebf8c810ddd504193d568034c954d28f2
2024-05-30 20:23:38 +00:00
Jon Robson dba9e16be2 Limit table wrapping to configuration flag
We want to limit this behaviour on initial roll out to certain
wikis.

Bug: T330527
Change-Id: If73f6f3d182cc386ebf0e750206afdb05fd3d863
2024-05-29 15:35:45 -07:00
jenkins-bot 4235ff0efd Merge "Wrap tables with JS" 2024-05-24 22:46:24 +00:00
bwang e42b235669 Wrap tables with JS
Depends-on: Ia271a57776e6f38384c5855727ab82fd7af83241
Bug: T330527
Change-Id: I756f8e1bcd86867bee52962a0d1c2dbb34ca75eb
2024-05-24 15:49:54 -05:00
Jdrewniak 607e6b39c5 Revert "Add exclusion behaviour for "width" option in Appearance menu"
This reverts commit ff5a61e9c6.

Reason for revert: The behaviour introduced in this patch needs some more consideration.

Bug: T364015
Change-Id: Ieab4ca4084df4f1b5c942fe81c7fb99b058e0623
2024-05-23 23:51:46 +00:00
jenkins-bot c570ec099d Merge "Optimize styles" 2024-05-17 18:30:33 +00:00
Jan Drewniak ff5a61e9c6 Add exclusion behaviour for "width" option in Appearance menu
- 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
2024-05-17 17:58:19 +00:00
Jon Robson 1d17b4624f Optimize styles
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
2024-05-17 16:26:16 +00:00
Jon Robson 9bdde667fb Reflect production defaults
Bug: T363814
Change-Id: Iea89208342f09f621acc6219f814271955bbd5fc
2024-05-16 21:09:45 +00:00
Moh'd Khier Abualruz 37e8e4c929 feature(Vector): Add configurable font size exclusions
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
2024-05-15 19:19:38 +00:00
Jdlrobson b7743a1dbe Revert "Add exclusion notice for "width" option in Appearance menu"
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
2024-05-13 21:33:49 +00:00
ksarabia 5c9fc606dd Deploy limited width settings
* Main page set to true for exclude.
* Makes it default to all wikis.

Bug: T357706
Change-Id: I72d2e9e4eb2e11b1c9bfbdacbd6e298ec205040d
2024-05-10 17:34:08 -05:00
Jan Drewniak 89c250c18e Add exclusion notice for "width" option in Appearance menu
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
2024-05-09 16:47:07 -04:00
Jon Robson ca0d404e50 Enable night theme in Vector
- 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
2024-05-02 13:22:59 -05:00
jenkins-bot c3987d472b Merge "Rename client preference menu to appearance menu" 2024-04-29 20:41:19 +00:00
jenkins-bot 50c34aedf5 Merge "Wrap sitenotices in core" 2024-04-29 17:49:40 +00:00
bwang 0109218ab9 Rename client preference menu to appearance menu
Bug: T362808
Change-Id: Id6800d38eebf433cf0c9e3f179dd83df2eefd1fb
2024-04-29 15:38:20 +00:00
Jon Robson 3c01ccc9f0 Wrap sitenotices in core
Depends-On: Ib48b1f54c326a0363841b2f592d8fd4cf7312b9b
Bug: T361966
Change-Id: I14cab105a798a5c9e615892c3305bfbd459a7a51
2024-04-24 17:12:26 -07:00
Moh'd Khier Abualruz 780d475176 feature(Vector): Standardises terminology to 'Dark Mode'
This update standardises the terminology from 'Night Mode' to
'Dark Mode' across interface messages. This change aligns with common
terminology used in the industry.

Changes:
- `i18n/en.json` and `i18n/qqq.json`: Updated labels and descriptions
  for UI elements from 'Night' to 'Dark' to reflect the new terminology.
  This includes changes in labels like 'skin-night-mode-0-label' to
  'Light' and 'skin-night-mode-1-label' to 'Dark'.
- `skin.json`: Updated descriptions in configuration settings to
  mention 'Dark Mode' instead of 'Night Mode', ensuring that
  documentation reflects current terminology.

Bug: T361157
Change-Id: I682a79fd7d9b37b4f908581e8fd28fd40f798c5c
2024-04-24 22:58:35 +00:00
Eric Gardner cb8c7a17fd styles: Remove references to the legacy Codex build
Since Codex switched over to rem units, all differences between the
"legacy" and non-legacy builds of the library have disappeared.

This change removes references to the legacy version of the library
in preparation for the removal of these artifacts from Codex.

Bug: T360806
Change-Id: I158519eddc1738a5daeedb94eb7d2f692e74b84a
2024-04-22 18:41:05 +00:00