For wider distribution!

---------- Forwarded message ----------
From: Jon Robson <jdlrob...@gmail.com>
Date: Tue, Apr 23, 2013 at 5:13 AM
Subject: [WikimediaMobile] Rethinking MobileFormatter / Skins
To: mobile-l <mobil...@lists.wikimedia.org>


I've been playing around with skins a lot recently. The MobileFrontend
extension has had to do various transformations to the content
pre-rendering to ensure certain things do not get rendered on mobile
(for example table of contents) as well as allow us to do collapsible
sections.

When rendering content skins are currently limited to rendering the
'bodytext' key. They cannot retrieve the underlying content. I would
like to remove restrictions to skin designers - for instance currently
a skin designer has no control over where the table of contents should
do. They could not easily put it in a side bar for instance.

I was experimenting with using the onOutputPageParserOutput hook [1]
(running based on the current skin) and think it might be a better
approach to run the transformations on smaller chunks of data. For
instance the table of contents is known to be in the lead section so
it seems like it would be more efficient to look for it there rather
than throughout the entire document. The solution is not complete but
provides an approach that I think would be more efficient on the long
term.

It seems like a good idea to experiment with this approach in
MobileFrontend extension with the goal to upstream it to core.

Would appreciate comments from people who know this area of code
rather well - Max comes to mind :)

Thoughts welcomed!

[1] https://gist.github.com/jdlrobson/5439509

_______________________________________________
Mobile-l mailing list
mobil...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mobile-l


--
Yuvi Panda T
http://yuvi.in/blog

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to