Removing these styles removes the icon from the
"add interlanguage links" link in the Tools or main menu.
Bug: T328069
Change-Id: I99084060951e6f26ade1f95e3cdd58e0fd6e28ec
Increasing scroll-padding-top on HTML element
to account for TOC button placement on mobile
resolutions.
Bug: T314419
Change-Id: I5c3efa0f20f052ec74e91a6287f561c9e0105f90
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
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
This repo shouldn't have its own definition of what version of PHPUnit
the MediaWiki world is running.
This reverts Id3c6519eba22babd694cc5fdf3ca85bd44ba7df4.
Change-Id: Icceb33885037cbdb7baebca6e98b3e0ec8010640
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
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
Break bare external links, which potentially would cause the
viewport or width restricted content to overflow.
Bug: T327334
Change-Id: Ia83e2cde7646670de0a1b09ba9457e1cfc47ce0f
Follow up to Ib42d532d4e900c01061e1c5e39c03b17f0619c46
Hoist hook binding into main.js and update tests
main.js now only tests hook wire up.
tableOfContents calls reloadTableOfContents directly.
Bug: T316025
Change-Id: Ia06feab7cfb47a64ac3519bd7bd0428dc661045a
* When wikipage.tableOfContents is executed, the table of contents has been
replaced so we should update the sections associated with the section
observer as the old sections no longer exist in theDOM.
* If VisualEditor repaints the page, we should update the elements associated
with the table of contents as the body-content element no longer exists in the page.
* When VisuaLEditor is active we should disable the intersection observer as
there is no table of contents to update.
Minor changes:
* Light refactor of large function in main.js
* reloadTableOfContents returns a promise and now fires a new hook
wikipage.tableOfContents.vector to signal when it is finished which
has also been requested by community members. This allows the code in main.js
to update elements at relevant point in time
* Add FIXME note (doing this would have been considerable work)
* I've added a call to mw.log.warn which would have saved me considerable
debugging time for this issue to diagnose the issue.
Bug: T316037
Bug: T316025
Change-Id: Ib42d532d4e900c01061e1c5e39c03b17f0619c46