Page MenuHomePhabricator

Don't include Special and Media namespaces
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

In the Namespaces restriction field, do not include the Special or Media namespaces in the dropdown options.

Only include namespaces with id >= 0.

Steps to reproduce problem
  1. Go to Special:Block (e.g. https://test.wikipedia.beta.wmflabs.org/wiki/Special:Block)
  2. Click the "Partial" radio button
  3. Click inside the "Namespaces" field

Expected behaviour:

  • The dropdown does not show "Special" or "Media"
  • Searching "Special" or "Media" should return nothing
  • "Special" or "Media" should not be accepted options for the field
Environment

Wiki(s): https://test.wikipedia.beta.wmflabs.org MediaWiki 1.43.0-alpha (45777c2) 10:59, 21 October 2024.

Screenshots

special_and_media.png (657×694 px, 50 KB)

Derived Requirement

Ensure that the "Namespaces" restriction field on Special:Block excludes the "Special" and "Media" namespaces from the dropdown options. Namespaces with id >= 0 should be the only options displayed, and searching or selecting "Special" or "Media" should return no results.

BDD

gherkin
Feature: Restrict Namespace Options in Special:Block

Scenario: Exclude "Special" and "Media" namespaces in dropdown options
  Given the user is on the Special:Block page
  And the user selects the "Partial" block type
  When the user clicks in the "Namespaces" field dropdown
  Then the dropdown should not show "Special" or "Media" namespaces

Scenario: Exclude "Special" and "Media" namespaces from search results in dropdown
  Given the user is on the Special:Block page
  And the user selects the "Partial" block type
  When the user types "Special" or "Media" in the "Namespaces" field
  Then no results should be returned for "Special" or "Media"

Test Result - Beta|Prod

Status: ✅ PASS / ❓Need More Info / ❌ FAIL
Environment: beta/xyzwiki
OS: macOS Sonoma 15.0
Browser: Chrome 130
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Exclude "Special" and "Media" Namespaces in Dropdown Options

  1. Go to Special:Block.
  2. Click the "Partial" radio button to reveal the "Namespaces" field.
  3. Click inside the "Namespaces" field to view dropdown options.
  4. ✅❓❌⬜ AC1: Confirm that "Special" and "Media" namespaces are not shown in the dropdown options.

Test Case 2: Exclude "Special" and "Media" Namespaces from Search Results

  1. Repeat steps 1-3 from Test Case 1.
  2. Type "Special" in the "Namespaces" field.
  3. ✅❓❌⬜ AC2: Confirm that no results appear for "Special."
  4. Clear the field and type "Media" in the "Namespaces" field.
  5. ✅❓❌⬜ AC3: Confirm that no results appear for "Media."

QA Results - Test Beta

ACStatusDetails
1T377716#10262892
2T377716#10262892
3T377716#10262892

Event Timeline

Change #1082126 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/core@master] SpecialBlock [Codex]: exclude virtual namespaces from ns dropdown

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

Change #1082126 merged by jenkins-bot:

[mediawiki/core@master] SpecialBlock [Codex]: exclude virtual namespaces from ns dropdown

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

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

@MusikAnimal "Special" and "Media" do now show in the dropdown box or when you manually type in the Namespace, as seen in the gifs below. Thank you for all your work, and I will move this to Done!

Test Result - Test Beta

Status: ✅ PASS
Environment: Test Beta
OS: macOS Sonoma 15.0
Browser: Chrome 130
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Exclude "Special" and "Media" Namespaces in Dropdown Options

  1. Go to Special:Block.
  2. Click the "Partial" radio button to reveal the "Namespaces" field.
  3. Click inside the "Namespaces" field to view dropdown options.
  4. AC1: Confirm that "Special" and "Media" namespaces are not shown in the dropdown options.

2024-10-25_08-47-39.mp4.gif (636×788 px, 749 KB)

Test Case 2: Exclude "Special" and "Media" Namespaces from Search Results

  1. Repeat steps 1-3 from Test Case 1.
  2. Type "Special" in the "Namespaces" field.
  3. AC2: Confirm that no results appear for "Special."

2024-10-25_08-49-13.mp4.gif (610×806 px, 313 KB)

  1. Clear the field and type "Media" in the "Namespaces" field.
  2. AC3: Confirm that no results appear for "Media."

See AC2

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from QA to Done on the Community-Tech (Jackal (not a fox) Fox) board.