Page MenuHomePhabricator

Add config option to switch DT to use parsoid by default on wikitech
Closed, ResolvedPublic

Description

Two options here:

  1. Add an onArticleParserOptions hook in DiscussionTools to set the useParsoid flag, or
  2. Add code to ParserMigration to allow turning it "on" by default for all users in a certain namespace (aka Talk)

We're leaning toward option (2) right now to keep the opt in/opt out logic in a single place. That would involve making a new "wgDTUsesParsoidByDefault" config option for ParserMigration and then turning this on for wikitech.

Event Timeline

cscott renamed this task from Switch DT to use parsoid by default on wikitech to Add config option to switch DT to use parsoid by default on wikitech.Jan 22 2024, 4:23 PM

Drawback to the full-namespace approach is that it won't perfectly align with DT's activation (check out HookUtils.php in DT, specifically the isAvailableForTitle method). So long as you don't mind this it's fine, I just want to make sure you're aware. 😁

It will be applied to more pages, not less: the only way to for non-talk namespaces to have visual enhancements is using __NEWSECTIONLINK__, but that’s virtually unused on Wikitech (used only on two random user pages; the other six are false positives).

Change 993203 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/ParserMigration@master] Allow defaulting users to using Parsoid for Discussion Tools by default

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

Change 993203 merged by jenkins-bot:

[mediawiki/extensions/ParserMigration@master] Allow defaulting users to using Parsoid for Discussion Tools by default

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

cscott claimed this task.