Page MenuHomePhabricator

Should not be able to post empty reply
Closed, ResolvedPublic

Description

First reported by user:Nemo_Le_Poisson on French Wikpedia: https://fr.wikipedia.org/wiki/Discussion_Projet:Outils_de_discussion

Actual behavior

  1. Navigate to https://fr.wikipedia.org/wiki/Discussion_Projet:Outils_de_discussion?dtenable=1
  2. Click any Répondre link
  3. Click Répondre button
  4. ⚠️ A reply with no content is published to the talk page [1][2]

Expected behavior

  1. Navigate to https://fr.wikipedia.org/wiki/Discussion_Projet:Outils_de_discussion?dtenable=1
  2. Click any Répondre link
  3. Click Répondre button
  4. ✅ Unable to post a reply to the talk page without having entered some text into the text input

Open question

  • @iamjessklein: What do you think is the best way to communicate to a person why they are unable to publish an empty reply? [3]

Done

  • Contributors are not able to publish replies without having entered any text into the text input
    • See T246058#5917507: "Reply button should appear as disabled (gray) until theres text in the input field. This way, it shouldn't be tappable until there's content there."
  • Contributors understand why they are not able to publish an empty reply

  1. https://fr.wikipedia.org/w/index.php?diff=167654965&oldid=167646186&title=Discussion_Projet:Jeu_vid%C3%A9o&diffmode=source
  2. https://fr.wikipedia.org/w/index.php?title=Discussion_Projet%3AOutils_de_discussion&type=revision&diff=167787057&oldid=167745839
  3. My instinct: follow the patterns other services (e.g. Gitlab, Github) that similarly do not couple discussion actions (e.g. change the state of the task as part of the replying workflow) with the reply workflow: the "Reply" button should not be "activated" until someone has entered text into the text input.

Event Timeline

What should really happen here is that the Reply button should appear as disabled (gray) until theres text in the input field.
This way, it shouldn't be tappable until there's content there.

What should really happen here is that the Reply button should appear as disabled (gray) until theres text in the input field.
This way, it shouldn't be tappable until there's content there.

Sounds great – thank you, @iamjessklein. I am adding this to the task description.

ppelberg removed a project: Editing Design.
ppelberg updated the task description. (Show Details)

Change 575660 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] ReplyWidget: Disable "Reply" button if input is empty

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

Change 575660 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] ReplyWidget: Disable "Reply" button if input is empty

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

ppelberg claimed this task.
Whatamidoing-WMF added a subscriber: Whatamidoing-WMF.

It's still possible to post empty replies: https://fr.wikipedia.org/w/index.php?title=Discussion_Projet:Outils_de_discussion&diff=168363201&oldid=168363197

The button isn't highlighted, but the keyboard shortcut works.

Change 581153 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] ReplyWidget: Double-check that we can post before posting

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

Thanks for spotting this @Whatamidoing-WMF, that's a silly mistake from me.

I would note that there are some rare cases where posting "empty comments" is actually done at the moment, such as WikiProjects' lists of users and situations like petitions and votes. It might not really make sense to use this tool to do that, but if the current use cases continue to exist, it may be necessary to allow empty comments to be posted.

Change 581153 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] ReplyWidget: Double-check that we can post before posting

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

@Jc86035 Good point, we should keep that in mind for the future. I think right now though, the reply tool won't work in those situations anyway (since there is no comment to reply to).