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

StatusSubtypeAssignedTask
DeclinedNone
ResolvedCatrope
ResolvedSbailey
OpenReleaseNone
OpenNone
OpenNone
Resolved GWicke
ResolvedNone
Resolvedssastry
ResolvedDbrant
Resolved bearND
Resolved Mholloway
ResolvedNone
OpenNone
OpenFeatureNone
OpenNone
ResolvedArlolra
ResolvedMooeypoo
ResolvedCatrope
Resolved GWicke
ResolvedArlolra
Resolved marcoil
Resolved marcoil
Resolved GWicke
DeclinedNone
ResolvedJdforrester-WMF
DuplicateNone
Resolved bearND
OpenNone
ResolvedArlolra
DeclinedNone
DuplicateNone
ResolvedNone
Resolved Jhernandez
Resolved bearND
DuplicateNone
DeclinedNone
DeclinedNone
DeclinedNone
DeclinedNone
Resolvedssastry
Resolved bearND
Resolved bearND
Resolved bearND
Resolved bearND

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 subscribed.

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 Medium.May 25 2016, 4:24 PM
Jhernandez moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.
Jhernandez subscribed.

To be re-analyzed, consider mcs when so.

MBinder_WMF subscribed.

@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--ARCHIVED's radar.

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

Progress can be followed in T114072