Add vector-toc-not-collapsed class serverside
Visual changes: * No reflow on startup Bug: T316964 Change-Id: I17f2699fec113d92b3f0f223c357654f52eb7eb3
This commit is contained in:
parent
bcfc94090b
commit
fc9fe5e719
|
@ -707,6 +707,9 @@ class Hooks implements
|
|||
$bodyAttrs['class'] .= ' skin-vector-disable-max-width';
|
||||
}
|
||||
|
||||
// TOC is not collapsed by default
|
||||
$bodyAttrs['class'] .= ' vector-toc-not-collapsed';
|
||||
|
||||
$featureManager = VectorServices::getFeatureManager();
|
||||
$bodyAttrs['class'] .= ' ' . implode( ' ', $featureManager->getFeatureBodyClass() );
|
||||
$bodyAttrs['class'] = trim( $bodyAttrs['class'] );
|
||||
|
|
|
@ -334,6 +334,7 @@ module.exports = function tableOfContents( props ) {
|
|||
*/
|
||||
function bindCollapseToggleListeners() {
|
||||
// Initialize toc collapsed status
|
||||
// FIXME: Remove after I17f2699fec113d92b3f0f223c357654f52eb7eb3 has been in prod for a week
|
||||
document.body.classList.add( TOC_NOT_COLLAPSED_CLASS );
|
||||
|
||||
const showHideTocElement = document.querySelectorAll( '#sidebar-toc-label button' );
|
||||
|
|
Loading…
Reference in New Issue