Commit graph

3817 commits

Author SHA1 Message Date
Translation updater bot cc80499c25 Localisation updates from https://translatewiki.net.
Change-Id: I03b3b9c352e66750aefb50cc12e2372b2f95df66
2022-12-06 08:57:18 +01:00
jenkins-bot 07197849b7 Merge "Remove PinnableHeader class" 2022-12-06 00:05:28 +00:00
bwang e1d1de809f Use JS to move the ToC into page title to fix a11y issues and simplify styles
- The collapsible ToC absolute positioning solution has been preserved to be used on no-js mobile resolutions
- The collapsible ToC grid based positioning solution has been removed
- ToC styles have been refactored and organzied

This patch involves HTML changes. In order to avoid additional complexity, this patch disables the collapsible ToC feature for users above the mobile viewport with cached HTML. The ToC continues to be automatically collapsed on mobile viewports for cached HTML users.

This patch results in 9 expected visual changes. In order to see them you need to take the following steps:
1. Run `./pixel.js reference`
2. Checkout the following PR in pixel https://github.com/wikimedia/pixel/pull/149
3. Run ./pixel.js test -c 859143
It should look like this: https://jmp.sh/ZVQqDZw7

Bug: T318013
Change-Id: Iea0d73005b91589c58ae38a3a640fa90c18a860d
2022-12-05 17:24:55 -06:00
Jon Robson 839d3d4756 Remove PinnableHeader class
Currently unused in template.
When used as a subcomponent, adds unnecessary classes
due to how Mustache cascades template properties.

Change-Id: I907e2e7af67e021461f9f831850db4b39b818586
2022-12-05 15:09:59 -08:00
jenkins-bot 8a2a9202dc Merge "VISUAL CHANGE: Fix extra padding around icon buttons < tablet viewports" 2022-12-05 22:01:43 +00:00
jenkins-bot aa6963c7e7 Merge "Prepare data for Page Tools menu" 2022-12-05 21:52:35 +00:00
Moh'd Khier Abualruz 568cdf3d6d Prepare data for Page Tools menu
- Creates a new skin component called PageTools which
  is responsible for populating the new Page Tools menu.
- Removes the toolbox menu from the sidebar and places
  it in the Page Tools menu.

Bug: T318434
Change-Id: I9d552afab834193a4905d729eadecf71dda52cd2
2022-12-05 13:12:53 -08:00
bwang 29900128a4 VISUAL CHANGE: Fix extra padding around icon buttons < tablet viewports
Fixes https://jmp.sh/qBcSfEA2

Bug: T323172
Change-Id: I3bf44cd12248dc2633a6f46c164d53de34e819e5
2022-12-05 14:26:58 -06:00
jenkins-bot 73ad27babf Merge "[Refactor] Rename Portal component to MainMenuGroup" 2022-12-05 19:56:59 +00:00
jenkins-bot fe561df654 Merge "Fix casing of class and function name usages" 2022-12-05 08:24:08 +00:00
Translation updater bot 3f22dfa52f Localisation updates from https://translatewiki.net.
Change-Id: I55c88c57acdc1d1796fdffd0d00d06dbbebbf882
2022-12-05 08:36:54 +01:00
Reedy 693bbfb182 Fix casing of class and function name usages
Bug: T253628
Change-Id: Ic737ea97cd11a7f76ab70845e7703852ed592220
2022-12-04 19:14:54 +00:00
jenkins-bot 47d793f370 Merge "Page tools: Hide dropdown when not pinned" 2022-12-02 21:12:10 +00:00
Lucas Werkmeister e718f53d97 search: Adapt to Wikibase instead of hard-coding wikidatawiki
Since Wikibase change I01afb269d6 (commit ee4c555878), Wikibase has a
copy of the “is wikidatawiki” condition to temporarily continue
supporting the old search on Vector 2022. As suggested by Michael there,
we can change the condition here to avoid having the same check in two
places, and instead detect whether Wikibase loaded the legacy search
ResourceLoader module (which means we shouldn’t install the new search)
or not (in which case Wikibase Repo is either not installed at all, or
it’s providing a custom wgVectorSearchClient to support the new search).

With this change in place, once Wikibase is ready to support the new
search everywhere (including on Wikidata proper), we only need to change
the condition in one place (in Wikibase), and can then clean up the code
here at any later time.

Bug: T316093
Change-Id: I0aa0e432181b14cdb7b92e2550b78f2d7d48094d
2022-12-02 17:13:18 +01:00
jenkins-bot 94f61a08e8 Merge "Legacy: Group template/styles together to avoid confusion" 2022-12-02 16:03:01 +00:00
Translation updater bot 6fc0057331 Localisation updates from https://translatewiki.net.
Change-Id: Ia9dd301c9243f016f11f5ea3f3bb242902ce55fd
2022-12-02 09:12:31 +01:00
Nicholas Ray 7e0dd79d5a Convert LimitedWidthRequirement to UserPreferenceRequirement
Generalize LimitedWidthRequirement into a more reusable
UserPreferenceRequirement that can be used by both the limited width feature and
the persistent pinning feature (and possibly others in the future).

* Removes existing logic that checks whether the option is not null. Given that
skin.json sets the default [1], presumably this isn't needed.

* Adds unit test

[1] 65af26a258/skin.json (L163)

Bug: T322051
Change-Id: I7f228cf81a65b2eb22dbe94d2384b6c9f6da91f2
2022-12-01 16:31:47 -07:00
Jon Robson 769818514d [Refactor] Rename Portal component to MainMenuGroup
The Portal component is only ever used inside the MainMenu component

Change-Id: I3a3c58b11416f28c58f02a8bdfdacfbb7df6de9b
2022-12-01 14:45:52 -08:00
Jon Robson 595f520e44 Legacy: Group template/styles together to avoid confusion
This was confusing me while working on the Portal.mustache file.

Bug: T317899
Change-Id: I884cd33938b2670bddc90f698d8f61f37c6c29d4
2022-12-01 22:31:12 +00:00
Jon Robson ded2784f0c Page tools: Hide dropdown when not pinned
Follow up to I85aec387f87126a17e760fd9fd10e10572ff3152

Bug: T318013
Change-Id: I095ecf0333c7181d0a2d81902faed309b1d56da6
2022-12-01 22:30:19 +00:00
jenkins-bot 27bb20e37d Merge "Page tools: Move styles from PinnableElement to PageTools" 2022-12-01 22:06:34 +00:00
jenkins-bot 65af26a258 Merge "Restore z-index of mw-notification-area" 2022-12-01 19:29:24 +00:00
Jon Robson dca02fee92 Page tools: Move styles from PinnableElement to PageTools
These styles are not going to be needed in the main menu so are
not generic. Moving to the PageTools component.

Bug: T317899
Change-Id: I17b8ecd645c593c0368ea158265dbf8f6a575345
2022-12-01 18:47:38 +00:00
Translation updater bot 729b6568e0 Localisation updates from https://translatewiki.net.
Change-Id: I79f177037f608fed60622cc6f84b0b63771633e1
2022-12-01 08:19:11 +01:00
Ed Sanders a44782d763 Restore z-index of mw-notification-area
Notifications have a deliberately high z-index in core (10,000) by
design. They are supposed to appear on top of every popup, including
modal windows (e.g. OOUI modals z-index of 101).

Notifications are ephemeral and dismissable with a single click
so the fact that they temporarily block a small part of the UI
is not usually an issue, although their placement tries to
reduce the likelyhood of this.

Bug: T312783
Bug: T312778
Change-Id: I2f426ec71995bf810355b071cb966a4dd922dc64
2022-12-01 01:09:11 +00:00
Jon Robson 86c64edb9c Bug: Fix when Vector 2022 sidebar collapses
Vector 2022 sidebar is automatically collapsed on
exactly 1000px breakpoint. Should do that at 999px.

Bug: T321745
Change-Id: I052e99ccfda10786fabf54ea6cf089aeb3ce4e75
2022-12-01 01:05:37 +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
Jon Robson 7c3735121c Undo PageTools template confusion
The PageTools template is currently only being used when page
tools is disabled which is super confusing. Rectify that immediately.

Follow up to I220d0a477b3f05b278bd2cec7dd601c7b3b17c6f

Change-Id: I4a984b959b764386133934c81e625dfde19d023b
2022-11-30 14:14:27 -08:00
Translation updater bot bc27606d5b Localisation updates from https://translatewiki.net.
Change-Id: I85a82644dc0f5e3ff49d0d62e595f689c68aca8b
2022-11-30 08:54:39 +01:00
Jon Robson e7b4edf7a6 [Refactor] Rethink Dropdown component
The Dropdown component should be considered the dropdown folder going
forward. This should be distinguished as a different component that
composes the Dropdown component

Since the template itself is rather simple it seems preferable to have
duplicate templates that describe the actual component (PageTools,
VariantsDropdown and LanguageButton)

MenuDropdown is renamed Dropdown and styles that don't correspond to the
Dropdown component are moved to the relevant components.

MenuContents mustache template (future component) is added to DRY up
several of the new templates.

Bug: T320927
Change-Id: I220d0a477b3f05b278bd2cec7dd601c7b3b17c6f
2022-11-29 17:33:03 -08: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 847f3baba7 Merge "Instrument toggle button" 2022-11-29 16:18:56 +00:00
jenkins-bot 642eac19be Merge "VectorComponentMainMenuAction: Have class to distinguish between different actions" 2022-11-29 16:01:16 +00:00
Translation updater bot 4491b3bd3d Localisation updates from https://translatewiki.net.
Change-Id: I2e7b4c954fd6a9b733beeeb10dd220c54487fdd6
2022-11-29 09:00:47 +01:00
jenkins-bot 847a70a20a Merge "search: Don’t pass searchApiUrl into fetchByTitle()" 2022-11-28 20:56:25 +00:00
Jon Robson 9c36435220 VectorComponentMainMenuAction: Have class to distinguish between different actions
It should be possible to style the language alert without impacting the opt in
action.

Bug: T317899
Change-Id: Ifea7d476099ab3a09da20522380664b9ad5eceb3
2022-11-28 20:15:16 +00:00
Translation updater bot c593cecd1c Localisation updates from https://translatewiki.net.
Change-Id: I3cad40dd88e746ddf9bc899fbde4ca8c61d4b4ba
2022-11-28 08:52:39 +01:00
Lucas Werkmeister 090500276d search: Don’t pass searchApiUrl into fetchByTitle()
Not all implementations will need this (e.g. the Wikibase search is
based on the Action API, not the REST API), so simplify App and move
this bit of complexity into the default search client instead.

As far as I can tell from MediaWiki code search [1] and Global Search
[2], nothing apart from Wikibase uses wgVectorSearchClient yet, so we
should be able to make this breaking change now.

[1]: https://codesearch.wmcloud.org/search/?q=wgVectorSearchClient
[2]: https://global-search.toolforge.org/?q=wgVectorSearchClient&namespaces=2%2C4%2C8&title=%28Gadgets-definition%7C.*%5C.js%29

Change-Id: I0d52e407c12b3fbf80cd36ed66c67da4cba9acbd
2022-11-25 15:00:16 +01:00
Translation updater bot 135f0c246e Localisation updates from https://translatewiki.net.
Change-Id: If198cd3d4b8f4027bcbb213e0aa9e2ec06b1209c
2022-11-25 08:28:53 +01:00
Translation updater bot 54e70084d1 Localisation updates from https://translatewiki.net.
Change-Id: Ie40c765feada49444f80b3c556a45d5a743fa1ce
2022-11-24 08:20:21 +01: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
jenkins-bot 6612e4990f Merge "Ensure more menu shows on lower resolutions" 2022-11-23 21:31:28 +00:00
bwang 78b20092c4 Ensure more menu shows on lower resolutions
Bug: T323730
Change-Id: I874e93fed7287dd6276b8a47ba1ea15624b75d84
2022-11-23 20:58:23 +00:00
Translation updater bot f4a56a4b30 Localisation updates from https://translatewiki.net.
Change-Id: I568794c880255afdbe69027012a8ca53fa98aaad
2022-11-23 08:35:32 +01:00
jenkins-bot 9be75feb0d Merge "Prepare styles for Page Tools menu" 2022-11-22 18:26:09 +00:00
Jan Drewniak 69f3dcd7a7 Prepare styles for Page Tools menu
Makes the dropdown styles compatible with the pinned state of the
menu so that both states can share the same styles.

- New vector-menu-heading mixin shared between main menu headings
  and dropdown headings.
- New @font-size-dropdown variable so font-size is consistent in
  dropdown and pinned state.
- Ensure hidden 'more' menu works in both pinned and dropdown state.
- Removes extra <ul><li> from PinnableDropdownContents.mustache, as the
  child Menu template already contain <ul><li> elements.

Bug: T318434
Change-Id: Ie1a56d8584c1dc3f20c6643ff4cfc740be4007fa
2022-11-22 12:57:29 -05:00
Translation updater bot 38014d4342 Localisation updates from https://translatewiki.net.
Change-Id: I9f99f86823d3c22323a24910a923096aa6edad2a
2022-11-22 08:36:25 +01:00
Jon Robson 836a58d120 Instrument toggle button
Bug: T322772
Change-Id: I3b03225beff7638d243312c843f132225b55d76c
2022-11-21 22:02:13 +00:00
Jon Robson 7c24aa46fb Drop the VisualEnhancementsNext feature flag
Bug: T320101
Change-Id: I6d536af034dafd66c6478183de8029be9ed3e8b7
2022-11-21 13:27:34 -08:00