Compare https://en.wikipedia.org/wiki/Henry_VIII_of_England?useskin=minerva with https://en.m.wikipedia.org/wiki/Henry_VIII_of_England on a desktop device.
In the latter link a table of contents shows:
However in doesn't show in the former link (it should)
Acceptance criteria
- The table of contents should be showing. Remove logic relating to wgMinervaTocEnabled
Developer notes
In Minerva, the table of contents is only rendered in JS if mw.config.get( 'wgMinervaTocEnabled' ) is true. The desktop table of contents is present in the document but hidden.
#toc { display:none; }It has logic to deal with cases where the #toc is already in the document and when it is not but wgMinervaTocEnabled is stopping it!:
var enableToc = mw.config.get( 'wgMinervaTocEnabled' );
if ( enableToc ) {
toc = new TableOfContents( {
sections: sections
} );
// eslint-disable-next-line no-new
new Toggler( toc.$el, 'toc-', null, true );
// if there is a toc already, replace it
if ( $toc.length > 0 ) {
// don't show toc at end of page, when no sections there
$toc.replaceWith( toc.$el );
} else {
// otherwise append it to the lead section
toc.appendTo( page.getLeadSectionElement() );
}
}I've reviewed the logic and the mw.config.get( 'wgMinervaTocEnabled' ) is not necessary anymore so remove all that logic.
Testing criteria
- Go to https://en.wikipedia.beta.wmflabs.org/wiki/African_wild_dog?useskin=minerva
- Ensure toc appears on the page
- Test on multiple browsers







