Commit graph

918 commits

Author SHA1 Message Date
jenkins-bot 5d666f43ab Merge "Make bottom dock expansible via portlet links" 2023-07-12 19:08:35 +00:00
Jon Robson fe03bb50ef Make bottom dock expansible via portlet links
New menu items can be added via
```
var node = mw.util.addPortletLink('p-dock-bottom', '#', 'hello' )
if (node) {
node.querySelector('a').classList.add( 'mw-ui-icon', 'mw-ui-icon-element', 'mw-ui-button' )
}
```

Bug: T336431
Change-Id: I8c5c5414cda9d268631ba0fade90e1a44c104ff1
2023-07-12 12:37:38 -05:00
Noa wmde 2c96f9b3d7 Allow overriding the search pattern highlighting for Wikibase
Use a php hook to override the highlightQuery attribute.
This allows us to turn off search higlighting for all
wikibase repo instances.

Bug: T327510
Change-Id: I0ef27da9cf4ac66151d1a391e9f606100097d7f0
2023-07-11 23:56:29 +00:00
bwang ecd221fe37 Add option for html label in Menu template
Bug: T340217
Change-Id: I64e4780102a743c5ace332a562b4f9d73ea10d16
2023-07-10 16:42:58 -07:00
bwang 2eb8fe89ea Remove unecessary whitespace and new lines from HTML
Change-Id: I8fe04d458da292e2990543afa232a91b6dd4db59
2023-07-06 14:07:29 -05:00
Moh'd Khier Abualruz 288b802d45 Vector 22 has some missing whitespace internal to HTML elements
Bug: T338691
Change-Id: Ic4657505ff92027d3c83373c7000e452f00ac07e
2023-07-04 19:05:36 +02:00
bwang 6a57506ae8 Separate vector-menu classes from Dropdowns
Bug: T319358
Change-Id: Idf05c1664c026f58487ba34af5ede8a11e695baf
2023-06-27 10:14:29 -05:00
Jon Robson 1e6b647971 Add new classes for dropdown component
Bug: T319358
Change-Id: Iab55dc190aa2ebc48eb9c8b34cf10baae8a89914
2023-06-26 15:31:01 -07:00
bwang 153c6f2668 Remove references to heading in dropdown PHP
Bug: T319358
Change-Id: I9830a4b4b55fdb205c479c09ef807de4f6d68713
2023-06-26 12:49:00 -05:00
Reedy e3c79c7524 VectorComponentUserLinks: Fix typo in comment
Change-Id: I2bf7dd04f856ffea993e029bdd4218e7a0eacf6d
2023-06-23 20:39:42 +00:00
jaydenb d1c0e6cd6f Hide language alert if there are none and JS is disabled
The languages alert is misleading when there are no languages and the user has JS disabled.

This change adds a class to the alert if there are 0 languages, and then adds "display: none" to the alert if the client-nojs class is present. This is the same approach being used for the language switcher button.

Bug: T326185
Change-Id: Iee292d661ed1f47700f588053712f5f547022b17
2023-06-16 17:30:34 +00:00
bwang b2705c55f1 Use Codex for typeahead search styles
- Update SearchBox.mustache markup to use codex styles
- Scope old SearchBox markup to LegacySearchBox.mustache
- Add handling for thumbnail and autoexpand search variants
- Adds a 'Search' button to SearchBox.mustache matching the initial non vue search box with the Codex design
- Refactor SearchBox CSS so styles are scoped better

Visual changes:
A "Search" button now appears on page load when it previously only appeared after loading in Vue

Bug: T337966
Change-Id: Ibcffe00292ab4f9f5f9919982d578793cf8594de
2023-06-12 16:26:33 -07:00
Jon Robson 68239ae344 Use Codex for button styles, start transitioning icons to use Codex icon mixins
Changes:
- mw-ui-button to cdx-button
- mw-ui-quiet to cdx-button--weight-quiet
- mw-ui-icon-element to cdx-button--icon-only
- mw-ui-icon to vector-icon
- mw-ui-icon-flush-right/left to vector-button-flush-right/left
- Removes $isSmallIcon param in Hooks.php

85 Visual Changes
- ~36 changes from minor pixel changes from the new button classes in the main menu, language button
- 22 from standardizing the padding of the TOC in page title
- ~10 changes from addition of .cdx-button to the TOC toggle buttons

PERFORMANCE:
This will result in an overall increase of 2.7kb of render blocking
CSS, 1kb will be reclaimed when
I6c1ed1523df8cc9e2f2ca09506f12a595b8b013d is merged.

Co-author: Bernard Wang <bwang@wikimedia.org>
Bug: T336526
Change-Id: Ibd558238a41a0d3edb981e441638f9564f43d226
2023-06-12 16:26:28 -07:00
Func be39b2eb6e SkinVector22: Avoid double-escaping on language selector label
text() should be used as above.

Bug: T327802
Change-Id: I4f809a49db39e2678849fa6c4adb8a31ac0619f1
2023-06-07 01:16:03 +08:00
Jon Robson 7c29c5ff03 Revert "Override mw.experiments.getBucket() via body classes"
This reverts commit b599da4153.

Change-Id: I977b352ee71faa25c3921205025ba326e05a0f9b
2023-05-25 21:38:48 +03:00
Jan Drewniak b599da4153 Override mw.experiments.getBucket() via body classes
When AB bucketing via ABRequirements.php in Vector,
the browser has no awareness of this bucketing and buckets users
once more via mw.experiments.getBucket() in AB.js.

mw.experiments uses a different algorithm than ABRequirements.php,
causing a mismatch between the server-side bucketing
and the client-side bucketing.

This patch overrides that client-side bucketing by
adding classes to the HTML element that are recognized
by AB.js

Bug: T335972
Change-Id: I0549a8dee23ebe7cd68465f8403e4f7aac76633e
2023-05-24 18:21:30 -04:00
ksarabia 9fbed3eb7f Remove centraluserid dependency in ABRequirement.php
Removes centraluserid and replaces it with local user id.

Bug: T336969
Change-Id: I5abedf62fb92cb08fbcaf09f6d19ab45fcfc9819
2023-05-23 15:03:59 +00:00
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
bwang 27e821a486 Consolidate watchstar icon updating logic under watchstar.js
Depends-on: Ib11177df52d46ecda2ace50ac78672ed3d5fd5c9
Bug: T336640
Bug: T336641
Change-Id: If2573409cd1af4580f89b33c32cd0441e7a80735
2023-05-16 13:18:47 -05:00
bwang 440843d84c Ensure mw-watchlink is used for the sticky header watchlink
Bug: T336640
Bug: T336641
Change-Id: I9b00a35feb4b100703e7f8126ccc8a2ef7234532
2023-05-16 12:34:56 -05:00
bwang 6f13caa775 Remove VectorTableOfContentsBeginning flag
Bug: T334969
Change-Id: I9e931b7cdc443e73a41c92f5368f81b35285437e
2023-05-08 22:25:03 +00:00
jenkins-bot c069ada615 Merge "Update user menu and watchstar buttons to be consistent with spec" 2023-05-04 18:34:04 +00:00
bwang d8bcb73647 Update user menu and watchstar buttons to be consistent with spec
Depends-on: Ibd762c810e1d89047e39ce3af792b43689bf11e3
Bug: T335909
Change-Id: I5b42780416b466cc3fc33d29220aef2979ac3239
2023-05-03 15:47:00 -07:00
Jon Robson dbf3931515 Query string override should support camel case as well as lowercase
- ?vectorzebradesign=1 and ?VectorZebraDesign=1 now enable a feature
- Drops the parameter from OverrideableConfigRequirement which was leading
to the inconsistency

Change-Id: I4e124b6de2e5a0e46804036c6ac3f97fd2af4d81
2023-05-03 16:56:42 +00:00
bwang b1688baeb5 Update no js collapsed TOC button consistent with spec
Bug: T334881
Change-Id: I208acad3071a07ba4d9ba44ae54fba5af011355c
2023-05-02 20:40:42 +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
bwang dd2284cf16 Update instances of Button.mustache to use to use VectorComponentButton
Bug: T334881
Change-Id: Iec3fc67c498d230ae7c0dc0ba4316006ccd9626a
2023-05-02 18:00:41 +00:00
bwang bed8e2523f Update VectorComponentButton to be able to handle all button designs/variants
Bug: T334881
Change-Id: Ib8735bc4f2fb7a7f6d5c230b9a3c847d8de423b8
2023-05-01 22:41:16 +00: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
bwang bae8b3d717 Consolidate sticky pinned element styles under .vector-sticky-pinned-container class
Bug: T335155
Change-Id: I988f3c7e70d602b4dbd5fd2cbd124b86b104caa7
2023-04-24 19:08:49 +00:00
Jan Drewniak 3cea6d4132 Scope styles related to zebra feature flag
This change scopes the styles related to the Zebra
update by wrapping the imports in a top-level feature
flag selector,
i.e

.vector-feature-zebra-design-enabled {
    @import "./screen.less"
}

To account for this extra selector, ampersands are
added wherever the html element is targeted in the
affected files. This applies to both zebra enabled
and disabled files.

getDefaultModules() is used in SkinVector22.php to
conditionally load the new skins.vector.zebra.styles
module when the feature is enabled.

Bug: T332600
Change-Id: I5e673df383ff31f296010f982e4188c82f095590
2023-04-19 23:09:08 -04:00
ksarabia f2dbf8508e Follow up service wiring update
This modifies the ABRequirement.php and ServiceWiring.php file.

Bug: T333493
Change-Id: I3e5cb7499b36cd5c894e8b5527f77a9cc94b5165
2023-04-19 23:04:53 +00:00
Jon Robson a76e198523 Remove A/B testing element from OverridableConfigRequirement
Superseded by ABRequirement. Having this code here is confusing
and might lead to non-standard A/B tests being defined.

Change-Id: Ifd9d2b7249250a73e7f6e4f9d6b51c322ef2759d
2023-04-19 01:41:53 +00: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 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 b3a59090e2 Merge "Remove vector-feature-page-tools-enabled class" 2023-04-06 15:12:33 +00:00
jenkins-bot 16dc80fdd1 Merge "Remove custom checkbox-hack implementations" 2023-04-05 22:52:40 +00:00
jenkins-bot 093527a92d Merge "Remove Vector2022PreviewPages configuration" 2023-04-04 22:44:13 +00:00
Jon Robson 146de6396e Remove vector-feature-page-tools-enabled class
Bug: T332090
Change-Id: I8d20cc4f5db3d2a612fecf03dce6eaa99e1ef2a7
2023-04-04 15:16:05 -07: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
bwang 628804871e Implement new zebra design for the header under the flag
Bug: T332449
Depends-On: Ia21c14f72631e607e0d626408557eacb83529a03
Change-Id: I9a7d6fac7c44be1983281a44766d34a16f515b40
2023-04-04 21:27:31 +00:00
Jan Drewniak 6e8a98ca8b Remove custom checkbox-hack implementations
Removes several styles that were used for
expanding/collapsing the table of contents at narrow
widths for non-js users as well as the main menu
for no-js users.

Existing `.vector-menu-checkbox` styles address this
use-case with the addition of a display:none rule for the
two affected checkboxes.

Related to the Page Tools clean-up since these styles
were once scoped to the .vector-page-tools-disabled
class.

Bug: T332090
Change-Id: I13efd4a87bacecb0e9f5a5e44d5e15861d632c62
2023-04-04 10:01:09 -04:00
Moh'd Khier Abualruz 098811f200 Adjust table of collapsing auto-collapse algorithm for articles with few top level sections
Bug: T333021
Change-Id: I9eef0fc0715f5f1917c205b7b7987b0ed76f31a2
2023-04-04 10:35:12 +02:00
jenkins-bot 206138f241 Merge "Remove custom sidebar config" 2023-03-31 23:28:01 +00: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
bwang 8d9b148cf7 Setup header and sticky header to be able to be full width
- Move the header and skip link out of .mw-page-container-inner and the grid
- Wrap the header and sticky header with a .vector-header-container element, allowing us to easily update header styles in the future
- Update sticky header to use a <div> to fix a11y error. Update searchToggle.js to use .vector-header-container rather than <header>

Bug: T332449
Bug: T330438
Change-Id: I038fc17cbb88a29dbe8d7841b824761a91d38405
2023-03-30 16:37:15 -05: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 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
Bartosz Dziewoński 6b3e88bb15 Fix order of language menu and add topic in sticky header
Note that on most pages, only one of them will appear.
This affects only discussion pages in non-talk namespaces.

Bug: T317719
Change-Id: Icda2ea20fc7e0c480882a4e35a6e56932076197e
2023-03-24 00:36:08 +00:00