Page MenuHomePhabricator

Support for mobile's section use cases in Parsoid HTML
Closed, DeclinedPublic

Description

Mobile web & apps both have specific requirements for section identification:

  • mobile web hides sections using a div wrapper around the entire section
  • apps scroll to sections & move infoboxes after the first text section

(mobile web / app folks: Please add details to the above!)

Once we have a better understanding of the detailed use cases we should think about how we can support these well in Parsoid HTML.

Related Objects

StatusAssignedTask
DeclinedNone
ResolvedCatrope
ResolvedSbailey
Resolved GWicke
Resolvedssastry
ResolvedNone
ResolvedDbrant
ResolvedbearND
ResolvedMholloway
ResolvedNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DuplicateNone
ResolvedJdforrester-WMF
ResolvedbearND
OpenNone
OpenNone
DeclinedNone
DuplicateNone
DeclinedNone
OpenNone
OpenNone
ResolvedArlolra
ResolvedMooeypoo
ResolvedCatrope
Resolved GWicke
OpenNone
Resolvedmarcoil
Resolvedmarcoil
Resolved GWicke
StalledNone
OpenNone
ResolvedJhernandez
ResolvedbearND
DuplicateNone
DeclinedNone
OpenNone
OpenNone
DeclinedNone
Resolvedssastry
ResolvedbearND
ResolvedbearND
ResolvedbearND
ResolvedbearND

Event Timeline

GWicke raised the priority of this task from to Needs Triage.
GWicke updated the task description. (Show Details)
GWicke changed Security from none to None.
GWicke added subscribers: GWicke, Jdlrobson, Mhurd.

In a nutshell

https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMobileFrontend.git/c6ef67a5a0b7bbef2e73ff2287545bc425ab15b9/includes%2FMobileFormatter.php explains all the customisations MobileFrontend does to the HTML from the Parser

headingTransform is the main function you'll want to look at. Essentially we find the top headings and then wrap each section in a div. In theory we could wrap all sections but since we are doing a regexp we simple do it on the top level.

This helps us use the DOM to identify where the lead section, support section collapsing (by identifying a single node that can be hidden or shown).

Arlolra triaged this task as High priority.Dec 18 2014, 8:11 PM
Arlolra added a subscriber: Arlolra.
ssastry moved this task from Backlog to Needs Discussion on the Parsoid board.Dec 20 2014, 12:48 AM
ssastry moved this task from Needs Discussion to Requests from VE/Flow/others on the Parsoid board.

Is this something we could move along during the MediaWiki hackathon in Lyon? Is there anything actionable yet?

@ssastry and @GWicke we should talk about this. This is going to be important for reading web to have in Q2.

Jhernandez lowered the priority of this task from High to Normal.May 25 2016, 4:24 PM
Jhernandez moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Jhernandez added a subscriber: Jhernandez.

To be re-analyzed, consider mcs when so.

Mholloway moved this task from Backlog to Tracking on the Mobile-Apps board.Jun 3 2016, 3:05 AM
MBinder_WMF added a subscriber: MBinder_WMF.

@Jhernandez At grooming the team wasn't sure what to do with this task. Since you were the last comment, can you describe what you think has to happen next to move it along?

I think this can be declined or merged into T78734. I've been working a lot on this in the building of https://trending.wmflabs.org/

There have been some developments related to section *editing* recently, which also triggered some thinking about the corresponding section retrieval APIs: T144104

Generally, I think key to making section retrieval APIs more useful will be to make progress on T114072: <section> tags for MediaWiki sections, which is about marking up semantic <section>s in line with the regular section edit semantics. I recently re-raised this with @ssastry, so it is on the Parsing-Team's radar.

Jdlrobson closed this task as Declined.EditedJun 16 2017, 7:18 PM

Progress can be followed in T114072

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptJun 16 2017, 7:18 PM