Page MenuHomePhabricator

Closing New Discussion Tool requires you to click "Cancel" twice (on pages too short to be scrollable)
Closed, ResolvedPublic

Description

Behavior

  1. Visit a talk page that has not yet been created (e.g. https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Talk:Duke_University&action=edit&redlink=1)
    • Note: it should not matter what namespace this talk page exists in.
  2. Click the Start a discussion button within the new empty state design
  3. Click Cancel
    • Note: it is important that you have NOT entered any text into either the Title or Description fields.

Actual

  1. ❗️Notice the ⚠️ Please provide a title for your discussion topic. If you click "Add topic", your topic will be added without a title. warning appears beneath the Title field: https://youtu.be/-bppg-cGL9U.

Expected

  1. ✅ Notice the New Discussion Tool closes and you are returned to the empty state experience you saw in "Step 2."

Approaches

  • #1: Add a set timeout before validating
  • #2: Only show warning message when moving into the description field.

Done

  • Expected behavior is implemented

Event Timeline

I couldn’t reproduce it (Firefox 78.12.0esr and Chromium 90.0.4430.212 on Debian 10). But even if I could, I’m pretty sure it wasn’t constrained to not yet created talk pages, the warning appears also when starting new topics on existing talk pages.

This is the warning appearing when the focus is lost from the title, moving the cancel button out of the way before your click on it can happen. You don't actually have to click the cancel button twice, just click anywhere at all outside the title and then the cancel button.

I feel like I remember us having fixed this before somewhere...

Resolving T287901 would resolve this as well.

I feel like I remember us having fixed this before somewhere...

Probably T275923.

Probably T275923.

Ah, right, and that's not working here because an empty page will be too short to be scrollable. This makes sense.

To start, we're going to implement "Approach #2".

matmarex renamed this task from Closing New Discussion Tool requires you to click "Cancel" twice to Closing New Discussion Tool requires you to click "Cancel" twice (on pages too short to be scrollable).Sep 1 2021, 6:43 PM

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

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

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

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