diff --git a/includes/Components/VectorComponentTableOfContents.php b/includes/Components/VectorComponentTableOfContents.php
index 52b733458..94dbe1eff 100644
--- a/includes/Components/VectorComponentTableOfContents.php
+++ b/includes/Components/VectorComponentTableOfContents.php
@@ -85,9 +85,6 @@ class VectorComponentTableOfContents implements VectorComponent {
return $pinnableElement->getTemplateData() +
array_merge( $this->tocData, [
- 'is-vector-toc-beginning-enabled' => $this->config->get(
- 'VectorTableOfContentsBeginning'
- ),
'vector-is-collapse-sections-enabled' =>
count( $this->tocData['array-sections'] ) > 3 &&
$this->tocData[ 'number-section-count'] >= $this->config->get(
diff --git a/includes/templates/TableOfContents__list.mustache b/includes/templates/TableOfContents__list.mustache
index 6017bbd5c..d8234001d 100644
--- a/includes/templates/TableOfContents__list.mustache
+++ b/includes/templates/TableOfContents__list.mustache
@@ -1,12 +1,10 @@
- {{#is-vector-toc-beginning-enabled}}
-
{{ msg-vector-toc-beginning }}
- {{/is-vector-toc-beginning-enabled}}
{{#array-sections}}
{{>TableOfContents__line}}
{{/array-sections}}
diff --git a/resources/skins.vector.js/tableOfContents.js b/resources/skins.vector.js/tableOfContents.js
index 5dfe8af62..9480542fc 100644
--- a/resources/skins.vector.js/tableOfContents.js
+++ b/resources/skins.vector.js/tableOfContents.js
@@ -81,7 +81,6 @@ const TOC_CONTENTS_ID = 'mw-panel-toc-list';
/**
* @typedef {Object} SectionsListData
- * @property {boolean} is-vector-toc-beginning-enabled
* @property {Section[]} array-sections
* @property {boolean} vector-is-collapse-sections-enabled
* @property {string} msg-vector-toc-beginning
@@ -570,8 +569,7 @@ module.exports = function tableOfContents( props ) {
return {
'msg-vector-toc-beginning': mw.message( 'vector-toc-beginning' ).text(),
'array-sections': tableOfContentsLevel1Sections,
- 'vector-is-collapse-sections-enabled': tableOfContentsLevel1Sections.length > 3 && sections.length >= tableOfContentsConfig.VectorTableOfContentsCollapseAtCount,
- 'is-vector-toc-beginning-enabled': tableOfContentsConfig.VectorTableOfContentsBeginning
+ 'vector-is-collapse-sections-enabled': tableOfContentsLevel1Sections.length > 3 && sections.length >= tableOfContentsConfig.VectorTableOfContentsCollapseAtCount
};
}
diff --git a/resources/skins.vector.js/tableOfContentsConfig.json b/resources/skins.vector.js/tableOfContentsConfig.json
index 93e6fc11d..aaec7b294 100644
--- a/resources/skins.vector.js/tableOfContentsConfig.json
+++ b/resources/skins.vector.js/tableOfContentsConfig.json
@@ -1,5 +1,4 @@
{
"@doc": "This is a virtual JSON generated by ResourceLoader. This file is used by Jest.",
- "VectorTableOfContentsCollapseAtCount": 20,
- "VectorTableOfContentsBeginning": true
+ "VectorTableOfContentsCollapseAtCount": 20
}
diff --git a/skin.json b/skin.json
index 081eef794..7ea6ea8b7 100644
--- a/skin.json
+++ b/skin.json
@@ -379,8 +379,7 @@
{
"name": "resources/skins.vector.js/tableOfContentsConfig.json",
"config": [
- "VectorTableOfContentsCollapseAtCount",
- "VectorTableOfContentsBeginning"
+ "VectorTableOfContentsCollapseAtCount"
]
},
{
@@ -597,10 +596,6 @@
"value": true,
"description": "@var boolean Temporary feature flag that promotes the 'Add topic' link in the views menu, to a button in the page title bar."
},
- "VectorTableOfContentsBeginning": {
- "value": true,
- "description": "@var boolean Temporary feature flag that controls link to beginning of article."
- },
"VectorTableOfContentsCollapseAtCount": {
"value": 28,
"description": "@var The minimum number of headings required to collapse all headings in the sticky table of contents by default."
diff --git a/tests/jest/tableOfContents.test.js b/tests/jest/tableOfContents.test.js
index 99d6f6b6a..57be67a6c 100644
--- a/tests/jest/tableOfContents.test.js
+++ b/tests/jest/tableOfContents.test.js
@@ -70,7 +70,6 @@ const SECTIONS = [
*/
function render( templateProps = {} ) {
const templateData = Object.assign( {
- 'is-vector-toc-beginning-enabled': true,
'msg-vector-toc-beginning': 'Beginning',
'vector-is-collapse-sections-enabled': false,
'array-sections': SECTIONS,
diff --git a/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php b/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php
index 3897206a3..e958b3621 100644
--- a/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php
+++ b/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php
@@ -36,7 +36,6 @@ class VectorComponentTableOfContentsTest extends \MediaWikiUnitTestCase {
public function provideGetTocData() {
$config = [
- 'VectorTableOfContentsBeginning' => true,
'VectorTableOfContentsCollapseAtCount' => 1
];
$tocData = [
@@ -107,7 +106,6 @@ class VectorComponentTableOfContentsTest extends \MediaWikiUnitTestCase {
];
$expectedConfigData = [
- 'is-vector-toc-beginning-enabled' => $config[ 'VectorTableOfContentsBeginning' ],
'vector-is-collapse-sections-enabled' =>
count( $tocData['array-sections'] ) > 3 &&
$tocData[ 'number-section-count' ] >= $config[ 'VectorTableOfContentsCollapseAtCount' ],
@@ -155,15 +153,6 @@ class VectorComponentTableOfContentsTest extends \MediaWikiUnitTestCase {
// 'vector-is-collapse-sections-enabled' value is true
array_merge( $tocData, $expectedConfigData )
],
- // When "Beginning" TOC section is configured to be turned off
- [
- $tocData,
- array_merge( $config, [ 'VectorTableOfContentsBeginning' => false ] ),
- // 'is-vector-toc-beginning-enabled' value is false
- array_merge( $tocData, $expectedConfigData, [
- 'is-vector-toc-beginning-enabled' => false
- ] )
- ],
// When TOC has sections with top level parent sections
[
$nestedTocData,