Page MenuHomePhabricator

Start markers of comments following a heading are placed inside that heading (causing issues for indented or wrapped comments)
Closed, ResolvedPublic

Description

This task is about investigating why the Reply Tool widget does not open when clicking a [reply] link that is appended to the first comment in a section that is indented at some level greater than 0.

I am filing this task as per the instructions in #Could_not_find_the_comment_you're_replying_to_on_the_page.

Behavior

  1. Visit a discussion page that contains comments indented with both * and :. E.g. https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(WMF)#RFC_on_Discussion_Tools_content_corruption
  2. Locate a comment indented with :.
    • E.g. Oh good. If any other questions come up, please do let me or anyone else know. We're striving to make the work around this project as legible as possible. PPelberg (WMF) (talk) 02:00, 30 October 2020 (UTC)
  3. Click the [ reply ] link that is appended to the comment you located in "Step 2."
  4. Notice the Reply Tool widget opens as expected.
  5. Locate a comment indented with *.
    • E.g. WMF devs, another thing: I was replying to a discussion and it was closed between the time I started typing and clicked submit. After doing this, the page refreshed and my entire reply was lost (it was not added as an edit). I think this behaviour is undesirable; an error should be shown or the opportunity to save ones reply. ProcrastinatingReader (talk) 20:40, 16 November 2020 (UTC)
  6. Click the [ reply ] link appended to the comment you located in "Step 5."

Actual

  1. ❗️Notice the following dialog appears instead of the Reply Tool widget opening: Could not find the comment you're replying to on the page. It might have been deleted or moved to another page. Please reload the page and try again.
  2. Click the OK button in the dialog that is shown in "Step 7."
  3. Refresh the page per the instructions in the dialog shown in "Step 7."
  4. Click the [ reply ] link appended to the comment you located in "Step 5."
  5. ❗️Notice the same dialog that surfaced in "Step 7." appears

Expected

  1. ✅ Notice the Reply Tool widget opens

Done

  • "Expected" behavior is implemented

Event Timeline

According to the page HTML, that comment's ID is:

c|ProcrastinatingReader|2020-11-16T20:40:00.000Z|Barkeep49|2020-10-28T21:56:00.000Z

…but according to the list of comments at https://en.wikipedia.org/w/api.php?action=discussiontools&format=jsonfm&formatversion=2&uselang=en&paction=transcludedfrom&page=Wikipedia%3AVillage_pump_(WMF)&oldid=989059187, it is:

c|ProcrastinatingReader|2020-11-16T20:40:00.000Z|RfC_Discussion

…hence the message about comment not being found.


It looks like we treat it as a reply to a comment by Barkeep in the old parser HTML, but as a top-level comment in the Parsoid HTML. I wonder if this is fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/641049.

I wonder if this is fixed by ...

Testing locally it seems it is fixed by it. Not sure why...

Change 641049 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Fix start node for comments following headings

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

(The problem isn't actually related to asterisks; it would occur for comments in a section where the first comment is indented.)

(The problem isn't actually related to asterisks; it would occur for comments in a section where the first comment is indented.)

Roger that. Take name and description updated accordingly.

ppelberg renamed this task from Unable to open Reply Tool to respond to comment indented with * (asterisk) to Unable to open Reply Tool to respond to first section comment when indented..Nov 19 2020, 2:23 AM
ppelberg renamed this task from Unable to open Reply Tool to respond to first section comment when indented. to Unable to open Reply Tool to respond to first section comment when indented.
ppelberg updated the task description. (Show Details)

Change 641049 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Fix start node for comments following headings

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

matmarex renamed this task from Unable to open Reply Tool to respond to first section comment when indented to Start markers of comments following a heading are placed inside that heading (causing issues for indented or wrapped comments).Nov 25 2020, 12:44 AM