Page MenuHomePhabricator

MobileFrontend's expandable sections should be pure-JS
Closed, ResolvedPublic

Description

Currently, this is done in PHP with supporting JS code for expanding. Not only this results in people with phones that WURFL detects as supporting JS, but in which JS is manually disabled not being able to read the collasped sections, but it also fragments cache.

Ideally, JS should do all the work which will also provide a nice fallback for phones without JS - no JS, no collapsed sections.


Version: unspecified
Severity: enhancement

Details

Reference
bz34422

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:16 AM
bzimport set Reference to bz34422.
bzimport added a subscriber: Unknown Object (MLST).

bug 34025 looks like a dupe of this; there's some notes on how to accomplish it without text flashing.

bug 31011 requests sorta the opposite: avoid loading section contents at all until they're opened, to reduce data consumption when all sections aren't used.

What I'm asking for is to have page HTML not depend on JS presence, while bug 34025 discusses the particular case of JS disabled in a JS-aware browser.

Unless I'm misunderstanding do r111733 and r111651 take care of this?

(In reply to comment #3)

Unless I'm misunderstanding do r111733 and r111651 take care of this?

They're steps in the right direction, but ideally PHP shouldn't know at all if user agent supports JS or not - that is, the buttons should be generated in JS too.