Commit graph

386 commits

Author SHA1 Message Date
Func 8c578a984e Cleanup skin.json and ToC template
The ConfigRegistry was removed as unused but somehow reintroduced
mistakenly in the commit 80b60c15.

The fallback to anchor for old parser cache should be good to drop.

Change-Id: I0b6effd0fd4c535298fa280da734b13d26a5d968
2023-05-17 22:15:37 +08:00
Jon Robson 8815afad25 Vector 2022 should manage styles for ext.uls.pt
Since these are part of the interface they should evolve
with the interface. This is needed to support switching our markup
to Codex.

Bug: T335710
Change-Id: I9996696795f792567f770ac8bf57002bd5706d06
2023-05-10 22:14:41 +00:00
bwang 6f13caa775 Remove VectorTableOfContentsBeginning flag
Bug: T334969
Change-Id: I9e931b7cdc443e73a41c92f5368f81b35285437e
2023-05-08 22:25:03 +00:00
bwang c7001374ff Make limited width button consistent with button spec
Bug: T334881
Bug: T326323
Change-Id: I97cd6d9ede39993cd58274eaff2749aa654e4777
2023-05-02 13:32:22 -05:00
Nicholas Ray 29b982999f Remove language switching alert box temporary feature flag
Remove everything related to the `wgVectorLanguageInHeader` feature flag and
rely on the LangaugeInHeader feature instead.

Bug: T297237
Change-Id: Ida2c588e03f759d2eefc7c67ff44dcdd9a100f9a
2023-04-27 14:57:18 -06:00
Volker E 4efefdc420 styles: Remove 'mediawiki.ui/variables' call
Removing 'mediawiki.ui/variables.less' `@import`, which is now
fully replaced by skin-aware 'mediawiki.skin.variables.less'
standard.
Bumping required MediaWiki core version to >= v1.41.0.

Also
- replacing deprecated keys with new Codex token equivalent keys

Bug: T319381
Bug: T332541
Change-Id: I87bd258a24d8ca8b789f8355fe6495eca4cebb85
2023-04-25 12:58:30 -07:00
jenkins-bot 46099eca8a Merge "Create skins.vector.zebra.styles module" 2023-04-19 22:13:44 +00:00
Jan Drewniak 5852e320a3 Create skins.vector.zebra.styles module
Creates a new skins.vector.zebra.styles module that
will hold style modifications for the Vector Zebra update.

Affected files are copied from skins.vector.styles
without modification (at this point) to improve
revision history in git.

The new module should compile without error and existing
styles should not be affected.

Bug: T332600
Change-Id: I9b367ca0a0afea32b49915b40bc03c05910d4227
2023-04-19 15:12:53 -04:00
ksarabia 8cdb773026 Add Vector Zebra Design A/B Test
Adds Zebra A/B test configuration

Bug: T333493
Change-Id: I56f66e19dd3fab2007de50d665f077a4ee01a6e4
2023-04-18 18:14:58 -07:00
bwang 4f76994970 Add custom limited width popup
Bug: T333601
Change-Id: I663d6a391aeeb05c27f2f2b8829c22325b528b39
2023-04-17 22:35:52 +00: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
Jon Robson c3e57e0ecd Merge skins.vector.es6 into skins.vector.js
With T178356 ES6 is the default, so these can now be
managed in the same module. Keeping them in the same module
will hopefully allow us to make more optimizations on the long
term.

Change-Id: I3fe9e50143b85b4cdc3d9171a60c3720a7c26b4b
2023-04-11 23:18:46 +00:00
Jon Robson 28ada2dc78 Refactor: Separate A/B test configuration from site configuration
Making it easier to add configuration variables to JavaScript
in future. This will be used for the pointer indicator.

Change-Id: I65396a3867e7e92d7385ebaa573fb48105ecb9fd
2023-04-11 22:40:45 +00:00
jenkins-bot 161bf3ce7d Merge "Special Search: Improve the search layout and search preview widths on tablets" 2023-04-07 12:48:17 +00:00
Simone Cuomo 64141c1f4a
Special Search: Improve the search layout and search preview widths on tablets
- [x] Add skin specific styles

Bug: T323843
Change-Id: I69fe0e4df2ec13fea2b4a5bc76881505b8bd8cf3
2023-04-06 10:59:14 +01:00
Jan Drewniak 40130dbf5f Follow-up to 6e8a98ca removing checkbox.js
Removes checkbox.js and related styles as well
as rules for #mw-sidebar-checkbox which was removed
in a previous patch.

Bug: T332090
Change-Id: I168c1161a1d3365e79c2ff6b1c2ab5455f7c4c00
2023-04-06 01:01:21 -04:00
ksarabia d983dadab4 Remove Vector2022PreviewPages configuration
Remove Vector2022PreviewPages configuration in Hooks and Skin.json.

Bug: T332797
Change-Id: I2c28a4e253b4dc17578793e1e4ce73e80392d08c
2023-04-04 17:07:04 -05:00
Jan Drewniak 15be8a0340 Remove custom sidebar config
Removes configuration for
1. Custom sidebar pinning
2. Default sidebar visibility for logged in & anons

The first config is no longer necessary because
the main menu now uses the pinnable header for
showing/hiding and persisting it's state.

The second config is no longer necessary since
the Page Tools menu moves many sidebar items into
a different location.

Bug: T332090
Change-Id: Iaf25237757dc1e43e096b8c5991e9dd31ad25c2d
2023-03-31 13:09:04 -04:00
jenkins-bot 1c650d4f25 Merge "remove Page Tools config & HTML" 2023-03-30 17:05:28 +00:00
Jan Drewniak 40bbb8c3a9 remove Page Tools config & HTML
Removes the config option for Page Tool menu,
its associated logic, along with the associated HTML from
the mustache templates.

Hardcodes the `vector-feature-page-tools-enabled` class
into the HTML element to prevent breakage.

Bug: T332090
Change-Id: I6466d80c6970bcc8e28d897b6bdff911a90e3655
2023-03-30 11:32:36 -04:00
Moh'd Khier Abualruz 718b116495 VectorZebraDesign configuration logged_in and logged_out keys
- skin.json added logged_in and logged_out keys to VectorZebraDesign configuration.

Bug: T332448
Change-Id: Ic79dc9d77d3fc71484965b9ecba6ab64e8a7969f
2023-03-30 14:05:40 +02:00
Moh'd Khier Abualruz 47b82f6034 Create feature flag for Zebra#9 design update
- Create a feature flag that will enable/disable the upcoming zebra design
- This feature flag will add a class on the `body` html element that will enable & disable the new design.
- class names:
 -- enabled: vector-feature-vector-zebra-design-enabled
 -- disabled: vector-feature-vector-zebra-design-disabled

Bug: T332448
Change-Id: I264f2a338130e95543c20b592addf954a119b56a
2023-03-28 22:02:26 +02: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
Nicholas Ray 40e8c33d55 Enable page tools for anonymous users
Bug: T331052
Change-Id: Ibe730d7c6f3914f579bfafc5e09aa438246d2ba6
2023-03-17 13:49:24 -06:00
Jon Robson a79fa9f00a Use clearer folder structure for Vector and Vector 2022 skin variables
Follow example in skinStyles and give these their own folders.
The problem with using "legacy" is that it could be interpreted as meaning
legacy LESS variables e.g. deprecated variables.

Change-Id: Ie456dfbd703a0e7a0ad783909ca3ef5e86450d9c
2023-03-14 21:48:58 +00:00
jenkins-bot 182cbf968f Merge "Allow wikis to customize whether Vector skins share user scripts and styles" 2023-03-09 16:00:41 +00:00
Jon Robson 5c1d5c6c9b Allow wikis to customize whether Vector skins share user scripts and styles
Currently Vector 2022 skin loads Vector and Vector-2022 site and user
styles. Some wikis have complained this is confusing, and want to
move away from this. Since this is potentially a disruptive change, it
is better to defer to communities on how they want to handle this
migration internally, but they should have the means to turn it off
when they've done that.

Bug: T301212
Change-Id: I132e3695ad282dd7c7ce9037688043c62c2e2aa4
2023-03-06 23:24:57 +00:00
Jan Drewniak d05f25100e Remove skinStyles for wikibase.client module
Removing these styles removes the icon from the
"add interlanguage links" link in the Tools or main menu.

Bug: T328069
Change-Id: I99084060951e6f26ade1f95e3cdd58e0fd6e28ec
2023-03-06 14:28:43 -05:00
ksarabia 74addde337 [WIP] Removes the TOC class in body and adds in html
Adds new constants for TOC and registers feature.

Bug: T325032
Change-Id: I5e0f5f3a6d186b245bdbc98c2bb9e4cc17a03fdb
2023-02-28 17:21:16 -06:00
jenkins-bot 338b677d34 Merge "Targets no longer needed" 2023-02-26 02:45:33 +00:00
Ed Sanders 77734b1597 Add feature flag to "promote add topic" feature
Will be used to control rollout to WMF wikis but can
default to true here.

Bug: T267444
Change-Id: I716563efffc2401fbf5f8b53876a8b58706b1cda
2023-02-24 13:48:29 +00:00
jenkins-bot 8d64966d5f Merge "Split off mediawiki.notification styles for legacy Vector" 2023-02-22 22:17:29 +00:00
Jon Robson 2039a1e130 Targets no longer needed
All match current default.

Bug: T328497
Change-Id: I3d5fbb48fab930b3cfd446054462e0a3f37b40c1
2023-02-16 11:45:57 -08:00
bwang 1696280f39 Enable Page Tools for all logged in users
Bug: T328692
Change-Id: I881be07088d1ff2210e441c74c70ee156783d1d0
2023-02-13 18:53:37 +00:00
Roan Kattouw 05693ff7f1 Use the wikimedia-ui-legacy theme for Codex component styles
MW core defaults to the wikimedia-ui theme, which is meant for a base
font size of 16px. Both Vector and Vector-2022 have a base font size of
14px, so they need to use the wikimedia-ui-legacy theme instead.

Bug: T324367
Bug: T329287
Depends-On: I7435413928f2b8c5d43c34d9e2e7df470d710c93
Change-Id: Ia130be691d578fb8e5675a94670ec7e35f448fe7
2023-02-09 21:39:18 +00:00
Bartosz Dziewoński 02698e06a2 Split off mediawiki.notification styles for legacy Vector
Bug: T328059
Change-Id: I69733d3efd2958ab1e02d12b1f252418c78cefef
2023-02-08 22:56:34 +01:00
Jan Drewniak 443955249b Improve wikibase interlanguage link styles
Overrides the `wikibase.client.init` module to
better style the interlanguage link button in
Vector 2022.

Also adds the `.mw-list-item` class to that link
so that it maintains consistency with the other
menu list items.

Bug: T328069
Change-Id: I5c84b7f036afb4b8dc11e92a59dff8000f068e67
2023-02-03 14:14:08 -05:00
jenkins-bot 7812db242e Merge "Make sticky header edit the default" 2023-01-30 19:02:31 +00:00
Jon Robson 6b064dad9f Increase threshold for table of contents collapsing
Bug: T328045
Change-Id: Ia8824db1f7e98655cb14a7aea4bfb97082f987a4
2023-01-26 08:55:50 -08:00
Jon Robson 8173c91a4e Limited width made persistent for anonymous users
Depends-On: Ic3b6eec19953932c697ab5bf48c33a4ac1841b07
Bug: T321498
Change-Id: I141a744abe7528203e6e05bf89ea225125319eb4
2023-01-25 17:51:02 +00:00
Jon Robson 55bb37f2ab Moves feature classes from BODY element to HTML element
Move feature classes to HTML element - this is significant
for anonymous as placing the classes on the body tag breaks
the browser's ability to parse the article concurrently
with the stylesheet download, because inline scripts
are spec'ed to be able to see document.styleSheets.

Changes:
* Feature classes are moved from BODY tag to HTML tag
* For now disable localStorage storage until we've worked out
the storage mechanism in core.

Bug: T321498
Change-Id: Id5afe2c60dc0067e7c74433eda5cd7858f54b0d7
2023-01-24 18:22:13 -06:00
Jon Robson 93c833030b Make sticky header edit the default
In production this is always true, so remove feature flag.
Retain A/B testing code in case it is still needed.

Bug: T324799
Change-Id: Ia2057eb69d0a8d3e6e51acb5729a4399fb17a18b
2023-01-24 19:48:48 +00:00
Jon Robson 155bb9a4da Legacy Vector is not a responsive skin
For some reason we are setting this to true when it's not
supposed to be. The recent refactor to complete the splitting of
two skins removed the override inside SkinVectorLegacy

Follow up to eea537394

Bug: T327256
Change-Id: Ie75a506866f4bd099efb26e8043fdcd37803a2da
2023-01-18 17:48:45 +00:00
Moh'd Khier Abualruz 29a2254b9a Update tableOfContents.js to rerender only the TOC contents rather than the entire pinnable element
Extra:
- Reactivated active list element, This still does not work if the current active gets edited.
- Removed pinning event reattach as we do not replace teh full element anymore.

Known Issues:
 - Collapse/Expand not working

Bug: T326839
Change-Id: I2ce251f5312659b827ac2941d789248473bb0ef5
2023-01-16 12:39:05 +01:00
bwang 5195949674 Fix mustache template rendering when TOC is rerendered after an edit
Bug: T326682
Change-Id: I7e8f5572a33c4440aed5e6e525a48d8abe4a2afb
2023-01-10 19:12:55 -07: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
bwang 6c817e932f Use features.js for main menu pinning functionality
- Register new feature for main menu pinned
- Update UserPreferenceRequirement to optionally handle default config values
- Add nav landmarks for the main menu

Bug: T317900
Change-Id: I8fc6e0a79a1155d68afb9e33e5101a2a160dc4e5
2022-12-16 12:56:54 -06:00
bwang 81348a659c Remove TOC AB test code
While removing this we also noticed that we check the value of
isMainPage. This doesn't seem like a good idea as most main pages
do not have a table of contents, so it seems like adding
unnecessary complexity for a state that doesn't exist in practice.
The existing code path also doesn't work as it adds a table of contents
unstyled to the page.

Bug: T324874
Change-Id: Idaeff6ace5912ea74ed9d335526027c4690ac8fa
2022-12-09 16:07:52 -08:00
Nicholas Ray 24055a6752 Set default pinnable state for page tools
* Leverage the infrastructure around feature management to handle the page tools
pinning and persistence

* Make pinnableHeader.js leverage features.js if the data-feature-name attribute
is set

* Sets tests/.eslintrc.json ecmaVersion to 2018 to enable destructuring in test
files.

* Adds a isPinned helper method to pinnableElement

* Add a logged in requirement so that the pinned feature is disabled for
anon users.

Bug: T322051
Change-Id: Ib86282216882fa94e37b7088a3f4bd0c1bcf6cd4
2022-12-08 14:44:07 -07:00