Commit graph

4164 commits

Author SHA1 Message Date
Jon Robson 26d5d44535 Extend new config flag to site styles
Bug: T301212
Change-Id: I50d898a541707063594dfbc16a6bbfaabab42162
2023-03-09 18:52:12 +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
Translation updater bot e61a867892 Localisation updates from https://translatewiki.net.
Change-Id: I247736bde6f575ee7f390fe37951d413b8b3d6dc
2023-03-09 09:09:10 +01:00
Nicholas Ray 17433b63fc Add hash fragment support to table of contents
Per T325086, the TOC should expand and activate the section that corresponds to
the window's hash fragment.

Additional changes:

* Moves logic  that runs on page load to determine the
intersection from section observer to main.js, since the hash fragment can
take precedence over the scroll position (e.g. when scrolled all the way to the
bottom).

* Make section observer's pause() cancel any pending intersection calculations
so that it doesn't interfere with other async logic.

* Moves onHeadingClick and onToggleClick logic to activate and expand a section
to tableOfContents.js to facilitate unit testing this behavior with clicks and
hash fragment changes.

Bug: T325086
Change-Id: I8a2cf0e6a96467fae97608450b321c181155e424
2023-03-09 00:33:37 -07:00
jenkins-bot 80c75fdafe Merge "Break words for long links" 2023-03-08 10:11:17 +00:00
Translation updater bot cf2256f488 Localisation updates from https://translatewiki.net.
Change-Id: I79dc2e92d4fec9d866ecfde0374871ae7dbf9a4c
2023-03-08 08:44:59 +01:00
Jon Robson abb2cc5a48 Break words for long links
Follow the solution we have on Minerva (mobile site)
and break long links in page.

Additional change:
Mostly whitespace updates. Use git diff -w to see.

Bug: T327334
Change-Id: I8d7e6a31b3a76375245da312e99f637766ffff8c
2023-03-08 01:37:03 +00:00
jenkins-bot 0e01a9cad0 Merge "styles: Update opacity values to align with Codex design system" 2023-03-08 00:26:32 +00:00
David Lynch d041a7334e Add logging to the add topic button when it's promoted to the header
Bug: T330191
Change-Id: If3ccbe82e85fdedcbb34b43f6d34c83caa08eae3
2023-03-07 16:03:23 -06:00
Volker E fdeb3187d9 styles: Update opacity values to align with Codex design system
Also replacing `opacity-base--disabled` with updated token key
`opacity-icon-base--disabled`.

Depends-On: I68a39002314b9c5a185ffa2856076922bfeab638
Change-Id: I0e28579c92df9880b98cfeb4d4b5c3b8b085965e
2023-03-07 13:42:46 -08:00
David Lynch a5820ff1e9 Change margin-top element from .mw-body-content to #mw-content-text
There's a lot of .mw-body-content out there that shouldn't have this
margin applied. Switch it to #mw-content-text so that it's only applied
to the actual article content.

Bug: T331458
Change-Id: Ia040f85ed484db21129c3673808bc2ad71962ec3
2023-03-07 14:36:26 -06:00
jenkins-bot c0aa8c2a87 Merge "Update scroll threshold to be the same as scroll padding top" 2023-03-07 18:44:27 +00:00
bwang c9389b7dab Update scroll threshold to be the same as scroll padding top
Bug: T317661
Bug: T314419
Change-Id: Ia2d14dca1e3e2069828b201d6d3a053e4df712fc
2023-03-07 18:28:23 +00:00
jenkins-bot a1b8ac9b4e Merge "Increase @scroll-padding-top to 75px" 2023-03-07 18:01:50 +00:00
jenkins-bot e216ebab41 Merge "Remove skinStyles for wikibase.client module" 2023-03-07 17:10:42 +00:00
Ed Sanders 091705df88 Switch order of "Add topic" and language dropdown
Bug: T267444
Change-Id: I09ed155b43665dd13c258e37870778a3c7ce446d
2023-03-07 16:02:36 +00:00
Translation updater bot e222f006b8 Localisation updates from https://translatewiki.net.
Change-Id: I298525a440324bed60e4a1d5da21e2b51b66a0c9
2023-03-07 08:58:38 +01:00
jenkins-bot 4f2537d3d8 Merge "Fix selector for add topic button" 2023-03-06 23:37:43 +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
jenkins-bot 6a52ec3b58 Merge "Make use of named MainConfigNames::… constants" 2023-03-06 22:57:10 +00:00
Ed Sanders 2f9cf813fe Fix selector for add topic button
Bug: T267444
Change-Id: Icd75f16c794f6f990a194fd57f99490934ded9de
2023-03-06 22:50:11 +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
Jan Drewniak 7e6606b5ef Increase @scroll-padding-top to 75px
Increasing scroll-padding-top on HTML element
to account for TOC button placement on mobile
resolutions.

Bug: T314419
Change-Id: I5c3efa0f20f052ec74e91a6287f561c9e0105f90
2023-03-06 18:28:55 +00:00
Translation updater bot 39617aeb3f Localisation updates from https://translatewiki.net.
Change-Id: Ic36fdb9c0aa750afd6cb3be1f01d9f6f40c26e55
2023-03-06 08:11:13 +00:00
Jon Robson 07c12c14fc Register sticky header dropdown as icon capable
Needed by the language team.

Bug: T327369
Change-Id: I9e9022d27a308974f27ea31008fea1adf7c46624
2023-03-03 17:09:41 +00:00
thiemowmde f9d9ddcbec Make use of named MainConfigNames::… constants
And while we are here:
* Split long lines.
* Use isRegistered from the more narrow UserIdentity interface.
* Sort conditions from (probably) least to most expensive.

Change-Id: Ia6e4018a22cfc2fb450bb53f6d63a4a106394b87
2023-03-03 10:45:53 +01:00
thiemowmde 98a83a42c2 Fix outdated ConfigRequirement class documentations
The methods have been renamed in I612af95. Updating the documentation
was forgotten.

I'm not sure how the @see tags are useful. The two methods are right
next to each other. I suggest to remove the outdated tags.

Bug: T244481
Change-Id: Ic8c1d8cc1a4f7ab221643ad1905e2145e56076aa
2023-03-03 10:43:36 +01:00
Translation updater bot 907f8f0965 Localisation updates from https://translatewiki.net.
Change-Id: Ic08ce3695204c3f99867f248488bd035ecea7fda
2023-03-03 08:53:36 +01:00
jenkins-bot e7671b3078 Merge "build: Drop forked PHPUnit version for test:size convenience method" 2023-03-02 11:48:17 +00:00
James D. Forrester f0d379f0b5 build: Drop forked PHPUnit version for test:size convenience method
This repo shouldn't have its own definition of what version of PHPUnit
the MediaWiki world is running.

This reverts Id3c6519eba22babd694cc5fdf3ca85bd44ba7df4.

Change-Id: Icceb33885037cbdb7baebca6e98b3e0ec8010640
2023-03-02 11:29:51 +00:00
Translation updater bot 365e561142 Localisation updates from https://translatewiki.net.
Change-Id: I6bdf497cbcabcebf63996e766fde9f3fadc77845
2023-03-02 08:46:19 +01:00
bwang a274c9bcde Add threshold to TOC section observer
- Also renames 'header' to 'stickyHeaderElement' to be more clear

Bug: T317661
Change-Id: Iad519036d4622ff28115abb7de544f69fe8eb597
2023-03-01 16:26:42 -06:00
jenkins-bot 5f6932c605 Merge "Increase scroll-padding-top for page sections" 2023-03-01 19:46:33 +00:00
jenkins-bot 16e9c8c40d Merge "Remove TableOfContents mustache template and mark layout rules" 2023-03-01 17:10:02 +00:00
Translation updater bot 9c59eff23b Localisation updates from https://translatewiki.net.
Change-Id: Ib7f9641ed5d3062633f61a0f21bc61898c3ac8cf
2023-03-01 08:26:54 +01: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
Jan Drewniak cfc454f615 Increase scroll-padding-top for page sections
This introduces a general scroll-padding-top value of 50px
for Vector 2022's HTML element.

This changes makes it so that when navigating sections via the
TOC, the section headings are 50px lower on the screen.

This change has been synced with the ToC active sections as well,
so that active sections become active at the same offset.

Bug: T314419
Change-Id: I99e5fe2047f5ad1e61ef51b6ba7e76a6cac36fc5
2023-02-28 14:48:31 -05:00
Translation updater bot bb4e46ec27 Localisation updates from https://translatewiki.net.
Change-Id: I4b5f41d00487684f271c6f164fef1448c0d189c3
2023-02-28 08:31:07 +01:00
jenkins-bot d821a64ef7 Merge "Only render TOC related HTML when TOC is available" 2023-02-28 00:45:26 +00:00
Jon Robson d4903b8e57 Remove TableOfContents mustache template and mark layout rules
Follow up to I3484a790ce8ebadf21054ac1d222d5632b2dc5a4

__Template__

The template is not particularly useful - it is only ever
used once in this context and features a static ID which means
it can never be reused. It is also tied to the #vector-toc-collapsed-checkbox
element. In current form it doesn't make sense to have this template.

Maybe in future, I could see an argument for a PinnableTableOfContents component
that wrapped the checkbox and nav element, and generalized the IDs but
currently there's no pressing need or value for that.

__Layouts__

The existing Pinned and Unpinned stylesheets are concerned with how the table
of contents is layed out holistically with regards to other components and
features enabled on the page. I think these should therefore be organized as such.
The way I reason with this, is these styles would be irrelevant in a component
library if the component was rendered in isolation.

Bug: T328719
Change-Id: I9ff0e0eeb35f215a8cae5950d08dc1277b662a71
2023-02-28 00:27:31 +00:00
jenkins-bot 605a63a998 Merge "Vector: Break long bare external links" 2023-02-27 23:25:05 +00:00
Derk-Jan Hartman e7a8d0f469 Vector: Break long bare external links
Break bare external links, which potentially would cause the
viewport or width restricted content to overflow.

Bug: T327334
Change-Id: Ia83e2cde7646670de0a1b09ba9457e1cfc47ce0f
2023-02-27 23:06:53 +00:00
bwang 392a2f0e97 Only render TOC related HTML when TOC is available
Bug: T328719
Change-Id: I3484a790ce8ebadf21054ac1d222d5632b2dc5a4
2023-02-27 16:31:03 -06:00
Translation updater bot 4a757662f1 Localisation updates from https://translatewiki.net.
Change-Id: I90a735402c4c5c7a97c27c8ba4589671454de8cb
2023-02-27 08:30:18 +01:00
jenkins-bot 53ea14904d Merge "2010: IP masked user icon should differ" 2023-02-26 23:58:50 +00:00
jenkins-bot 338b677d34 Merge "Targets no longer needed" 2023-02-26 02:45:33 +00:00
jenkins-bot 8881952603 Merge "Add feature flag to "promote add topic" feature" 2023-02-24 21:37:13 +00:00
jenkins-bot eaf0e2d57e Merge "Table of contents: FIXME cleanup" 2023-02-24 20:55:28 +00:00
Jon Robson 28e5d9acb1 2010: IP masked user icon should differ
Per figma mock [1] the icon should be different for IP
masked users. Icon and text should also be gray.

[1] https://www.figma.com/file/xECM2hD7vEemP91M9YAQBC/IP-Masking?node-id=11%3A4681&t=iaM6G4xvjrBvkjlh-0

Bug: T328725
Change-Id: Ia8a06c3fd0bffb70e0dd0c26bcabbf02ab176994
2023-02-24 09:04:25 -08:00
jenkins-bot 1f08464499 Merge "Promote "Add topic" button to PageTitlebar" 2023-02-24 14:05:33 +00:00