Page MenuHomePhabricator

Perform addReplyLinks on the server
Closed, ResolvedPublic

Description

Now that we have everything ported to PHP, we should be able to run addReplyLinks on the server. This would mean that reply links would be visible instantly on page load to DT users, and could then have click handlers attached once JS loads.

We would probably need attach other parser metadata to the links, perhaps by JSON encoding the comment object in an data attribute. I think at the very least the comment ID is required.

Done

Testing instructions

This shouldn't affect the experience once the tool has loaded (e.g. the toolbar, switching between visual/source).
Testing should focus on ensuring the reply links appear when and where they are supposed to, and not when the tool is disabled.
We should also test that the page is updated correctly after posting, and the reply tools still work for subsequent comments.


Note: we should be mindful that once the patches on this ticket are merged, the risk of issues arising from T258980 will go up.

Related Objects

Event Timeline

Esanders created this task.May 12 2020, 3:51 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 12 2020, 3:51 PM

Change 596813 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] WIP Add reply links on the server

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

If no reply links are generated at the client side, T258815 will no longer be a bug (yay!).

Esanders claimed this task.Jul 29 2020, 3:23 PM
ppelberg updated the task description. (Show Details)Jul 29 2020, 3:48 PM

Task description update
I've added the below to the task description, per a conversation with Ed yesterday:

Note: we should be mindful that once the patches on this ticket are merged, the risk of issues arising from T258980 will go up.

Tacsipacsi updated the task description. (Show Details)Aug 28 2020, 12:56 AM

This is no longer blocked now that T252558 is resolved

ppelberg updated the task description. (Show Details)Sep 22 2020, 4:06 PM

Task description update
ADDED T263344 to the task description's ===Done section (we think the fix for this issue will resolve T263344).

Esanders updated the task description. (Show Details)Tue, Oct 13, 7:48 PM

Change 596813 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Add reply links on the server

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

The change is now visible on https://en.wikipedia.beta.wmflabs.org/, and will be deployed to production Wikimedia wikis next week. If you don't notice any differences, that's good :) The talk pages should load very slightly faster (and they should feel noticeably faster, since the reply links are now immediately visible instead of appearing after everything else).


We've realized that this change breaks the trick used to load the reply tool on pages (and wikis) where it's not supposed to be available, by using code like mw.loader.load( 'ext.discussionTools.init' ) in your common.js – that code will not cause any issues, but it will do nothing now. It has become surprisingly popular (currently 7 and 19 results in those searches)…

We probably want to support some alternative way of doing that, but we haven't quite figured out how. We'll do something about this before the production deployment.

Also, you can still load the reply tool on any page on any wiki by adding the 'dtenable=1' query parameter to the URL – e.g. https://www.mediawiki.org/wiki/User_talk:Matma_Rex?dtenable=1 or https://www.mediawiki.org/w/index.php?title=User_talk:Matma_Rex&dtenable=1. We're going to continue supporting that.

Esanders added a project: Editing QA.
Esanders moved this task from Inbox to High Priority on the Editing QA board.

Support for what @matmarex described above should not block this being deployed. If it turns out that the ideas @Esanders has in his head are not possible to implement before Tuesday can you please file a task for adding a support for script that enables DiscussionTools.

Change 635089 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Add tests for CommentFormatter

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

Change 635089 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Add tests for CommentFormatter

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

Ryasmeen edited projects, added Verified; removed Editing QA.
ppelberg closed this task as Resolved.Sat, Oct 24, 12:55 AM