Page MenuHomePhabricator

Remove Table of Contents feature flag
Closed, ResolvedPublic3 Estimated Story Points

Description

Having the old table of contents code around is adding unnecessary complications for our layout changes regarding CSS grid and the article toolbar. We should remove that code. Note it will still be able to run an A/B test for table of contents feature once this code has disappeared.

Background

Sign off step for T309683

Original task that built feature flag T297610

Before beginning this ticket

  • Ensure data is analyzed and no additional A/B testing will be required

Acceptance criteria

  • Feature flag for table of contents is removed
  • Configuration for TOC feature flag is removed
  • Preserve TOC A/B test code << tracked in T313435
  • Update Vector to not load the legacy table of contents styles via ResourceLoaderSkinModule (toc: false)

Event Timeline

ovasileva triaged this task as Medium priority.Jun 14 2022, 3:28 PM
ovasileva updated the task description. (Show Details)
ovasileva moved this task from Incoming to Current Fiscal Year on the Web-Team-Backlog board.

Change 810404 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/Vector@master] Remove Table of Contents feature flag

https://gerrit.wikimedia.org/r/810404

Change 810405 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[operations/mediawiki-config@master] Remove Table of Contents config

https://gerrit.wikimedia.org/r/810405

cjming removed cjming as the assignee of this task.Jul 1 2022, 9:06 PM
cjming moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

hi @ovasileva quick Q re: TOC experiments -- is there a plan to re-run the A/B test?

In this mornings meeting we checked with @ovasileva that when we run the A/b test next we will do this for logged in users only. As part of this change, we will remove the link hijack JavaScript code and switch the bucketing from page ID to user ID.

Per standup, moving this to code review (will break current A/B test - see T313435).

Change 810404 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove Table of Contents feature flag

https://gerrit.wikimedia.org/r/810404

This can skip QA. I ran Pixel and saw no visual regressions introduced by this change so it's purely technical.

Change 810405 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove Table of Contents config

https://gerrit.wikimedia.org/r/810405

Mentioned in SAL (#wikimedia-operations) [2022-07-25T20:05:59Z] <cjming@deploy1002> Synchronized wmf-config: Config: [[gerrit:810405|Remove Table of Contents config (T310527)]] (duration: 03m 13s)

This looks done to me, great work @cjming !

bwang removed bwang as the assignee of this task.
bwang subscribed.

@bwang pointed out to me that this was incomplete. There is still code in ServiceWiring

		// Feature: T297610: Table of Contents
		// ================================
		$featureManager->registerRequirement(
			new OverridableConfigRequirement(
				$services->getMainConfig(),
				$context->getUser(),
				$context->getRequest(),
				null,
				Constants::CONFIG_TABLE_OF_CONTENTS,
				Constants::REQUIREMENT_TABLE_OF_CONTENTS,
				Constants::QUERY_PARAM_TABLE_OF_CONTENTS,
				null
			)
		);

		$featureManager->registerFeature(
			Constants::FEATURE_TABLE_OF_CONTENTS,
			[
				Constants::REQUIREMENT_FULLY_INITIALISED,
				Constants::REQUIREMENT_TABLE_OF_CONTENTS
			]
		);

Change 836274 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Update name of body class to avoid confusion

https://gerrit.wikimedia.org/r/836274

Change 836274 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Update name of body class to avoid confusion

https://gerrit.wikimedia.org/r/836274

Jdlrobson claimed this task.