Page MenuHomePhabricator

Regresssion: Edit icon is not hidden by default on Parsoid mobile wikis
Open, In Progress, LowPublic1 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The section headings are collapsed. The edit icon is hidden in the legacy parser, but visible in Parsoid.

What should have happened instead?:
The edit icon should be hidden until the section is expanded.

Requirement

Ensure that the edit icon is hidden by default for collapsed section headings on Parsoid mobile wikis, matching the behavior of the legacy parser. The edit icon should only be visible when the section is expanded.

BDD

Feature: Hide edit icon by default on Parsoid mobile wikis  
  Scenario: Edit icon is hidden by default when the section is collapsed  
    Given a user visits a mobile wiki page with Parsoid enabled  
    When the page is loaded and sections are collapsed  
    Then the edit icon should be hidden by default  

  Scenario: Edit icon is visible when the section is expanded  
    Given a user visits a mobile wiki page with Parsoid enabled  
    When the user expands a collapsed section  
    Then the edit icon should become visible

Test Steps

Test Case 1: Verify edit icon is hidden by default on collapsed sections (Parsoid)

  1. Emulate a mobile device in the browser.
  2. Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Dog&useparsoid=1.
  3. Observe the collapsed section headings.
  4. Verify that the edit icon is hidden by default.
  5. AC1: The edit icon is hidden when sections are collapsed.

Test Case 2: Verify edit icon is visible when section is expanded (Parsoid)

  1. On the same page (https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Dog&useparsoid=1), click to expand any collapsed section.
  2. Verify that the edit icon becomes visible after expansion.
  3. AC2: The edit icon is visible when the section is expanded.

Test Case 3: Compare behavior with the legacy parser

  1. Emulate a mobile device in the browser.
  2. Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Dog&useparsoid=0.
  3. Observe the collapsed section headings.
  4. Verify that the edit icon is hidden by default, consistent with the behavior tested in Test Case 1.
  5. Expand any section and confirm that the edit icon becomes visible, consistent with Test Case 2.
  6. AC3: Parsoid and legacy parser behavior match regarding the visibility of the edit icon.

QA Results - Beta

ACStatusDetails
1T384408#10531044
2T384408#10531044
3T384408#10531044

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Jdlrobson-WMF changed the task status from Open to In Progress.Fri, Jan 31, 10:45 PM
Jdrewniak set the point value for this task to 1.Mon, Feb 3, 6:45 PM

Change #1117236 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Parsoid: Fix aria-expanded attributes for section collapsing

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

Change #1117236 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Parsoid: Fix aria-expanded attributes for section collapsing

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

Edtadros subscribed.

Status: ✅ PASS
Environment: Beta
OS: macOS
Browser: Chrome
Device: MS

Test Case 1: Verify edit icon is hidden by default on collapsed sections (Parsoid)

  1. Emulate a mobile device in the browser.
  2. Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Dog&useparsoid=1.
  3. Observe the collapsed section headings.
  4. Verify that the edit icon is hidden by default.
  5. AC1: The edit icon is hidden when sections are collapsed.

screenshot 173.png (709×395 px, 97 KB)

Test Case 2: Verify edit icon is visible when section is expanded (Parsoid)

  1. On the same page (https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Dog&useparsoid=1), click to expand any collapsed section.
  2. Verify that the edit icon becomes visible after expansion.
  3. AC2: The edit icon is visible when the section is expanded.

screenshot 96.mov.gif (702×390 px, 335 KB)

Test Case 3: Compare behavior with the legacy parser

  1. Emulate a mobile device in the browser.
  2. Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Dog&useparsoid=0.
  3. Observe the collapsed section headings.
  4. Verify that the edit icon is hidden by default.
  5. Expand any section and confirm that the edit icon becomes visible.
  6. AC3: Parsoid and legacy parser behavior match regarding the visibility of the edit icon.

screenshot 97.mov.gif (702×390 px, 373 KB)