Description
Details
- Reference
- bz50505
Related Objects
Event Timeline
Sorry, somehow managed to hit return.
We have a relatively complete DOM-based references rendering implementation in Parsoid that could be reused by VisualEditor. This would avoid us implementing two versions of essentially the same code, and with combined effort should result in a better implementation.
Possibly also relevant for bug 50474, in case that turns out to be hard to fix in your current implementation.
Parsoid gives us a DOM with references already numbered, so we probably want to use their numbering and reference list as a base, then update that as required.
I would not recommend to hack something around the numbering we give you. We should rather share the ref / references rendering code so that you can simply call that code to fully renumber refs and re-render the references blocks.
Indeed, basically the logic we currently have (or call from) ve.ce.MWReferenceListNode and ve.ce.MWReferenceNode. Converting data-mw into a the dom as it should be given to the browser (html tag name, class name, children composition and attributes etc.). And for ref nodes the sequence between different ones as well. Though VE may have to run the logic more often (where parsoid presumably only runs it once per document) it'd be nice to share this logic.
The HTML rendered by MediaWiki extension tags and/or parser functions should not be hardcoded in VE. Perhaps in a VE plugin, but since it'd be the same for Parsoid as for VE, it'd be nice if this can be shared so that a MediaWiki extension that wants to have logic for Parsoid/VE only needs 1 type of plugin that both can use.
Is this exact task still going to happen given PHP Parsoid? (One system being Javascript and the other PHP now.)