Only apply sticky header offset to mw-sticky-header-element if the
header is actually sticky, currently at min-desktop-width of 1000px
Bug: T313187
Bug: T313619
Change-Id: I081c694b263a68498468b837cffa1cbea136d36f
Following-up I05b832a36e8, which has seen the right canvas of 12x12, but
an older, incorrect version of the icon not perfectly optimized for
the lo-dpi screens.
Bug: T261391
Change-Id: Ia0054372c4d3bd5bb7e4b24a8f412bcaf6bcd80b
Splits MenuDropdown styles into modern and legacy styles.
Leaves a common MenuDropdownCheckbox.less file (for lack
of a better name) for common styles related to the checkbox
behaviour and dropdown menu resets.
Adds a new file in common/mixins.less for a shared
dropdown mixin.
Bug: T312157
Change-Id: Ib60b25ea3121843ed5ed54820d6295a81289b332
The subject link does not have a consistent ID like the talk link,
so it needs to be computed from the canonical namespace name.
Something similar is done in VE.
Bug: T309424
Change-Id: Ie82ca61aef30204edd09793963b25464febb17fe
Test by adding .vector-toc-collapsed class to the body
We use grid only when supported for grade C browsers.
Visual changes:
* Slight changes to position of the button and title
(movement by a pixel or 2)
Bug: T311447
Change-Id: Ib16c7b5b35be66776d013833e29f24f3f5316d9b
Wrong watchstar icons were specified when splitting the watchstar
into modern and legacy Vector in 3c0559a7.
Change-Id: Ice369f5d81818b093014cf508c2d4336c66368ed
When the article exist only in one language, currently we do not show
language selector. This prevents showing the entry points to create article
in other languages by various means.
Show the language selector so that options like translate, interlanguage
links, language settings can be shown.
Bug: T275147
Bug: T290436
Depends-On: I42c5d44ec15e291d71723c9738ddb8f0d1cf0b09
Change-Id: I7fb68457c1203d824fe7433c9f272f300a483c44
Using indicator 12x12 canvas, following up Ibd15517f3adf, to cater to
lo-dpi screens.
We've already had that canvas in the original patch, but in the first
new patch left it behind.
Bug: T261391
Change-Id: I05b832a36e89f6d75ab4f620b8db60b6eb578f73
- Update related selectors, styles.
- Remove unneeded styles.
- Remove link hijack js.
- Simplify hook to only add experiment name to body.
Bug: T310527
Change-Id: I25527261d529a16e28f1b90f2f5af234d26fd40f
Consolidates the CSS responsible for styling chevrons into one
implementation. This removes the need for custom padding and
background positioning for the following components:
- "more" menu
- user menu
- watchstar
- language button
- languge button in sticky header
Instead of absolutely positioning the chevron on these components,
the parent label element is set to `display: inline-flex` so that
the chevron is vertically aligned and given enough space by default.
The watchstar, although not a chevron, is also given the
`display: inline-flex` treatment so that it can be aligned with
other elements in the toolbar.
This new implementation requires splitting the watchstar
component into legacy and modern due to a quirk in Firefox that
causes a bug with the watchstar in legacy Vector.
NOTE: This change causes visual changes due to the difference in
centering the chevrons via flexbox vs percentage positions.
Bug: T308344, T310838
Change-Id: Ie9e0fce1366cd25a5899fee49770de4a09424fe2
Hack has first been introduced in I7d4b075ac90 more than 4 years ago.
It has been introduced to tackle IE <=8.
Bug: T306486
Bug: T308344
Change-Id: Ie84a177f79d226be98298a42ebfdd447e33a1372
IE9 is out of basic supported browsers, so removing this fallback.
Also using “Flexbox” as standard term in comment.
Bug: T306486
Bug: T308344
Change-Id: I6fcb0c4b54fea3d05593ae294c05e046131c93d2
Unify on using standard OOUI 'linkExternal' icon, which is directly
replacing Vector's image without relying on ResourceLoader.
Please note that the icon features standard link color `#36c` which is
implemented in a later step. Due to the small icon size and the fact
that current external link icon is also not using the legacy color, this
seems acceptable to move forward with.
Also using relative `em` instead of `px` to support user text zoom
capabilities and introducing a `@size-indicator` variable to be replaced
by WikimediaUI Base variables later.
Alternative to I49de3bfff45.
Replacing images and image names to make quicker lookup with icon
collection possible future-facing.
Note that CSSJanus is flipping the `ltr` string in the background image
rule to `rtl`, therefore making sure that both icons are available.
Bug: T261391
Change-Id: Ibd15517f3adf06010807901e8fb3299e2046a473
This doesn't change any behavior, it just suppresses a compatibility
warning and ensures that future changes to this file won't introduce
code that relies on Vue 2 compatibility features.
Change-Id: Id15af7d5d5035f59dc8f402f00d8f7f0d73a77f7
Removing old PNG divider fallbacks, which were included for IE9, old
Firefox and Chrome browsers and are not mission critical even when not
rendered to unknown browsers.
Bug: T306486
Bug: T308344
Change-Id: I8a6622237a1cbb8116930a12e632329618d5c291
Fix for iOS Safari 13 & 14 (T309223):
- Replaces flex-box layout from the top-level #right-navigation
and #left-navigation tab elements with floats.
Then for vertical alignment, sets the child <li> elements and
<a> elements to inline block.
Opportunistic refactor (T308344):
- Moves the font-size rules to top-level #left/right-navigation,
but leaving them as-is for legacy Vector.
- Removes a (seemingly) unnecessary `display:none` rule from
Vector 2022, which previously applied to H3 labels in the
sidebar, which are no longer targeted by the styles in
MenuTabs.less.
- Removes an unnecessary selector and duplicated rules from
ArticleToolbar.less
This change fixes a flexbox issue on iOS Safari 13 & 14, but also
reduces the CSS bytesize of the skins.vector.styles module by
0.9kB (uncompressed), from 54.2kB in the previous commit to
53.3kB with this commit.
Expected visual changes:
* The tab underline now overlaps with the toolbar underline, and text
pushed down on certain tabs
* The variant tab is now equally spaced
* Right navigation tabs slightly shifted to the right
Unexpected visual changes:
* More menu shifts to the left [see note at top of commit, will be
fixed in a follow up]
NOTE: this introduces a visual regression in the mobile viewport in that
the more menu.
Given this viewport is still experimental, after talking to Jan
we agreed to address this in a follow-up.
NOTE: Update addresses the reason for revert 5599cf2 and compatibility
with CSS Grid layout by adding a clearfix (display:flow-root)
for #right-navigation and #left-navigation elements inside toolbar.
Bug: T309223
Bug: T308344
Bug: T312212
Change-Id: I1482a81d16c53e0ba1977b0d98ba8c8a21362a6c
Also de-coupling border and background vars as they are aimed to
be fully replaced by tokens in future.
Bug: T313243
Change-Id: I5b7e46b6d2a0cc6975cb3c760645eaf2d5d30de5
This reverts commit 0c5e6ed9fe.
Reason for revert: I was so focused on testing the current layout
I forgot to test the more important grid layout, which is being
deployed this week. The "from mediawiki" tagline is overlapping
with the tabs.
Change-Id: I3c53a8d243caf84e5c2766d730ced3d7da345026
NOTE: this introduces a visual regression in the mobile viewport in that
the more menu.
Given this viewport is still experimental, after talking to Jan
we agreed to address this in a follow-up.
Fix for iOS Safari 13 & 14 (T309223):
- Replaces flex-box layout from the top-level #right-navigation
and #left-navigation tab elements with floats.
Then for vertical alignment, sets the child <li> elements and
<a> elements to inline block.
Opportunistic refactor (T308344):
- Moves the font-size rules to top-level #left/right-navigation,
but leaving them as-is for legacy Vector.
- Removes a (seemingly) unnecessary `display:none` rule from
Vector 2022, which previously applied to H3 labels in the
sidebar, which are no longer targeted by the styles in
MenuTabs.less.
- Removes an unnecessary selector and duplicated rules from
ArticleToolbar.less
This change fixes a flexbox issue on iOS Safari 13 & 14, but also
reduces the CSS bytesize of the skins.vector.styles module by
0.9kB (uncompressed), from 54.2kB in the previous commit to
53.3kB with this commit.
Expected visual changes:
* The tab underline now overlaps with the toolbar underline, and text
pushed down on certain tabs
* The variant tab is now equally spaced
* Right navigation tabs slightly shifted to the right
Unexpected visual changes:
* More menu shifts to the left [see note at top of commit, will be
fixed in a follow up]
Bug: T309223
Bug: T308344
Bug: T312212
Change-Id: I77f3dd8e8ccfe3a1d9693746106d9783cc0d38b9
[Visual changes]
This should result in 9 visual regression failures relating to
increased height of search results and loading bar
[More details about change]
- Migrate search app from Vue 2 to Vue 3; update tests
accordingly
- Remove dependence on WVUI and use Codex instead, via the special
`@wikimedia/codex-search` package
- Update search app to use CdxTypeaheadSearch, which no longer
takes in props related to the search client or fetch start/end
instrumentation. Instead, directly use the restSearchClient
and call fetch start/end events in the search app.
- Handle hideDirection in the search app/API response formatting
code, not within the TypeaheadSearch component
- Handle showing/hiding the search button in the app
- Move the WVUI URL generator into Vector
- Update server-rendered search box styles to match design updates
included with CdxTypeaheadSearch
- Replace references to WVUI with references to Codex
- Update values of various LESS variables to match Codex, and update
searchBox styling to prevent jankiness when the searchBox is replaced
with the Codex TypeaheadSearch component
The VectorWvuiSearchOptions config variable has been maintained and
will be updated to a code-agnostic name in a future patch.
Bug: T300573
Bug: T302137
Bug: T303558
Bug: T309722
Bug: T310525
Co-Authored-By: Anne Tomasevich <atomasevich@wikimedia.org>
Change-Id: I59fa3a006d988b14ebd8020cbd58e8d7bedbfe01
- Update TOC bottom padding to match spec in T304166.
Before (30px): https://phabricator.wikimedia.org/F35312302
After (20px): https://phabricator.wikimedia.org/F35312299
- Rearrange/combine some selectors in TableOfContents.less
- Delete some unnecessary styles/selectors
- Rename variables in TableOfContents.less
Change-Id: Ifffc434dcab4256a0c3ae8faf43a342935b820ff
This patch also fixes a regression for non grid layout Vector on tablet viewports when the sidebar and collapsed TOC is open
https://jmp.sh/xZhkU6q
No pixel regressions
Change-Id: Ic371f9b7ddd017af835565834e26a65ad3c2afc8
Restore header margin between search and user links, as its
still needed for grid (Fixes F35282398)
Bug: T303484
Change-Id: Ie8cf4adcadff430ebfc675029635e6c22061b238
On tablet, where the table of contents is hidden, the
sidebar should take up the full screen when open.
Fixes Pixel regression
MediaWiki_Test_vector-2022_sidebar-open_0_html_1_tablet.png
Bug: T303484
Change-Id: Ie0aa9f661a652e137d691a1fa4b05e69f0c5f8ab
Since CSS grid uses row-gap we need to decrease
the margin we used in the legacy layout to keep these
the same
Bug: T303484
Change-Id: Ib28f0d5ee0afbb809591c99ef18cd3cbecf1f800
Pixel shows 15 regressions, these are expected changes that are
fixing issues on specific viewports that fixes the following:
[At exactly the tablet breakpoint]
* the more menu dropdown was being
shown at the same time as the other menu items, resulting in duplicates
(see https://phabricator.wikimedia.org/F35285379)
[At exactly the desktop breakpoint]
* The table of contents AND the
table of contents toggle button to the left of the title were showing
(see https://phabricator.wikimedia.org/F35285392)
* The sticky header was not showing
* The fly out table of contents was showing instead of the sidebar
table of contents on scroll
* The top of the sidebar is brought into alignment with the tabs
(see https://phabricator.wikimedia.org/F35285408)
Bug: T310536
Change-Id: I6e870a032c8ba4ec003d00ff3f91732aaa2f38b0
SkinVector and Hooks both had code to add classes and handle Vector specific template data. This patch simplifies the way we handle menu data to always use Hooks:updateMenuItem. This has an additional side effect of removing instances of mw-ui-icon-before.
Bug: T306628
Change-Id: I73514a0eada4d92705b70e7c2ebd91092fc12544
Content should always be aligned with the hamburger icon in the
new design between the tablet and desktop breakpoints.
Fixes: F35282438
Bug: T303484
Change-Id: I15215703d6392cd69ec57212d25c9a52149a6ac0
The 'mw-workspace-container' class is present on both
the footer and the sidebar. The CSS rule should only hide
the latter.
When there is no table of contents on the page, and the sidebar
is closed, the content
should always span the grid columns and the sidebar container
closed.
Bug: T293443
Change-Id: I852b9024fbd21339b7c78dbb4deba811ab17c7e7
Follow up to c5cfd4d
1) Partial paths are incorrect
These are not a problem with our current Mustache template
parser but could break with any changes in our PHP implementation
2) Add dedicated class to legacy menus
On the longer term this will allow us to further separate the
old and new CSS.
Change-Id: I056b033855c28f919a4af99784620503f10b9dcb
Briefly add it onto the originals when the click is being proxied so
that VE can pick up on it.
Bug: T309364
Change-Id: I871494b6e783018b1433f294e09b0d53dded6c3d
Reverts the border color of the page title introduced in
I5d807f09bfbbceaded756daa78dbb023efcc91dc
Bug: T310533
Change-Id: I877f91bcd4c0915cc495b5237a53bda6ad971497
Removes gradients from tabs (i.e. article toolbar) in new Vector, moving
the existing MenuTabs.less component into the skins.vector.styles.legacy module
and creating a new MenuTabs.less component for modern Vector.
Bug: T309398
Change-Id: I5d807f09bfbbceaded756daa78dbb023efcc91dc
It gracefully degrades to a single column
layout on grade C browsers, IE11, and Safari 9.
Bug: T303484
Change-Id: Iaa3c1bee146dc39b1259a1ce712a29c6b22305d1
This will also apply to the grid layout so this seems a more
appropriate place, given the class relates to search.
Bug: T303484
Change-Id: Ib5b57fd948ecb5eefbf1d66e0e71045aed6e3102
When the vector-sticky-header-enabled class is removed from the body
it means the feature is not enabled, it doesn't mean the sticky header
should be invisible.
Call the hide method instead, and move it out of the function given
its a side effect
Bug: T308343
Change-Id: I4ecd6524146f203af926847812e20275c9573cab
Having a clean slate to work from will help with the development of
introducing the grid
Bug: T303484
Change-Id: I8fb9a9d958e4e73e8bfbf4b797cee1353c915db5
Adds behaviour for conditionally adding the edit button
to the sticky-header based on A/B test bucketing.
This behaviour depends on having the `$wgVectorStickyHeaderEdit` config
set to true for logged-in users:
$wgVectorStickyHeaderEdit = [
"logged_in" => true,
"logged_out" => false
];
as well as an AB test configured with the following buckets:
$wgVectorWebABTestEnrollment = [
'name' => 'vector.sticky_header_edit',
'enabled' => true,
'buckets' => [
'unsampled' => [
'samplingRate' => 0
],
'stickyHeaderEditButtonControl' => [
'samplingRate' => 0
],
'stickyHeaderEditButtonTreatment' => [
'samplingRate' => 1
]
]
];
With that config, this change hides the sticky header for all users
except those in the stickyHeaderEditButtonTreatment bucket.
NOTE: This patch address the sticky header being visible on incorrect
namespaces when the AB test is enabled and the revert of
42b808738a.
Bug: T299959
Bug: T309370
Change-Id: I3effbb3e5f0bb1c8663255936458e3849511dfca
Moves the page's title above the article toolbar (i.e. tabs) based
on the VectorTitleAboveTabs config option. This feature remains
off by default, but can be accessed via the query parameter `vectortitleabovetabs`.
Removes the Navigation.mustache template since it's just a wrapper
for the sidebar + tabs elements, which, with this change, are placed
in different locations in the DOM and don't need a common parent element.
Bug: T303549
Change-Id: Id4816b753a1b2133c53c3b1d390b45631c704daf
This allows the editing form to be wide, but makes sure that the
preview seen will more closely match how the page will end up
after being saved.
Bug: T307725
Change-Id: Ib2085eece69fe08b7fca4aaeacef66b26cdd5f16
This reverts commit 42b808738a.
Reason for revert: The sticky header is now showing up in unexpected
places e.g. special pages.
Bug: T299959
Bug: T309370
Change-Id: Ie7f224d84440279ba28e031e13d05984c81a3ad4
Adds behaviour for conditionally adding the edit button
to the sticky-header based on A/B test bucketing.
This behaviour depends on having the `$wgVectorStickyHeaderEdit` config
set to true for logged-in users:
$wgVectorStickyHeaderEdit = [
"logged_in" => true,
"logged_out" => false
];
as well as an AB test configured with the following buckets:
$wgVectorWebABTestEnrollment = [
'name' => 'vector.sticky_header_edit',
'enabled' => true,
'buckets' => [
'unsampled' => [
'samplingRate' => 0
],
'stickyHeaderEditButtonControl' => [
'samplingRate' => 0
],
'stickyHeaderEditButtonTreatment' => [
'samplingRate' => 1
]
]
];
With that config, this change hides the sticky header for all users
except those in the stickyHeaderEditButtonTreatment bucket.
Bug: T299959
Change-Id: If252956bc530d8ce54eeda61f42a93ffa48255cb
The new accessibility rules default to on, so no need to list
it in skin.json but we need to remove the now duplicated style.
Depends-On: Ie1c6c1ba7263c232d874263fdae7427a5ec489f6
Change-Id: I92f622b92adb8735c38a4ebe56eaf5bfc4ae37bf
This reverts commit bf4d843d97.
Reason for revert: These variables were intended as local to layout.
Only layout stylesheet should have access to layout variables. The
risk of having this in the global variables file is that non-layout
rules can be added to components.
Change-Id: I91fd01ed5333555052c243e25d37cd30d6d9bef6
Replacing Less mixin calls of `.transform()`, deprecated
since MW 1.37, with CSS property.
Bug: T308360
Change-Id: Ic965193782a447d34eac4bd19816a7b753c36d44
This makes it accessible elsewhere (such as within WikiEditor; see
the dependent patch) without having to include
all of screen.less.
Bug: T307725
Change-Id: I3fda9886c27fe0b78cf5bd5647d7e497a3aaba0e
Replacing Less mixin calls of `.transition()`, deprecated
since MW 1.37, with CSS property, but constituent properties.
This has been an outcome of recent discussions around design tokens,
which will be simpler to define, more modular, and better scoped. See
T304443 for further information.
Also clarifying, aligning comments.
Bug: T308351
Change-Id: Iab9d04c9a9f31f3842d076ce8fd8bf6e3534fc89
The checkbox hack adds complexity to our layout rules as we must
describe elements based on their siblings. To make these long selectors
easier to reason with and reduce the risk of rebase conflicts as these
shift I'd like to make these variables.
Change-Id: Ie5ff163d0449778a7d343870187da7703d20b754
- Remove the 'vector-scrolled-below-table-of-contents' class, reducing the number of classes added with JS and simplifying the scrollObserver logic
- Move the 'vector-sticky-header-visible' class from the sticky header element to the body element. Hopefully, this is where other feature specific classes can go in the future
- This approach means the TOC will not need JS to update it's spacing when the sticky header is not enabled
Bug: T307345
Change-Id: I1084defc7025f5c946e22a36d373224fae6f8bd6
Creates two new templates:
- ContentHeader.mustache containing the site header and indicators or languages
- ContentSubheader.mustache containing site tagline and conditionally indicators
This changes DOM order.
- It adds the `<header class="mw-body-header">` to all pages,
including special pages & edit pages, not just pages with the language button.
- It moves the #siteSub element (tagline) outside of the
`<div id="bodyContent">` element.
- Adds a clearfix (or margin-collapse fix) to `.vector-body`.
This changes causes a minor difference (perhaps improvement) where on special pages,
the beginning of the content, starting with the `mw-specialpage-summary` element,
was positioned closer to the page title than on regular pages.
The clearfix ensures that the height between the page title and content is consistent across all pages.
Bug: T303549
Change-Id: I29ba337dbd6f9b0cf58c9a0ca517a9ba59cef414
Structural change to prepare for CSS grid usage.
ArticleToolbar component is defined and self contained with
all layout rules relating to toolbar
UI regression testing suite shows 6 failures due to pixel alignment
changes to tabs. When comparing to the current release, you should
see 34 failures before /and/ after this change.
Notable changes:
- #mw-head element is no longer present in modern Vector skin
to allow us to distinguish between cached HTML and modern HTML
Bug: T303484
Change-Id: Ia261ea53931217f32a21b33c2ab3d4ec64efa48a
Auto merge commit for the 'Adjust table of contents margins at 1000-1200 breakpoint' patch incorrectly deleted a line from Sidebar.less. I need that deletion in 789210, because it will be backported later today
https://phabricator.wikimedia.org/F35103224
Change-Id: I0404c02d71160ec4537e49fc77489a8a5027a183
This is a follow up to I34ace0aeb3e23d8f6a8c5a8680bb492f37e343ad
On Special:Userlogin a "more" menu appears that's visible but empty
that should not
Bug: T306229
Change-Id: I9384b3015de9991db41bde8ccc8f404ac533f198
Previously, we relied on setting pointer-events:none on all child
elements of ToC links.
This propagated the click event up to the link itself in Javascript
and allowed us check if an element with the class `.sidebar-toc-link`
was clicked.
Unfortunately as of Chromium 101 this approach causes the entire link
in the sidebar to be unclickable.
Instead, this patch checks if the ToC link or any of it's children
have been clicked (using the less efficient `Element.closest()` ).
Bug: T307271
Change-Id: I2264b7862f6e1ef50c5c722daee81acc39eea54e
* Use pt-tmpuserpage for the temp user name.
* Use the userAnonymous icon for the temp user personal tools menu.
* Suppress the logout menu item for temp users.
Depends-On: Ib14a352490fc42039106523118e8d021844e3dfb
Bug: T300263
Change-Id: I8ac5de82f76a9ec58b0fbef85546bc7fd5b793d2
Remove JavaScript that collapses tabs and replace with an easier
to maintain breakpoint based solution.
Tabs will now collapse below the tablet breakpoint
Note: In the case of mw.util.addPortletLink, to add items to the
`views` menu, these will not be collapsed into the more menu and
must now be explicitly added to both menus, ie. if the window is
resized these will hide and not appear in the more menu.
However, when mw.util.addPortletLink attempts to add to `views` menu
when there is not available space, we will redirect those links to
the more (`cactions`) dropdown menu.
Bug: T306229
Change-Id: I34ace0aeb3e23d8f6a8c5a8680bb492f37e343ad
When browser preference for reduced motion is enabled:
* Disables bolding of table of contents
* Disables sticky header transition
Bug: T254399
Change-Id: I8ef9e59b258fed977ce370da352b1924832d842b
When the AB test is enabled both the old and new TOC's are in the page's
html but only one is visible. The `.vector-toc-visible` class is also
present and will try to apply a left margin even if the page has been
bucketed into the control or unsampled group.
This patch takes the simplest approach to fix this problem with CSS only
especially given the transient nature of this code (will be removed when
AB test is finished):
* When the page bucketed in the control or unsampled group, prevent
.vector-toc-visible from applying a left-margin through the use of
`:not` selectors.
Additionally:
* Remove unnecessary `margin-left` rule that used to apply to the
mw-workspace-container. Due to the work done in
I2f95d5938674bb8263b6203c5f6a469762bf0cc2, the workspace container
will now always have a computed left margin of zero because it is the
same width as the page container.
Bug: T306366
Change-Id: Icd9572353bb5e29cfda91b095ceb8c2e652864e7
Per T305069#7832390, left edge of searchbox input should line up with
the left edge of the main content area.
Bug: T305069
Change-Id: I737c3cac09ae18c598164b232b6461f72451b3e3
Looks like the selector for `vector-search-box-show-thumbnail` needs to
be adjusted as it is on the same element as the `vector-search-box-vue`
class.
Change-Id: Ief1dadddc082add65ae4bf29c951f2ddefb15d5b
- If TOC A/B test is enabled, page is in treatment group, and
viewport is below tablet, force legacy TOC to render.
- If TOC A/B test is disabled and new TOC feature is enabled,
and viewport is below tablet, neither TOC should render.
Bug: T300975
Change-Id: Ib30c3473eb47d6ac60924f40ccd0e42d29625407
* Bucket and sample on server by using the
`WikimediaEvents.WebABTestArticleIdFactory` service from
WikimediaEvents (soft dependency)
* Add linkHijack.js so that users bucketed in one group have the
possibility of remaining in that group if they click a link to another
page.
Bug: T302046
Depends-On: Ie6627de98effb3d37a3bedda5023d08af319837f
Change-Id: Iff231a976c473217b0fa4da1aa9a8d1c2a1a19f2
Headings can also appear in templates inside divs and subtitles.
These do not
get rendered in the table of contents and should not be tracked.
This also excludes headings from the legacy table of contents which
may be in the article during the A/B test
See English Wikipedia examples [[Portal:Biography]] and [[Main page]]
Change-Id: I4ca8933a0e7736157f80e5e68077b153e5bfc81d
- Remove isStickyHeaderAllowed() from stickyHeader.js, move to main.js
- Rename variables in stickyHeader.js to be consistent
Bug: T301429
Change-Id: Ib445a19cbfab52a008b749ea63cef178d6288e6a
- Leverage scrollObserver to use for TOC scroll events.
- Add new hooks to target legacy TOC intersection.
- See corresponding changes (not strict dependency) in related
WME patch 773628 for capturing scroll events from Vector TOC:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/773628
- Dependency on https://github.com/wikimedia/typescript-types/pull/30
which updates mwHookInstance interface with fire property to prevent
TS error on fire method of mw.hook in scrollObserver.
Bug: T303297
Change-Id: I5c2dd5f3a25ffcb0ed03b76ae28e65eb18ad8d33
- Remove some @ts-ignore statements.
- Update invocation of mw.util.debounce to have correct order of
parameters.
Bug: T303297
Change-Id: I4bb795fbd4d026c21c66e9a3d161afff4d7ef09f