Commit graph

112 commits

Author SHA1 Message Date
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
jenkins-bot 9acbd06fb2 Merge "Add tooltip to appearance menu icon" 2024-08-27 23:36:27 +00:00
Jon Robson 3c7d7c673e Add tooltip to appearance menu icon
Bug: T369849
Change-Id: If3a73746dce41f3659f61c68941ed3ed6ebb6fd1
2024-08-27 23:06:16 +00:00
Jon Robson 1b4d07e1d2 Add tooltip to reporting link
Bug: T369849
Change-Id: I225c83e9ee1c95957479a684527d1297b7a471c1
2024-08-27 21:37:54 +00:00
Translation updater bot 97191f6f79
Localisation updates from https://translatewiki.net.
Change-Id: I890642aad6b050a1dd8f8f2b338e49d2652a5d5c
2024-07-25 09:22:04 +02:00
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
Translation updater bot 2e1a1d7664
Localisation updates from https://translatewiki.net.
Change-Id: I58510153c48c118deadae62f42a6150a49824bcc
2024-07-05 09:50:58 +02:00
Translation updater bot 71689a6d31
Localisation updates from https://translatewiki.net.
Change-Id: Iede9361f93782527a02602e9d151f3ad2e13e34c
2024-07-04 09:26:52 +02: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
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
Translation updater bot 6298977161 Localisation updates from https://translatewiki.net.
Change-Id: I71a781411f1c5d936edd5e5f8aa11500045767ae
2024-06-07 09:49:40 +02: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
Translation updater bot 49152c98a4 Localisation updates from https://translatewiki.net.
Change-Id: I5b0fd05cb7686d9884a2af76d778a97040e48900
2024-05-27 09:32:29 +02:00
Translation updater bot 57873592ff Localisation updates from https://translatewiki.net.
Change-Id: Ib4274eb3401ee93383b7c64404a6c7352b4e6ca7
2024-05-20 09:28:44 +02:00
Translation updater bot d85f9797db Localisation updates from https://translatewiki.net.
Change-Id: I024b9641c1044ece0dda0414d6a7bea02ed40e05
2024-05-17 09:52:53 +02:00
Taavi Väänänen e2bfd5f957
Fix one more message using "day mode" instead of "light mode"
Bug: T361157
Change-Id: Iaa8f8792b5c93fe31655c8e97e6e032ef255d236
2024-05-16 14:28:45 +03: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
Translation updater bot 48b497f09a Localisation updates from https://translatewiki.net.
Change-Id: I2564a625af0d80145a4f6b104a5f3a759176b7c0
2024-05-10 09:33:46 +02: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
jenkins-bot c3987d472b Merge "Rename client preference menu to appearance menu" 2024-04-29 20:41:19 +00:00
bwang 0109218ab9 Rename client preference menu to appearance menu
Bug: T362808
Change-Id: Id6800d38eebf433cf0c9e3f179dd83df2eefd1fb
2024-04-29 15:38:20 +00: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
Jan Drewniak a3801497b9 Add exclusion notice for night mode feature
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
2024-04-16 22:38:35 -04:00
Jon Robson 88e6f9ab59 Prepare for class and preference rename
Bug: T359983
Change-Id: I6937def83d3e71029bf99e5fa7c8e9d2eb96f1fa
2024-03-18 21:38:16 +00:00
Umherirrender 73e19f26a0 Revert "Localisation updates from https://translatewiki.net."
This reverts commit 7548b0dd99.

Reason for revert: Breaks CI
1 documented message is undefined.
Message "vector-language-redirect-to-top" is documented but undefined.
Build step 'Execute shell' marked build as failure

Change-Id: I6f893e9348d7452f990544b21085af2fa9dbdd8a
2024-03-01 17:37:32 +00:00
Translation updater bot 7548b0dd99 Localisation updates from https://translatewiki.net.
Change-Id: Ia421971114f4310d810c315d7342beaebbc4a608
2024-03-01 08:36:14 +01:00
bwang 230c837052 Remove language notice
Bug: T353619
Change-Id: I75430c8b1e66158f798fbe27eec4942a089f3931
2024-02-29 17:04:16 -06: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
Translation updater bot e781eed47c Localisation updates from https://translatewiki.net.
Change-Id: I78eed7d0bed354de3ec79186feb8f454344c8a81
2024-01-08 11:34:10 +01: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
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
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 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 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
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
Translation updater bot a60b94616e Localisation updates from https://translatewiki.net.
Change-Id: I9083a4ec10e4c85c527e86af229c78238768a4bf
2023-05-22 08:49:30 +02:00
Translation updater bot 609c6d0277 Localisation updates from https://translatewiki.net.
Change-Id: If1d95a05d21cdfdbeb3cf75141cb2920cc89abb8
2023-05-01 10:00:43 +02:00
Jon Robson 2622472983 Point out the limited width control
The limited control will be pointed to on page load
When wgVectorPageLoadIndicator is set to true (defaults
to false)

Clicking the button should show the indicator.

Additional change:
* Update config.json to reflect new state
(Follow up to 28ada2dc)

Bug: T333601
Change-Id: I188ed7226b9a1530e54b1aaa80caa0830bf73633
2023-04-14 17:15:56 +00:00
Moh'd Khier Abualruz 25f5f4975a Add indicator that appears when TOC & page tools menu have been hidden
Show a popup to the user to point them to the new location of the element

Bug: T311160
Change-Id: I967d027b23931d99767b31bd7a6af5f6410c8f5d
2023-03-23 21:46:51 +00:00
NikG d39b5c958a Update language dropdown for pages not supported in other languages
Pages that are not supported in other languages should not display the
ULS when the language button is clicked. Instead, a simple message
explaining that the page contents are supported in other languages
should be displayed inside the dropdown. Additionally, the language
button should be modified for these non-content pages, to non include
any label and be quiet instead of progressive.

This patch implements these specifications by appropriately modifying
the mustache templates and the underlying skin classes.

Bug: T316559
Change-Id: I37d8e61a1287b31d1a304d2a955f532b9b8fa505
2023-01-06 16:40:36 +00:00
Jon Robson cf56a37b00 Add label and title attribute/tooltip to full-screen toggle button
Bug: T323625
Change-Id: If12837cd0e3c443a023671b2a9ab85098ffd6119
2023-01-05 00:56:39 +00:00
Translation updater bot 19abc50ee0 Localisation updates from https://translatewiki.net.
Change-Id: I2e9c9d6ab13a03737c6c6da705841cb8d56f4dd5
2022-12-21 09:22:34 +01:00
Nicholas Ray a25dba2a19 Move toolbox and menus that follow into page tools
Uses all of the changes from Jon's patch in 866503 to move all of the sidebar
menus after and including the tools menu into the page tools component. The rest
of the menus remain in the main menu.

Additionally:

* Per T317898#8468437, the "Tools" label should be "General". It was also
assumed from the prototype that the "More" label should become "Actions"

Bug: T317898
Change-Id: Ic9c1586febd8ebfff4a17285e6bd59cee509bd34
2022-12-14 13:38:13 -07:00
Jon Robson a7f008b9bc Page tools: Main menu is a dropdown
This is an incomplete styling of the menu.

This should be enough to start an initial design
review and unblock other work on the dropdown.

Out of scope for this patch:
- Pinning (being done in T317900)
- Design (will be done in follow up)

This should cause no visual regressions in Pixel.

Bug: T317899
Change-Id: Id7b47cc16fc8cf93d406687198ba37acf7a9cf24
2022-12-07 23:19:29 +00:00
bwang 17bdb31de5 Rename TOC locales to be generic pin/unpin labels, standardize toc label locale name
- 'vector-toc-toggle-position-title' -> 'vector-pin-element-label'
- 'vector-toc-toggle-position-sidebar' -> 'vector-unpin-element-label'
- 'vector-toc-heading' -> 'vector-toc-label'

Change-Id: I4c45fa9a152e26691cc0b62ce8d40d00f8f2e617
2022-11-14 16:26:08 -06:00
Translation updater bot 43887fe6f9 Localisation updates from https://translatewiki.net.
Change-Id: Ia8d858325d8836850aab03947385b0ef228d0741
2022-11-14 08:13:09 +01:00
bwang 8f5b33fee3 Replace 'more' menu with page tools pinnable dropdown
Bug: T317897
Change-Id: Ia94ebc32041bb3c2f86d461b310766b2d14c66a2
2022-11-10 15:33:16 -06:00