Page MenuHomePhabricator

MobileFrontend transformations interfere with DiscussionTools transformations
Closed, ResolvedPublic

Description

DT's CommentFormatter performs various DOM transformations such as

  1. Adding <span>s to mark comment boundaries and store comment metadata
  2. Marking the page as modified with an HTML comment
  3. Adding a subscription affordance to the header (future)
  4. Adding thread metadata to the header (future)

1 & 2 can be mangled by the transformations applied MobileFrontend's formatters. As DT tries to do transformations in the ParserCache, they will usually be run first.

Event Timeline

Change 668082 had a related patch set uploaded (by Esanders; owner: Esanders):
[HtmlFormatter@master] Don't strip comments from HTML by default

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

@ovasileva please note that although web are implied as maintainers, that's never been made explicit and because nobody in the team is familiar with the library, the HTMLFormatter is in the Code-Stewardship-Reviews process: T258964

Change 668538 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Don't attempt to put comment markers in <noscript> tags

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

Change 668538 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Don't attempt to put comment markers in <noscript> tags

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

The two patches above address the issues we are aware of so far, More issues will probably appear as we test further and/or implement new features (e.g. 3 and 4).

Change 668082 merged by jenkins-bot:
[HtmlFormatter@master] Don't strip comments from HTML by default

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

(Oh, a new version of HtmlFormatter has to be released and updated in MediaWiki, since it's a separate library…)

Change 669043 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/vendor@master] Upgrade wikimedia/html-formatter from 2.0.1 to 3.0.0

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

Change 669046 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] Upgrade wikimedia/html-formatter from 2.0.1 to 3.0.0

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

Change 669043 merged by jenkins-bot:
[mediawiki/vendor@master] Upgrade wikimedia/html-formatter from 2.0.1 to 3.0.1

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

Change 669046 merged by jenkins-bot:
[mediawiki/core@master] Upgrade wikimedia/html-formatter from 2.0.1 to 3.0.1

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

Change 670807 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/MobileFrontend@master] MobileFormatter: Don't strip HTML comments

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

Change 670807 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] MobileFormatter: Don't strip HTML comments

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

ppelberg added a project: Skipped QA.
  1. Adding a subscription affordance to the header (future)

This has also caused issues: T280433