Page MenuHomePhabricator

Streamline InternalList properties used for mapping references
Open, Needs TriagePublic

Description

Context

ve.dm.InternalList currently maintains at least two properties used to map indexes with listKeys. ve.dm.InternalList.keys and ve.dm.InternalList.keyIndexes. Since we want to introduce a new mechanism to map MWReferenceNodes with InternalItemNodes we're revisiting what's actually useful here.

Insights

ve.dm.InternalList.keys seems to be incomplete and thereby useless because it's only used with the listKey and not the listGroup and is therby not a useful map.
ve.dm.InternalList.keyIndexes seems only relevant in two places

  • when the Convert adds InternalItemNodes for references in ve.dm.InternalList.queueItemHtml
  • when two InternalLists are merged in ve.dm.InternalList.merge
Task
  • Deprecate ve.dm.InternalList.keys
  • Investigate if ve.dm.InternalList.keyIndexes is relevant in the merge case
  • Potentially deprecate keyIndexes

Event Timeline

Change #1236757 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[VisualEditor/VisualEditor@master] Remove unused InternalList.keys property

https://gerrit.wikimedia.org/r/1236757

Change #1236790 had a related patch set uploaded (by WMDE-Fisch; author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Stop reading duplicate InternalList.keys data structure

https://gerrit.wikimedia.org/r/1236790

Change #1237164 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[VisualEditor/VisualEditor@master] Track if keyIndexes are used on InternaList.merge()

https://gerrit.wikimedia.org/r/1237164

Change #1236790 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Stop reading duplicate InternalList.keys data structure

https://gerrit.wikimedia.org/r/1236790

Change #1237308 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[VisualEditor/VisualEditor@master] Document that NodeGroup.indexOrder not correlates with listIndex

https://gerrit.wikimedia.org/r/1237308

Change #1237869 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Revert "VE: Change ve.dm.Transaction.test to cover input from copy and paste"

https://gerrit.wikimedia.org/r/1237869

Change #1237869 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Revert "VE: Change ve.dm.Transaction.test to cover input from copy and paste"

https://gerrit.wikimedia.org/r/1237869

Change #1237308 abandoned by WMDE-Fisch:

[VisualEditor/VisualEditor@master] Document that NodeGroup.indexOrder does not relate to listIndex

Reason:

A had a few more pokes here and I think it is actually usable to get the order if the first appearance of a "node using a listIndex". So my comment is invalid.

https://gerrit.wikimedia.org/r/1237308

Change #1236757 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Remove unused InternalList.keys property

https://gerrit.wikimedia.org/r/1236757

Change #1237164 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Track if keyIndexes are used on InternaList.merge()

https://gerrit.wikimedia.org/r/1237164

Change #1217218 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (17a600756)

https://gerrit.wikimedia.org/r/1217218

Change #1217218 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (17a600756)

https://gerrit.wikimedia.org/r/1217218