Page MenuHomePhabricator

Comment highlight appears in an unexpected position
Closed, ResolvedPublic

Description

Behavior

  1. On a wiki where the New Discussion Tool, visit a page with existing conversations (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User_talk:Ppelberg-test)
  2. Open the New Discussion Tool
  3. Enter text into the Description field. Note: do NOT enter text into the Topic field.
  4. Click the Add topic button

Actual

  1. ❗️The "highlight" appears atop the first comment in the last section on the page.

Expected

  1. ✅The "highlight" appears atop the text you drafted in "Step 3." and published in "Step 4."

Done

  • "Expected behavior" is implemented

Event Timeline

Ryasmeen renamed this task from Comment highlight appears in an unexpected position to [Regression pre-wmf.28] Comment highlight appears in an unexpected position.Jan 22 2021, 8:27 PM

I can't replicate this anymore, is this still happening?

I can reproduce. There are some more scenarios where the highlight is wrong. For example, if you post a comment with two signatures on separate paragraphs (only the first paragraph gets highlighted) or if you add a sub-heading inside your comment (only the subheading and below gets highlighted).

After you post a new topic, we always highlight the heading of the last section on the page, and the first comment underneath. This is usually correct, but it can fail if you use interesting markup like that, and our comment parser gets confused about the comment boundaries. It's annoyingly difficult to do this better, and I don't think it's a priority.

matmarex renamed this task from [Regression pre-wmf.28] Comment highlight appears in an unexpected position to Comment highlight appears in an unexpected position.Jan 25 2021, 11:40 PM

(not a regression, it was always like this in New Discussion Tool)

After you post a new topic, we always highlight the heading of the last section on the page, and the first comment underneath. This is usually correct, but it can fail if you use interesting markup like that, and our comment parser gets confused about the comment boundaries.

This is helpful context.

It's annoyingly difficult to do this better, and I don't think it's a priority.

Understood, agreed and accordingly, marking this is "triaged" and keeping in backlog.

matmarex added a subscriber: Patriccck.

It's annoyingly difficult to do this better, and I don't think it's a priority.

Well, now that we got a bug report about it from a real user… ;) maybe it's worth fixing this case.

Change 664807 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Fix highlight when new topic is posted without a title

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

Change 664807 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Fix highlight when new topic is posted without a title

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

Change 665166 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@wmf/1.36.0-wmf.30] Fix highlight when new topic is posted without a title

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

Change 665168 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@wmf/1.36.0-wmf.31] Fix highlight when new topic is posted without a title

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

Change 665166 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@wmf/1.36.0-wmf.30] Fix highlight when new topic is posted without a title

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

Change 665168 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@wmf/1.36.0-wmf.31] Fix highlight when new topic is posted without a title

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

Mentioned in SAL (#wikimedia-operations) [2021-02-18T19:17:35Z] <urbanecm@deploy1001> Synchronized php-1.36.0-wmf.30/extensions/DiscussionTools/: 9c6cdf5: 97acef6: DiscussionTools backports (T272666; T274949) (duration: 01m 26s)

Mentioned in SAL (#wikimedia-operations) [2021-02-18T19:19:21Z] <urbanecm@deploy1001> sync-file aborted: 1cc29df DiscussionTools backports (T272666; T274949) (duration: 00m 00s)

Mentioned in SAL (#wikimedia-operations) [2021-02-18T19:20:49Z] <urbanecm@deploy1001> Synchronized php-1.36.0-wmf.31/extensions/DiscussionTools/: 1cc29df: 6b88aff: DiscussionTools backports (T272666; T274949) (duration: 01m 08s)