Commit graph

377 commits

Author SHA1 Message Date
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
Nicholas Ray 87959c8a59 Move limitedWidthToggle.js and features.js to skins.vector.es6 module
In preparation for 856718 where pinnableElement.js makes use of features.js,
move features.js and limitedWidthToggle.js out of the skins.vector.js module and
into the skins.vector.es6 module. This will make it easier to use by
pinnableElement.js without needing the es6 module to depend on the es5 module.

This does have the negative side-effect of causing the limited width feature to
not be supported by IE11 (and other non-ES6 browsers), however this tradeoff was
discussed with our product manager to be acceptable. Additionally, this
maintains the status quo as the toggle button does not currently show in IE11
(which may be a bug).

Bug: T322051
Change-Id: If0e8cb98deabe847c2cc71fddb90ca36d15e5f8f
2022-12-07 16:45:52 -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 d150131561 Generalize Pinnable functionality to not be limited to dropdowns, make Pinnable templates composable
This patch involves cached HTML changes
- Replace '-content-container' id with '-unpinned-container'
- Replace '-content' id with '-pinnable-element'
- Rename pinnableHeader.js to pinnableElement.js
- Replace PinnableDropdownContents.mustache with PinnableElement/Open.mustache and Close
- Add PinnedContainer/Open & Close and UnpinnedContainer/Open & Close
- Rename .vector-dropdown-content to .vector-pinnable-element
- Add new PinnableElement.less stylesheet

Bug: T318013
Change-Id: I85aec387f87126a17e760fd9fd10e10572ff3152
2022-11-30 17:17:20 -06:00
bwang cb64e8f7ba Use PinnableHeader in the TOC all the time
[Visual Changes in this patch]
This patch introduces changes to whitespace inside the Mustache template
which corresponds to an HTML change, resulting
33 minor changes in pixel, the spacing of the ToC label shifts by
1 pixel

- Remove page tools feature flag from TOC
- Remove usage of .vector-toc-collapsed and .vector-toc-not-collapsed
- Remove now unused `moveToc()`
- Update jest tests to use PinnableHeader

Bug: T318013
Change-Id: I82f23e69b0249c844af9e45fec342217a0755893
2022-11-30 01:09:43 +00:00
jenkins-bot 3381aa5c7e Merge "Add jQuery.UI styles to Vector 2022" 2022-11-23 23:29:28 +00:00
Ed Sanders 364b8a58f3 Add jQuery.UI styles to Vector 2022
Bug: T322000
Bug: T323673
Change-Id: I01621504c83cf2d0d961b829418dcf7340a9f31c
2022-11-23 23:12:51 +00:00
Jon Robson 7c24aa46fb Drop the VisualEnhancementsNext feature flag
Bug: T320101
Change-Id: I6d536af034dafd66c6478183de8029be9ed3e8b7
2022-11-21 13:27:34 -08:00
bwang 0f7411bdf2 Update TOC to use PinnableHeader
- Update 'collapsed' naming convention to 'pinned'
- Introduce VectorComponentPinnableHeader

Bug: T317897
Change-Id: I752eadc9bf54d58c799060a9eaefa0b125dd7952
2022-11-15 16:37:50 -06: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