Commit graph

101 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
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
Jdrewniak 392c81a127 Avoid using <noinclude> tag in Vector dark-mode i18n message
Replaces the unintuitive `<no<includeonly></includeonly>include>`
tag in the `vector-night-mode-issue-reporting-preload-content` i18n
message with a simpler HTML comment tag `<!-->`.

Bug: T367871
Change-Id: I3c2dd841af9616efccf42dc9616565fe9400d464
2024-07-05 14:08:56 -04: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
bwang 716aad56af Add width exclusion notice
Bug: T366216
Change-Id: If50e9adcec6f2fa139e793b3a8108f3b4dd689ca
2024-06-05 19:15:11 +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
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
Umherirrender fb03108304 i18n: Replace mw: interwiki with url to mediawiki.org
The interwiki table must not contains an interwiki link with prefix mw:

Bug: T285439
Change-Id: I2aa9c676d42d1741d57c6792c7fb85b844a6f969
2024-05-15 22:57:17 +02: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
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
Jon Robson 0f39c03dc6 Mark night mode as experimental feature
Bug: T359571
Change-Id: Ic930ee1ba1af3d463f6d49825dcc4ed72537b254
2024-03-07 19:17:59 +00:00
bwang 230c837052 Remove language notice
Bug: T353619
Change-Id: I75430c8b1e66158f798fbe27eec4942a089f3931
2024-02-29 17:04:16 -06:00
Func fe7e2b05a5 i18n: Adjust the Desktop Improvements project link
This should encourage translators to translate the Desktop Improvements project name.

Bug: T356739
Change-Id: I5335f6d7b616bb54458ee3a03e87672b825b38b2
2024-02-28 17:41:57 +00: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
Steph Toyofuku 02681c150f Rename "Theme" to "Appearance" in reading accesibility preferences
Appearance better communicates this section than theme, so let's change
the heading to reflect.  Note this only updates the english heading and
the qqq remains unchanged at this time

Visual diff in english as it updates text on all pages

Bug: T354371
Change-Id: I6824d1d970a3fd4e6d7292d8a493abbcb736bd5d
2024-01-08 14:12:12 -08: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
Jon Robson 1c2dff5690 i18n: Update copy
* Switch from "has been" to "has"
* Reorder limited width options
* Change headings
* Change options
* Change copy of beta feature

Bug: T351998
Bug: T351867
Change-Id: I65494a3cc75b661339e48df1bea0e09a365c0657
2023-11-27 11:21:55 -08: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 6f264d8493 i18n: client preferences
Changes:
- Use "Theme" for the settings heading
- Update column width options to wide and standard

Notes:
- I haven't changed type size or column width as the proposed
text includes "Article". On many projects outside Wikipedia,
the use of "article" is semantically incorrect.
- Type size currently has 4 options. Need to talk to Justin
before renaming those.

Bug: T350417
Bug: T350195
Change-Id: I1c98e510b731e3671c36e095081975400edf4e49
2023-11-14 00:43:11 +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 84b2d81809 [Prototype] Edit project link page on reading prototype
Changes project page link to use Special:MyLanguage

Change-Id: I99322f3492b85bd65828453a98d3cba50b9525c7
2023-10-05 14:31:22 -04:00
Jan Drewniak a04ff40809 [Prototype] Change i18n message
Edits the translation message for the
readability prototype.

Bug: T347208
Change-Id: I961c656d529bb0e11baafbdefb89dbc347a2c12c
2023-10-03 14:07:37 -04:00
Amir E. Aharoni 7fff1fd15a Correct a recently-added message
Change-Id: I415c664823c5dd79905ec46926c1deb7ec83681e
2023-10-02 19:06:17 -04: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
Moh'd Khier Abualruz d800e8b34f Update Vector localization message language redirect to top
- Update (vector-language-redirect-to-top) to be shorter and more accurate

Bug: T330805
Change-Id: Ibae37b7e4b148ef7ebfc13b8f929e3b694685731
2023-06-23 18:29:45 +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
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
bwang 8f5b33fee3 Replace 'more' menu with page tools pinnable dropdown
Bug: T317897
Change-Id: Ia94ebc32041bb3c2f86d461b310766b2d14c66a2
2022-11-10 15:33:16 -06:00
Moh'd Khier Abualruz 6487f962f2 i18n: Remove unnecessary comma in preference description
Follow-Up-To: I3525f8bfe27445e3af83ce5cd34b4da643178fe2

Bug: T321038
Change-Id: Ide81563fdae96d5d8dcb76d18282764349a81352
2022-10-24 15:28:41 +00:00
Func 9afe5a6e87 i18n: Rename some messages to follow common practice
We usually prefix the message keys with the skin/extension name,
and use label/help/tooltip as postfix when needed.
The naming of the tooltip above is limited by Linker::tooltip(),
so not able to rename it. Maybe some work is needed in the core.

Other languages' work will be follow-up by the translation bot.

Bug: T319447
Change-Id: I3c88871540b7668f1699fe3a86a8146f97ff5282
2022-10-19 20:22:02 +08:00
Jon Robson d7f7302cee i18n: Fix typo and simplify preference description
Additional follow-up to 76d1135

Change-Id: Iea478cbfa7ae36b6f1d45ffd74eb58f358ad54f1
2022-10-18 08:21:42 +00:00