Page MenuHomePhabricator

Revise empty Title field warning message display logic
Closed, ResolvedPublic

Description

Behavior

  1. Visit a page where the New Discussion Tool is available (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User_talk:Ppelberg-test)
  2. Click the New section button at the top of the page
  3. Notice the New Discussion Tool opens
  4. Click somewhere outside of the New Discussion Tool

Actual

  1. The following appears beneath the Title field: ⚠️Please provide a title for your discussion topic. If you click "Add topic", your topic will be added without a title.

✅ Desired

  1. The New Discussion Tool becomes "unfocused"; beyond that, nothing else about the tool's state is changed.
  2. Focus the Description field (leave the Title field blank)
    • Or: Enter some text into the Title field, then delete it all
  3. The following appears beneath the Title field: ⚠️Please provide a title for your discussion topic. If you click "Add topic" again, your topic will be added without a title.

Test plan

Try to add a new topic with an empty title. Make sure that the message always appears before you're able to save it, regardless of how you interacted with the form.

Done

  • Desired behavior is implemented

Event Timeline

ppelberg renamed this task from Revise empty Title field logic to Revise empty Title field warning message display logic.Aug 2 2021, 6:20 PM
ppelberg updated the task description. (Show Details)

Assigning this over to myself to review past conversations before finalizing the approach we take for making the warning "less noisy."

Change 716019 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] New topic tool: Show empty title warning only when focussing the description

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

matmarex subscribed.

I updated the requested behavior to match the behavior we're trying as a solution for T288316.

Test wiki created on Patch Demo by Matma Rex using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/8f3a3d5941/w/

Change 716019 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] New topic tool: Show empty title warning only when focussing the description

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

This feels better to me, @matmarex. Nice.

Test wiki on Patch Demo by Matma Rex using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/8f3a3d5941/w/