mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 02:00:57 +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 |
||
---|---|---|
.phan | ||
i18n | ||
images | ||
includes | ||
maintenance | ||
modules | ||
sql | ||
tests | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintrc.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
DiscussionTools.alias.php | ||
DiscussionTools.magic.php | ||
extension.json | ||
Gruntfile.js | ||
package-lock.json | ||
package.json |