Background
The web team is working on migrating MobileFrontend to Parsoid. While working on this we were unable to find a reliable way to detect whether Parsoid was enable. This logic seems to exist in ParserMigration extension but doesn't seem to be formalized in an API. We tried using ParserOptions::getUseParsoid() but we get different results relating to race conditions relating to order dependencies so need something more reliable.
Currently, we are using a placeholder config flag (MFUseParsoid) to condition whether to turn on section collapsing for mobile when using parsoid. Now that we have the ParserMigration.Oracle service, this is no longer necessary as we can query whether parsoid will be used or not
User story
As a developer in the ArticleParserOptions hook I need to be able to call a function that returns a boolean to tell me whether Parsoid read views is enabled or not.
public function onArticleParserOptions( Article $article, ParserOptions $parserOptions )
Requirements
- It should be possible to do this check in the hook in cases where the hook runs before the equivalent hook in ParserMigration.
- If the parameters under which the parser is loaded change, callers (e.g. MobileFrontend) should not need to change anything.
Acceptance criteria (Mobilefrontend)
- Remove $wgMFUseParsoid in favor of the new Oracle service
This task was created by Version 1.0.0 of the [[ mediawiki.org/w/index.php?title=Reading/Web/Request_process | Web team task template ]]