Commit graph

4651 commits

Author SHA1 Message Date
jenkins-bot 0eb580f4f7 Merge "Update pinnableHeader class when moving pinnableElement." 2023-10-25 18:36:00 +00:00
Jan Drewniak f59ceb4390 Update pinnableHeader class when moving pinnableElement.
Adds functionality to update the pinnable header class
(pinned or unpinned) after is has been moved via
movePinnableElement().

Bug: T348039
Change-Id: I23552bdbb3390222c2c8efbd5f9122a4d5021a00
2023-10-25 17:44:12 +00:00
Jon Robson 329d91c99c Vector 2022: Support dropdown creation via addPortlet
Vector 2022:
mw.util.addPortlet('p-twinkle', 'TW', '#p-cactions');
mw.util.addPortletLink('p-twinkle','#', 'Hello world');

Or if preferred it can be added to the pinned menu
mw.util.addPortlet('p-twinkle-pinnable', 'TW', '#p-tb');
mw.util.addPortletLink('p-twinkle-pinnable','#', 'Hello world');

Bug: T342815
Change-Id: Id58515e72bfbd5f700aa573a122529c6efdfea9d
2023-10-25 15:44:45 +00:00
jenkins-bot 1eb75ab7b1 Merge "Vector legacy: Support dropdown creation via addPortlet" 2023-10-25 10:15:05 +00:00
Jon Robson cb8a500e7a Vector legacy: Support dropdown creation via addPortlet
Vector:
    mw.util.addPortlet('p-twinkle', 'TW', '#p-cactions');
    mw.util.addPortletLink('p-twinkle','#', 'Hello world');

Additional changes:
* Add aria labels to gadget created menus

Additional changes to template
* Remove self closing tag on input[checkbox] in template
* Rearrange vector-menu and vector-menu-dropdown classes
for consistency between two approaches

Bug: T342815
Change-Id: I938928c3625099ad49bec8aafb11f91190a9f494
2023-10-25 10:39:30 +02:00
Translation updater bot ffdb3f05e5 Localisation updates from https://translatewiki.net.
Change-Id: I6d31eefa93f3183d72f7b11d932630934841ac33
2023-10-25 09:04:13 +02:00
Jan Drewniak 751454d7a8 [Visual change] Normalize small font sizes in Vector 2022
Replaces font-sizes that are between 12-14
px with ones that equal 14px. This involved
converting some values to rems as well as changing
their size.

@font-size-tabs (a computed 13px value) is removed
in favour of unit( @font-size-small, rem).

This removal requires the following changes:

* Removing max-height & box-sizing from tabs, since
  they used @font-size-tabs for size calculations
* modifying .mixin-vector-arrowed-dropdown-toggle()
  to use `unit( 12 / @font-size-browser, rem )` instead
  of `unit( 16 / @font-size-tabs / @font-size-browser, em )`
* Changes to the position of `.vector-toc-toggle` since
  it's width/height depended on
  .mixin-vector-arrowed-dropdown-toggle()

Opportunistic refactor:
- `.mixin-vector-legacy-menu-heading-arrow()`
  is removed from Zebra

Expected visual changes:
font-sizes below refer to computed values, actual values
are now set in rems.

* Text in tabs is 14px not 13px
* #siteSub is 14px not 12.8px
* #contentSub is 14px not 11.76px
* #contentSub line height is default, not 1.2
* dropdown [hide] labels are 14px instead of 13px

*************************
*****VISUAL CHANGE*****
*************************
: 91 changes in Pixel due to content being pushed
down due to bigger font-size in toolbar.

Bug: T346062
Bug: T261334
Change-Id: I6cfc800bb8dfed206670e5365bdc55e5d7357a4a
2023-10-24 22:50:15 +00:00
jenkins-bot 0c4b6d9874 Merge "Introduce CSS custom properties under font-size feature flag" 2023-10-24 19:03:16 +00:00
Jon Robson 076f957c5d Drop p-namespaces backwards compatibility script
Bug: T347907
Change-Id: Ib2bec20315440f89a0ca375f0e2b65b7a041006d
2023-10-24 18:43:28 +00:00
jenkins-bot 319fd57e0f Merge "Follow-up to 74b5834: Add language prefix to Readability survey" 2023-10-24 17:58:05 +00:00
Jan Drewniak b4fe7c35b9 Follow-up to 74b5834: Add language prefix to Readability survey
Changes the language of the preload page
based on the wikis content language.

Bug: T349232
Change-Id: Ie4233e6e31f57d09c319835c03c427dc7e83aea9
2023-10-24 16:50:29 +00:00
jenkins-bot 91658a803f Merge "styles: Remove references to WikimediaUI Base and use skin variables" 2023-10-24 16:50:17 +00:00
Jan Drewniak 2223cb8c1b Introduce CSS custom properties under font-size feature flag
Introduces CSS custom properties for the purposes
of enabling client-side customizable font sizes.

CSS custom properties are contained in a Less file,
which imports values from Codex and converted them to rems
using the Less unit() function.

Includes ADR on CSS custom properties decisions.

Bug: T348984
Change-Id: Ic5e62d55f3c3585fe3a00e41f29f88d3a2f7470b
2023-10-24 14:33:33 +00:00
Translation updater bot f0603ed967 Localisation updates from https://translatewiki.net.
Change-Id: I5063b5675b9325d10b6960382c44b9aa4fa95bb4
2023-10-24 09:40:56 +02:00
Translation updater bot 169dadb88d Localisation updates from https://translatewiki.net.
Change-Id: I6b3ec523107c7d231e3f3507b03e9ec9f919fd5e
2023-10-23 09:53:41 +02:00
Volker E eb8f186a79 styles: Remove references to WikimediaUI Base and use skin variables
Removing all references to WikimediaUI Base and replacing them with
the Codex equivalents.
Also removing variables redefinitions that are not needed anymore.
Only value difference is a last family added before general fallback
called 'Source Serif Pro', which basically will never be visible due to
the general availability of Georgia and Times.
Also removing general font stack comments, see Codex design tokens
comments for these context explanations.

Bug: T334934
Change-Id: I61aa44e40830ffdb308aaea4ca30af0f25ba2274
2023-10-22 19:18:03 -07:00
Umherirrender ae1584ade5 Simplify SkinVector22::isTocAvailable
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
2023-10-22 16:50:22 +02:00
Umherirrender cb8fc5c8c1 Replace empty() with falsy check
empty() should only be used to suppress errors
When the type of the variable is array,
a falsy check is the same (checks for null, false and empty array)
Found by a new phan plugin (T234237)

Change-Id: I84ced7c17157b322f858640362e1013e37773d43
2023-10-22 11:45:42 +02:00
Umherirrender b962638262 Replace empty() with a string compare
empty() should only be used to suppress errors
Found by a new phan plugin (T234237)

Change-Id: I10b562aa04eb9cf974e301567e74f2f620027ba8
2023-10-21 20:26:30 +02:00
Translation updater bot 97f8f4e6b5 Localisation updates from https://translatewiki.net.
Change-Id: Idb93ff9284fd46b391825c298e4eecc3ae3dfa8a
2023-10-20 09:23:58 +02:00
jenkins-bot 8b9cbc7150 Merge "Make Vector feature flags compatible with beta features" 2023-10-19 17:22:49 +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
Translation updater bot f8dd7725f3 Localisation updates from https://translatewiki.net.
Change-Id: I84ad95c5f32eb0614a0dcc2bc21328acab84ff00
2023-10-19 08:46:36 +02:00
Jan Drewniak 3712de4b23 Use Architectural Decision Records in Vector
Change-Id: Icd14a471074684e063804259050e6944393654af
2023-10-18 18:08:53 +00:00
jenkins-bot ce5c5dba93 Merge "Add multiple font size to logged-in users" 2023-10-17 21:56:42 +00:00
Moh'd Khier Abualruz 22e97fe383 Add multiple font size to logged-in users
Read Value from user preference for logged-in users.

Depends-On: I041a0cb21e872700ceeeddd3a39922e456aa7bb8
Bug: T346954
Change-Id: I6afa39624c3cadd31632d63a36b919d641983ae6
2023-10-17 19:42:30 +02:00
Jan Drewniak 74b58348f6 Add language prefix to Readability survey
Changes the language of the preloaded form
by using Special:MyLanguage.

Bug: T347208
Change-Id: I34759fc17f2078eb34dfcf4f8d86dfb082eeb6d6
2023-10-17 12:26:28 -04: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
Translation updater bot 77ea8245a6 Localisation updates from https://translatewiki.net.
Change-Id: I235d3a6e3fdbbed4345184843a3677161b87ae89
2023-10-17 09:37:08 +02:00
jenkins-bot 48f2a52c96 Merge "Simplify TOC design for pinned TOC on no js small viewports" 2023-10-17 04:11:30 +00:00
Jan Drewniak 8a3e24e346 Simplify TOC design for pinned TOC on no js small viewports
Bug: T340571
Change-Id: Ie34d7d478b3a73cade9f5328439515e419692eb7
2023-10-16 23:31:18 -04:00
jenkins-bot 23aae68630 Merge "Add config option to disable Readability survery & minor fixes" 2023-10-17 00:29:18 +00:00
jenkins-bot 79dad6453c Merge "Define stable and internal APIs" 2023-10-16 17:42:42 +00:00
Translation updater bot 07d2e24316 Localisation updates from https://translatewiki.net.
Change-Id: I8296b2578b40664490db816ac1f1ac342ba29510
2023-10-16 09:18:32 +02: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
jenkins-bot 6b9055e593 Merge "Allow user preferences to be overriden by query string parameter" 2023-10-13 17:33:12 +00:00
Translation updater bot deace145fb Localisation updates from https://translatewiki.net.
Change-Id: I3e1f057b29f755172b8178bd3a52643f6568f984
2023-10-13 09:00:06 +02:00
jenkins-bot 48a3efbae2 Merge "Vector sticky header dynamic edit icons order" 2023-10-12 19:18:03 +00:00
Jon Robson 411f9ce69a Allow user preferences to be overriden by query string parameter
Currently only features that are associated with LocalSettings configuration
can be overriden by query string. Going forward we'd like to expand this to apply
to user preference too.

A generic OverrideableRequirement is created.
The existing OverridableConfigRequirement is refactored to extend OverrideableRequirement
The /UserPreferenceRequirement now extends it

This allows http://localhost:8888/wiki/Spain?vectortypographysurvey=1
to work

Bug: T347900
Change-Id: I11efd6b07192d5d2333f4506e9d87a8c0638d657
2023-10-12 19:05:10 +00:00
Moh'd Khier Abualruz 0903ecba9c Vector sticky header dynamic edit icons order
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
2023-10-12 18:54:47 +02:00
bwang 0e37765afb Remove cached CSS from vector-sidebar-container-no-toc
Change-Id: I3a300ae217ba71c272da83c90ac5c43cc0adf4df
2023-10-12 00:05:13 +00:00
Ammarpad 3452647071 Hook: Create HookRunner and interface for own hook
Bug: T348040
Change-Id: I63a7e71a06729dbf607ef9bb275896e42db1b6e0
2023-10-10 22:03:43 +00:00
Jan Drewniak 732069f7fc Move @font-size-base into mediawiki.skin.variables.less
Bug: T348572
Change-Id: Iaaf25e7904252a9ce3fa1363c8ed4a6b1bc95bc4
2023-10-10 20:43:29 +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
Translation updater bot 357a518627 Localisation updates from https://translatewiki.net.
Change-Id: I81242d4becc5743923a735028106160143915a02
2023-10-10 08:54:38 +02:00
Translation updater bot eb5ddd6180 Localisation updates from https://translatewiki.net.
Change-Id: I0751864e901ffb4f6436a17687f6b4a0ad5bb2c4
2023-10-09 09:00:15 +02:00
Translation updater bot 1d7cf846e8 Localisation updates from https://translatewiki.net.
Change-Id: Ibdd0a7cf42c245aeff6706164de612b5bff3e162
2023-10-06 10:05:35 +02:00
Translation updater bot 24efcf21da Localisation updates from https://translatewiki.net.
Change-Id: I344edaa4f1215834467b4dd214f41382426b7afb
2023-10-06 09:26:09 +02:00
bwang 896645be29 Remove common CSS module
Bug: T345766
Change-Id: I57e388be4b620a437274524e20653ef9ba7289ed
2023-10-05 22:35:40 +00:00
Jon Robson fd046f3258 Use skin variables instead of local variables where possible
None of these files need access to the skin local variables. Use
skin variables instead

Change-Id: Iaf1591fdfc5487e6f05f020893864eb2097af708
2023-10-05 15:34:50 -07:00