mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-13 18:37:07 +00:00
a1c5130414
* 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 |
||
---|---|---|
.. | ||
Actions | ||
Hooks | ||
Notifications | ||
ThreadItem | ||
ApiDiscussionToolsCompare.php | ||
ApiDiscussionToolsEdit.php | ||
ApiDiscussionToolsFindComment.php | ||
ApiDiscussionToolsGetSubscriptions.php | ||
ApiDiscussionToolsPageInfo.php | ||
ApiDiscussionToolsPreview.php | ||
ApiDiscussionToolsSubscribe.php | ||
ApiDiscussionToolsTrait.php | ||
ButtonMenuSelectWidget.php | ||
CommentFormatter.php | ||
CommentModifier.php | ||
CommentParser.php | ||
CommentUtils.php | ||
ContentThreadItemSet.php | ||
DatabaseThreadItemSet.php | ||
ImmutableRange.php | ||
LanguageData.php | ||
NodeFilter.php | ||
OverflowMenuItem.php | ||
ResourceLoaderData.php | ||
ServiceWiring.php | ||
SpecialDiscussionToolsDebug.php | ||
SpecialFindComment.php | ||
SpecialGoToComment.php | ||
SpecialTopicSubscriptions.php | ||
SubscriptionItem.php | ||
SubscriptionStore.php | ||
ThreadItemFormatter.php | ||
ThreadItemSet.php | ||
ThreadItemStore.php | ||
TopicSubscriptionsPager.php | ||
TreeWalker.php |