Page MenuHomePhabricator

[Refactor] Rebuild methods in ve.dm.MWGroupReferences to work with `listIndex` instead of `listKey`
Open, Needs TriagePublic

Description

Context

At some point we introduced ve.dm.MWGroupReferences to provide helper methods that can be used get footnote numbers or the list of references in order. These methods are used in several places of the code to render UI elements.

When we want to move away from listKey but give listIndex more responsibility we need to make sure that these methods can also work based on that property.

Task
  • Evaluate how we can make sure that
  • getTopLevelKeysInReflistOrder
  • getAllRefsInReflistOrder
  • getIndexLabel
  • getSubrefs

can be used also with a listIndex.

  • Add fallbacks for using listKey to track if we're missing something.