Background
In Parsoid sections are currently expanded by default. This is the last blocker for enabling Parsoid on mobile views on Wikivoyage projects.
User story
AS a user I want Parsoid HTML to respect my preference for collapsed sections.
Requirements
- Solution is CSS only. While the existing non-parsoid view has JavaScript for restoring expanding sections, we do not want to apply it to Parsoid HTML.
- Solution must be restricted to below the tablet breakpoint. Sections should be expanded by default on tablets and desktop resolution.
- Solution should respect the mf-expand-sections-clientpref-1 and mf-expand-sections-clientpref-0 class on the HTML element. When mf-expand-sections-clientpref-0 is present sections should be collapsed below the tablet breakpoint
- mf-expand-sections-clientpref-0 is present by default on the HTML element.
- Solution should be scoped to Parsoid HTML. Should not interfere with non-Parsoid HTML.
BDD
- Feature: Collapsed Sections in Parsoid HTML
Scenario: Sections collapse by default based on user preference
Given a user is viewing Parsoid HTML on a mobile device When "expand all sections" is not selected in settings Then sections should be collapsed by default
Test Steps
On a mobile browser (make sure screen is approx 400px):
- Visit the settings page
- Make sure "expand all sections" is selected.
- Visit https://en.m.wikivoyage.org/wiki/Spain?useparsoid=1 and confirm all sections are expanded by default.
On a mobile browser (make sure screen is approx 400px):
- Visit the settings page
- Make sure "expand all sections" is not selected.
- Visit https://en.m.wikivoyage.org/wiki/Spain?useparsoid=1 and confirm all sections are collapsed by default.
Design
- Add mockups and design requirements
Communication criteria - does this need an announcement or discussion?
N/A
Rollback plan
N/A
This task was created by Version 1.2.0 of the Web team task template using phabulous
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T371539#10119572 |
| 2 | ✅ | T371539#10119572 |
QA Results - PROD
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T371539#10135991 |
| 2 | ✅ | T371539#10135991 |






