mediawiki-extensions-Discus.../includes
Subramanya Sastry a1c5130414 Add ParserOutputPostCacheTransformHook handler for Parsoid HTML
* This patch enables DT to work with Parsoid HTML without changing
  the functionality for legacy HTML.

* The code comments document some of the decisions being made here.
  Some of these decisions are temporary and need better solutions
  but this patch will let us run visual diff tests and expose any
  other latent bugs.

TODO
----
* We need to add new tests to verify CommentFormatter expectations
  for Parsoid HTML. I'll tackle this in a followup patch.

Known issues:
-------------
* Performance: Since the getText() transformed output in ParserOutput
  is not cached, if DiscussionTools is to switch over to Parsoid HTML,
  we have to add some form of caching of the transformed output because
  transformHtml can take a couple seconds in the p99 case which is too
  long to render uncached!

* Longer-term: Since this hook is called when getText() is
  called, all calls to getText() will now invoke this handler
  (which will return but still has to do a bunch of checks to
  determine this won't apply). Presumably, transformHtml() is
  idempotent because when some other code (other extensions, for ex)
  calls getText(), we will run the transfromHtml() on previously
  transformed content.

  My understanding is that getText() is going the way of the dodo
  and that getText() callers will have to explicit call the output
  transform pipeline code (and presumably this issue of repeatedly
  calling the same transforms on previously transformed content will
  be addressed there).

* Some CSS doesn't apply to Parsoid HTML because intervening <section>
  tags interfere with existing query selectors -- will be addressed
  separately.

Bug: T341010
Change-Id: I9846193656cdc658f5237df0a133d9d4dcc20d00
2023-11-09 18:37:56 +00:00
..
Actions Add null check for str_starts_with 2023-10-06 18:49:28 +02:00
Hooks Add ParserOutputPostCacheTransformHook handler for Parsoid HTML 2023-11-09 18:37:56 +00:00
Notifications Document generated messages 2023-11-02 16:29:54 +00:00
ThreadItem Use type hints for properties, remove PHPCS overrides 2023-10-19 19:31:02 +00:00
ApiDiscussionToolsCompare.php Replace some moved Title class uses, now MediaWiki\Title\Title 2023-08-19 04:14:36 +00:00
ApiDiscussionToolsEdit.php ApiDiscussionToolsEdit: Remove unnecessary checks 2023-11-03 16:55:06 +01:00
ApiDiscussionToolsFindComment.php Replace some moved Title class uses, now MediaWiki\Title\Title 2023-08-19 04:14:36 +00:00
ApiDiscussionToolsGetSubscriptions.php Remove 'internal' flag from ApiDiscussionToolsSubscribe/GetSubscriptions 2023-08-07 15:14:58 +01:00
ApiDiscussionToolsPageInfo.php Replace some moved Title class uses, now MediaWiki\Title\Title 2023-08-19 04:14:36 +00:00
ApiDiscussionToolsPreview.php Simplify preg_replace_callback in ApiDiscussionToolsPreview 2023-10-30 09:12:21 +01:00
ApiDiscussionToolsSubscribe.php Replace some moved Title class uses, now MediaWiki\Title\Title 2023-08-19 04:14:36 +00:00
ApiDiscussionToolsTrait.php Acquire a temporary user username before previewing 2023-08-22 23:42:32 +02:00
ButtonMenuSelectWidget.php
CommentFormatter.php Document generated messages 2023-11-02 16:29:54 +00:00
CommentModifier.php Always use the strict equality flag when using in_array 2023-06-06 13:08:00 +01:00
CommentParser.php Merge "Replace preg_replace_callback with strtr in CommentParser" 2023-10-31 13:35:19 +00:00
CommentUtils.php Optimize performance of very hot code paths in CommentUtils 2023-10-30 17:29:32 +01:00
ContentThreadItemSet.php Embed pageThread JSON in jsConfigVars instead of infusing HTML 2022-11-08 16:20:39 +00:00
DatabaseThreadItemSet.php Embed pageThread JSON in jsConfigVars instead of infusing HTML 2022-11-08 16:20:39 +00:00
ImmutableRange.php Rewrite ImmutableRange::findCommonAncestorContainer for speed 2023-11-02 13:57:23 +01:00
LanguageData.php Support ISO 8601 timestamps in the parser 2023-06-17 11:36:43 -07:00
NodeFilter.php Use type hints for properties, remove PHPCS overrides 2023-10-19 19:31:02 +00:00
OverflowMenuItem.php overflow menu: Add hooks for registering and interacting with items 2023-10-05 15:50:33 +01:00
ResourceLoaderData.php Use namespaced Title 2023-08-19 20:16:15 +02:00
ServiceWiring.php Replace uses of UserNameUtils::isTemp with UserIdentityUtils::isTemp 2023-07-26 11:32:27 +01:00
SpecialDiscussionToolsDebug.php SpecialPage::getDescription() should return a Message 2023-09-21 22:10:57 +02:00
SpecialFindComment.php Use type hints for properties, remove PHPCS overrides 2023-10-19 19:31:02 +00:00
SpecialGoToComment.php Use namespaced Title 2023-08-19 20:16:15 +02:00
SpecialTopicSubscriptions.php SpecialPage::getDescription() should return a Message 2023-09-21 22:10:57 +02:00
SubscriptionItem.php Use type hints for properties, remove PHPCS overrides 2023-10-19 19:31:02 +00:00
SubscriptionStore.php SubscriptionStore: Use InsertQueryBuilder for upsert 2023-10-21 23:12:17 +02:00
ThreadItemFormatter.php Remove some redundant PHPDoc comments 2022-11-29 18:47:18 +00:00
ThreadItemSet.php Embed pageThread JSON in jsConfigVars instead of infusing HTML 2022-11-08 16:20:39 +00:00
ThreadItemStore.php ThreadItemStore: Fix rows with itr_items_id=0 corrupted by T339882 2023-09-21 03:51:48 +02:00
TopicSubscriptionsPager.php Fix truncating multibyte chars in section names 2023-09-17 21:50:54 +00:00
TreeWalker.php Use type hints for properties, remove PHPCS overrides 2023-10-19 19:31:02 +00:00