We are now able to put the page transformations in the parser cache (T267404), and also selective enable them using CSS/JS (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/647587).
Going forward we expect (1) more users to have the feature enabled by default, and (2) we will be building features that require page transformations even for users that don't have the tools enabled, for example linking to specific comments in a notification (T282029).
At this point it won't make sense to keep generating two versions of the page, and we should just apply our transformations to all talk pages.
Deployment specs
Deployment timing
Target deployment date: Tuesday, 21 September via the deployment train.
⚠️ The above depends on confirmation from @Ryasmeen + @EAkinloose that they have capacity to complete QA of T287098.
- Consult with Performance Team per T273072#7275862 before deploying.
- ✅ Done in T273072#7282942
-
Draft user notice directly to Meta @WhatamIdoing - Code review completed
- Follow up with QA to ensure capacity to test @LZaman
Testing instructions
QA
Monitoring for issues
This is a high exposure release, so
- Check phabricator daily for mentions of issues related to the change @matmarex
- Test T287098 daily to ensure it continues to work in desirable ways as it's scaled
Open question
- When do we think this work should be merged? What – if any – specific testing should be done to ensure it's working as expected?
- Assuming no issues emerge from T267404, these patches can be merged and deployed to all wikis. We've already trialled this on a number of wikis where the reply tool is enabled for everyone (opt-out) in T279864.
Technical description
Additional markup is added on discussion pages (broadly defined: including all talk namespaces, and namespaces like 'Wikipedia:' where comments are often posted). For each discussion comment, an anchor is added, which can be used to link to that comment within the discussion. Additionally, markup for DiscussionTools' reply tool and topic subscriptions is added (it is hidden using CSS when those tools are not enabled).
Below are some examples of the markup, based on the discussion here: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#dtenable_testing. This is provided for reference only. The markup is subject to change. Please let us know if you're planning to build something that would depend on it.
Comments
Before:
<dl> <dd> Thank you for testing. <a href="/wiki/User:Whatamidoing_(WMF)" title="User:Whatamidoing (WMF)">Whatamidoing (WMF)</a> (<a href="/wiki/User_talk:Whatamidoing_(WMF)" title="User talk:Whatamidoing (WMF)">talk</a>) 19:41, 27 August 2021 (UTC) <dl>...</dl> </dd> </dl>
After: [when reply tool disabled]
<dl> <dd> <span data-mw-comment-start="" id="c-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z-Elli-2021-08-27T19:36:00.000Z"></span> Thank you for testing. <a href="/wiki/User:Whatamidoing_(WMF)" title="User:Whatamidoing (WMF)">Whatamidoing (WMF)</a> (<a href="/wiki/User_talk:Whatamidoing_(WMF)" title="User talk:Whatamidoing (WMF)">talk</a>) 19:41, 27 August 2021 (UTC) <span class="ext-discussiontools-init-replylink-buttons"> <span class="ext-discussiontools-init-replylink-bracket">[</span> <a class="ext-discussiontools-init-replylink-reply" role="button" tabindex="0" data-mw-comment='{"type":"comment","level":3,"id":"c-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z-Elli-2021-08-27T19:36:00.000Z","replies":["c-Elli-2021-08-27T19:42:00.000Z-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z"],"timestamp":"2021-08-27T19:41:00.000Z","author":"Whatamidoing (WMF)"}' href=""> <!--__DTREPLY__--> </a> <span class="ext-discussiontools-init-replylink-bracket">]</span> </span> <span data-mw-comment-end="c-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z-Elli-2021-08-27T19:36:00.000Z"></span> <dl>...</dl> </dd> </dl>
After: [when reply tool enabled]
<dl> <dd> <span data-mw-comment-start="" id="c-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z-Elli-2021-08-27T19:36:00.000Z"></span> Thank you for testing. <a href="/wiki/User:Whatamidoing_(WMF)" title="User:Whatamidoing (WMF)">Whatamidoing (WMF)</a> (<a href="/wiki/User_talk:Whatamidoing_(WMF)" title="User talk:Whatamidoing (WMF)">talk</a>) 19:41, 27 August 2021 (UTC) <span class="ext-discussiontools-init-replylink-buttons"> <span class="ext-discussiontools-init-replylink-bracket">[</span> <a class="ext-discussiontools-init-replylink-reply" role="button" tabindex="0" data-mw-comment='{"type":"comment","level":3,"id":"c-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z-Elli-2021-08-27T19:36:00.000Z","replies":["c-Elli-2021-08-27T19:42:00.000Z-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z"],"timestamp":"2021-08-27T19:41:00.000Z","author":"Whatamidoing (WMF)"}' href=""> reply </a> <span class="ext-discussiontools-init-replylink-bracket">]</span> </span> <span data-mw-comment-end="c-Whatamidoing_(WMF)-2021-08-27T19:41:00.000Z-Elli-2021-08-27T19:36:00.000Z"></span> <dl>...</dl> </dd> </dl>
Headings
Before:
<h2> <span class="mw-headline" id="dtenable_testing">dtenable testing</span> <span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Village_pump_(technical)&action=edit&section=1" title="Edit section: dtenable testing">edit source</a><span class="mw-editsection-bracket">]</span></span> </h2>
After: [when topic subscriptions disabled]
<h2 class="ext-discussiontools-init-section"> <span class="mw-headline" id="dtenable_testing" data-mw-comment='{"type":"heading","level":0,"id":"h-dtenable_testing-2021-08-27T19:35:00.000Z","replies":["c-Whatamidoing_(WMF)-2021-08-27T19:35:00.000Z-dtenable_testing","c-Chipmunkdavis-2021-08-30T12:39:00.000Z-dtenable_testing","h-Arbitrary_subsection-dtenable_testing-2021-08-30T13:34:00.000Z","h-Flow?-dtenable_testing-2021-08-30T22:38:00.000Z","h-Large_number_of_notifications-dtenable_testing-2021-08-30T23:04:00.000Z","h-Master_list-dtenable_testing-2021-09-12T20:26:00.000Z"],"headingLevel":2,"placeholderHeading":false}'><span data-mw-comment-start="" id="h-dtenable_testing-2021-08-27T19:35:00.000Z"></span>dtenable testing<span data-mw-comment-end="h-dtenable_testing-2021-08-27T19:35:00.000Z"></span></span> <span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Village_pump_(technical)&action=edit&section=1" title="Edit section: dtenable testing">edit source</a><span class="mw-editsection-bracket">]</span></span> <!--__DTSUBSCRIBE__h-Whatamidoing_(WMF)-2021-08-27T19:35:00.000Z--> </h2>
After: [when topic subscriptions enabled]
<h2 class="ext-discussiontools-init-section"> <span class="mw-headline" id="dtenable_testing" data-mw-comment='{"type":"heading","level":0,"id":"h-dtenable_testing-2021-08-27T19:35:00.000Z","replies":["c-Whatamidoing_(WMF)-2021-08-27T19:35:00.000Z-dtenable_testing","c-Chipmunkdavis-2021-08-30T12:39:00.000Z-dtenable_testing","h-Arbitrary_subsection-dtenable_testing-2021-08-30T13:34:00.000Z","h-Flow?-dtenable_testing-2021-08-30T22:38:00.000Z","h-Large_number_of_notifications-dtenable_testing-2021-08-30T23:04:00.000Z","h-Master_list-dtenable_testing-2021-09-12T20:26:00.000Z"],"headingLevel":2,"placeholderHeading":false}'><span data-mw-comment-start="" id="h-dtenable_testing-2021-08-27T19:35:00.000Z"></span>dtenable testing<span data-mw-comment-end="h-dtenable_testing-2021-08-27T19:35:00.000Z"></span></span> <span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Village_pump_(technical)&action=edit&section=1" title="Edit section: dtenable testing">edit source</a><span class="mw-editsection-bracket">]</span></span> <span class="ext-discussiontools-init-section-subscribe mw-editsection-like"><span class="ext-discussiontools-init-section-subscribe-bracket">[</span><a href="" class="ext-discussiontools-init-section-subscribe-link" role="button" tabindex="0" data-mw-comment-name="h-Whatamidoing_(WMF)-2021-08-27T19:35:00.000Z" title="Subscribe to receive notifications about new comments.">subscribe</a><span class="ext-discussiontools-init-section-subscribe-bracket">]</span></span> </h2>