Page MenuHomePhabricator

Add a new "fostered-transparent" lint category for when all the fostered content in rendering transparent
Closed, ResolvedPublic

Description

In T290936, DiscussionTools needed to know about any fostering on a page to avoid corruption.

Several iterations of patches tried to expose lints of fostered rendering transparent tags in a way that wouldn't be too disruptive of editors work (only lint when not template generated and outside the template namespace),
https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/721355
https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/1052192

but it ultimately proved too disruptive and was reverted,
https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/1054407

A new approach (T369317#9983813) would be to introduce a new hidden lint category, "fostered-transparent", that reports these lints separately from "fostered".

Event Timeline

Change #1057265 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Add a "fostered-transparent" lint category

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

Change #1054409 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Emit fostered rendering transparent lints as a separate category

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

Change #1057265 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Add a "fostered-transparent" lint category

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

Before turning this on, it's worth asking, is it ok to be creating these lints if we never really intend for them to go away?

Change #1054409 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Emit fostered rendering transparent lints as a separate category

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

Change #1063811 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a17

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

Change #1063811 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a17

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

ssastry subscribed.

https://en.wikipedia.org/wiki/Special:LintErrors/fostered-transparent now exists.

But, I wonder if there is a different representation we can rely on when we have "<*include*>...</*include*>" style markup in fostered position that (a) eliminates the fostered-content corruption possibilities (b) renders the wikitext back on edits to such tables. That might be worth exploring and might be a better solution. For ex, we could possibly hide all that in a special meta tag before the table OR in some special table attribute. In either case, that should retain enough info to indicate how it should be serialized / where it belongs. Not high priority, but if a lot of discussion tools page edits are thwarted because of this category, a different representation can solve that issue.

When you create a new Linter error, even if it is hidden, make sure to add it to https://www.mediawiki.org/wiki/Help:Lint_errors and complete the rest of the "new Linter error" checklist.