You both are pointing out the real challenge here: The inline content. 

The good news is that we don't have to worry about the wiki text or templates. Parsoid already has dealt with that and is providing additional markup. This makes it possible to do a 2 way conversion between HTML<->Wikitext for VE. The goal is to build upon that work to the same thing with "ParsoidHTML"->JSON. 

The hope is that if the markup provided by Parsoid is enough to allow VE to do the 2 way conversion, there should be enough information for us do at least a 1 way conversion into JSON without loosing data. 

Beyond using the markup to translate the HTML into JSON, we also have to figure out how to actually represent that in JSON. Especially for inline entities. Also, we have questions about wether we should still use a subset of HTML to describe the text styles (like bold, italics, etc…) The definition of the article JSON spec may be just as challenging as the actual engineering work.

On Thu, Jun 11, 2015 at 9:51 PM, Gergo Tisza <gtisza@wikimedia.org> wrote:
On Thu, Jun 11, 2015 at 6:14 PM, S Page <spage@wikimedia.org> wrote:

In the case of entities existing within a paragraph, we can decide (with a little help from Design) whether it's important to keep them inline with the text, or strip and move them outside of the paragraph.

Will clients be able to request different kinds of stripping? It seems really hard.

It's even harder if you want it to work outside the English Wikipedia - different wikis might use different templates which generate slightly different HTML.

The skinnable content snippets proposal from the brainstorming could be abused to handle this:
** Explore the possibility of wikitext markup for handling over control over sections of content to the skin (like https://phabricator.wikimedia.org/T25796 but bigger / more generic; Winter had some great design ideas that could be implemented with such a feature)

Editors would write something like this in the source code:
'''Vincent Willem van Gogh''' {{#snippet|role=pronunciation|IPA=ˈvɪnsɛnt ˈʋɪləm vɑn ˈɣɔx}}{{#snippet|role=birth and death|birth=30 March 1853|death=29 July 1890}} was a major [[Post-Impressionist]] painter.
and the snippets would turn into different templates on different devices/skins, in some cases not producing wikicode output at all but instead pushing the information to a side channel.

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




--
Corey Floyd
Software Engineer 
Mobile Apps / iOS 
Wikimedia Foundation