Page MenuHomePhabricator

Vue: Users should not be able to enter only spaces in wish title field
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue :

  1. Edit a wish through the "Edit with Form"
  2. Enter spaces only in the title field
  3. Submit the form.

What happens?:

  • The system successfully submits the form and the title is now blank.

What should have happened instead?:

  • The system should show an error message in the title field. The form should not submit.

Derived Requirement

Ensure that users cannot submit a wish form with only spaces in the title field. If the title field contains only whitespace, the system must:

  • Prevent form submission
  • Display an inline error message on the title field
Test Steps

Test Case 1: Prevent submission with only spaces in wish title

  1. Navigate to Special:WishlistIntake and create or edit a wish using "Edit with Form".
  2. In the title field, enter only spaces (e.g., " ").
  3. Submit the form.
  4. ✅❓❌⬜ AC1: Confirm that the form does not submit when the title contains only spaces.
  5. ✅❓❌⬜ AC2: Confirm that an error message is displayed inline on the title field.

Test Case 2: Ensure valid title submits successfully

  1. Navigate to the same form.
  2. Enter a valid non-whitespace title (e.g., "Improved translation tool").
  3. Submit the form.
  4. ✅❓❌⬜ AC3: Confirm that the form submits successfully and the wish is created/updated.

Test Case 3: Ensure trimming works with spaces and valid characters

  1. Enter a title with leading and trailing spaces (e.g., " Better search ").
  2. Submit the form.
  3. ✅❓❌⬜ AC4: Confirm that the form trims the spaces and saves the title as "Better search".

QA Results - Meta Beta

ACStatusDetails
1T403682#11168111
2pass per T403682#11169643
3T403682#11168111
4T403682#11168111

Event Timeline

Change #1184612 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/extensions/CommunityRequests@master] Do not allow a blank title for wishes

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

MusikAnimal changed the subtype of this task from "Task" to "Bug Report".
HMonroy renamed this task from User should not be able to enter only spaces in wish title field to Vue: User should not be able to enter only spaces in wish title field.Sep 4 2025, 2:28 AM
HMonroy renamed this task from Vue: User should not be able to enter only spaces in wish title field to Vue: Users should not be able to enter only spaces in wish title field.

Change #1184612 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Do not allow a blank title for wishes

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

@HMonroy Can you review AC2 when you have a chance and let me know what you think? Thanks!

Test Result - Meta Beta

Status: ✅ PASS / ❓Need More Info
Environment: Meta Beta
OS: macOS Sequoia 15.6.1
Browser: Chrome 139
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Prevent submission with only spaces in wish title

  1. Navigate to Special:WishlistIntake and create or edit a wish using "Edit with Form".
  2. In the title field, enter only spaces (e.g., " ").
  3. Submit the form.
  4. AC1: Confirm that the form does not submit when the title contains only spaces.

2025-09-09_14-39-07.mp4.gif (1,008×968 px, 2 MB)

  1. AC2: Confirm that an error message is displayed inline on the title field.

Is this what you wanted to see? Shouldn't you want a message from the bottom saying that the title needs to be filled out before submitting, or have it scroll up to the spot where the error occurs?

Test Case 2: Ensure valid title submits successfully

  1. Navigate to the same form.
  2. Enter a valid non-whitespace title (e.g., "Improved translation tool").
  3. Submit the form.
  4. AC3: Confirm that the form submits successfully and the wish is created/updated.

Test Case 3: Ensure trimming works with spaces and valid characters

  1. Enter a title with leading and trailing spaces (e.g., " Better search ").
  2. Submit the form.
  3. AC4: Confirm that the form trims the spaces and saves the title as "Better search".

GMikesell-WMF changed the task status from Open to In Progress.Sep 10 2025, 3:36 PM
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from QA to In Development on the Community-Tech (Sea Lion Squad) board.
  1. AC2: Confirm that an error message is displayed inline on the title field.

Is this what you wanted to see? Shouldn't you want a message from the bottom saying that the title needs to be filled out before submitting, or have it scroll up to the spot where the error occurs?

@HMonroy After discussion, I will mark this task as Resolved and created T404237: No error message at the bottom or auto-scroll when wish title is missing or incomplete on submission as a separate task. Thanks for all your work!

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.