Apologies if you can here via a link which promised "some of my own ideas": this is a work in progress, and more of a collection of outline topics and notes-to-self than a coherent proposal for now. But if you're interested, contact me and I can probably spin these into a proper proposal.
Not just "the data object for an article" and "the code module for an article" but also "the layout" for an article -- and make this extensible! In some sense this is what "subpage" is for, but I want better UX and tabs and maybe orthogonal axes, although we can get pretty far with [[ArticleTitle/code/doc/es]]
(the spanish translation of the documentation for the code module for article ArticleTitle
). (Isn't this just Multi-Content Revisions?)
Any new template mechanism must be powerful/compatible enough to completely replace one of our four-ish existing mechanisms. We can't just keep building new things, we must provide some transition mechanism (build incrementally, or provide translators, or...) that would prevent this from just adding "one more (unmaintained) template mechanism" to MediaWiki.
Composition *should not* be turing-complete! (But it's so easy to make a turing-complete system without trying hard...)
Each fragment renderer should be able to register dependencies in a uniform manner, aka generate an appropriate hash key for memoization; also register time-dependency, indeterminancy, etc. WRT args and return types of fragment generators, see below.
Regarding the four "types of types":
{{#function}}
may take an argument of a wikifunction type, or a Q id, etc, and VisualEditor should be able to present a rich input widget for that type.In the near-term, we'll introduce a new "structured argument" type of parser function argument; see below.
SFD_STRUCTURED_ARGS
type for parser functions. This accepts as parameter and returns as result a more-or-less opaque Arg
type with toString
and toJsonArray
methods.
toJsonArray
method should return a pretty flexible associative array with a _type_
(or @context
, or...) property at top level. We can incrementally extend the set of types supported, to support the various types described above; but the primary initial goal is that we don't stringify the opaque type unnecessarily if you compose fragments, eg {{#function:foo|{{#function:bar}}}}