Parsoid/Content widgets

Goals

edit
  • Separate data from presentation
    • Data ideally in WikiData or a similar repository, lets us use this data in other contexts
    • Exploit type information on data for automatic default formatting. Example: birth date -> age
  • Enable a better editing experience
    • VE integration
  • Provide compelling alternatives for current use cases of unbalanced templates
  • Enable adaptive rendering in different skins, mobile & apps

Syntax

edit

One option is to represent this as an extension tag with parameters and possibly the ability to define inline data as JSON.

Strawman wikitext syntax:

<datatable src="wikidata:query-383190" options="..."/>

With inline data:

<datatable options="...">{ .. inline JSON data .. }</datatable>

Candidate use cases

edit

See also

edit
  • Lua Chart module
  • Declarative infoboxes @Wikia: Inez of Wikia just showed me a nifty infobox widget preview tool he built. They are gradually replacing infobox templates with these widgets under the hood by editing the templates themselves. The transclusions themselves are not changing at all. They are doing this in cooperation with the community, and provide migration tools based on heuristics on template parameters and typical values (ex: parameters whose value normally starts with Image: are rendered as images). The primary focus is on moving towards a declarative infobox widget definition, as a first step towards inline editing and flexible styling across different devices. See also this announcement thread.
  • Infobox builder - creates an "infobox template without writing a single line of code. You can build your infobox from elements like title, row, image and section separator".