Page MenuHomePhabricator

New Discussion Tool pre-fomats signature
Closed, ResolvedPublic

Description

This task is about removing the styling the New Discussion Tool appears to be adding to signatures in topics that contain bulleted lists.

Behavior

  1. Visit the latest version of the New Discussion Tool prototype: https://patchdemo.wmflabs.org/wikis/f6c284e009aa861712491b41d84fe464/w/index.php/Talk:Main_Page
  2. Open the New Discussion Tool by tapping the "Add topic" button
  3. Enter some text in the Topic field
  4. Create a bulleted list
  5. Click Add topic button to publish the topic you drafted in Steps 2. and 3.

Actual

  1. ❗️Notice the signature that accompanies the comment you posted in "Step 5." is styled differently from the rest of the topic contents and page:

Screen Shot 2020-12-01 at 4.47.11 PM.png (448×1 px, 54 KB)

Expected

  1. ✅ Notice the signature that accompanies the comment you posted in "Step 5." is styled similarly to the content on the rest of the page:

Screen Shot 2020-12-01 at 4.48.48 PM.png (206×1 px, 64 KB)

Note: I've manually highlighted the text in the screenshot above.

Done

  • "Expected" behavior is implemented

Event Timeline

The cause is the space inserted before the signature when it's on its own line.

This is only not an issue in reply mode because the indentation syntax prevents the space from have any meaning. : is the same as : .

This is also only a problem in visual mode. In source mode we trim source whitespace, so the signature ends up on the same line as the last bullet point.

Change 644904 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Trim signatures when added on a new line

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

Looks like we saw this coming:

// TODO: When we implement posting new topics, the leading space will create an indent-pre

Change 644904 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Trim signatures when added on a new line

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

Esanders renamed this task from New Discussion Tool wraps adds unwanted styling to signature to New Discussion Tool pre-fomats signature.Dec 2 2020, 10:05 PM
ppelberg claimed this task.