Last modified: 2014-06-28 23:24:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52505, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50505 - VisualEditor: Share ref / references re-rendering code with Parsoid
VisualEditor: Share ref / references re-rendering code with Parsoid
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: High enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-01 17:16 UTC by Gabriel Wicke
Modified: 2014-06-28 23:24 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2013-07-01 17:16:46 UTC

    
Comment 1 Gabriel Wicke 2013-07-01 17:18:38 UTC
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.
Comment 2 Gabriel Wicke 2013-07-01 17:21:55 UTC
Possibly also relevant for bug 50474, in case that turns out to be hard to fix in your current implementation.
Comment 3 Roan Kattouw 2013-07-01 17:34:42 UTC
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.
Comment 4 Gabriel Wicke 2013-07-01 20:44:48 UTC
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.
Comment 5 Krinkle 2013-07-01 20:58:37 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links