Page MenuHomePhabricator

Reply Tool's comment summary not retained if closed
Closed, ResolvedPublic

Description

Behavior

USE CASE 1

  1. Visit https://patchdemo.wmflabs.org/wikis/65ba8c5ba1bd0a7be13e324ce9c522d1/w/index.php/Talk:Main_Page
  2. Type a comment in the Reply Tool (shouldn't matter what mode)
  3. Click Advanced to expose the Comment summary field
  4. Modify the contents of the Comment summary field
  5. Click Advanced to hide the Comment summary field
  6. Reload the page [after bypassing the browser's warning]
  7. Notice the Reply Tool opens with the comment you drafted in Step 2 and the Reply summary field is NOT exposed
  8. Click Advanced to expose the Reply summary field

Actual

  1. ❗️Notice the Reply summary you drafted in "Step 4" has NOT been retained; instead, the default copy – /* Heading name */ Reply – appears

Expected

  1. ✅ Notice the Reply summary you drafted in "Step 4" has been retained

USE CASE 2

  1. Visit https://patchdemo.wmflabs.org/wikis/65ba8c5ba1bd0a7be13e324ce9c522d1/w/index.php/Talk:Main_Page
  2. Type a comment in the Reply Tool (shouldn't matter what mode)
  3. Click Advanced to expose the Comment summary field
  4. Modify the contents of the Comment summary field
  5. Click Advanced to hide the Comment summary field
  6. Press Reply
  7. Visit the page's History page

Actual

  1. ❗️Notice the default Reply summary appears next to the edit you just published

Expected

  1. ✅ Notice the Reply summary you drafted in "Step 4" appears next to the edit you just published

Open questions

  • How should the Comment summary behave in the following scenarios described in T262501#6460808?
    • As discussed during today's team meeting and our 15-Sep standup meeting, "hiding" the Comment summary field should have no impact on its contents.

Done

  • "Expected" behavior is implemented

Event Timeline

Task description update
@DLynch raised some questions we ought to consider before implementing this change. David, can you please post the "behavioral matrix" you shared in chat as a comment on this task?

This represents the current behavior of the tool:

image.png (274×1 px, 30 KB)

"Blank summary" means literally an empty input. "Default summary" means whatever we auto-generate for you.

(You could argue that it could contain more state inputs, like whether the field had been changed in the current session or before a state-restore on a page reload. But that's not currently a factor that's considered.)

Oh, that matrix is very-specifically focused on the behavior when you actually submit the reply. There's additional what-happens to consider if reloading the page and restoring state is added to the mix.

When would a user ever encounter a blank text summary field? Is it just the moment that they click into it? Or is it if there is a blank comment and then the user clicks advanced?

@iamjessklein I was assuming it was the case where they'd manually deleted the content of the field.

Task description update
I've added "USE CASE 2" to the task description's ===Behavior section.

Change 628178 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Always send edit summary, regardless of visibility

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

Change 628178 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Always send edit summary, regardless of visibility

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