Context
In VE we're currently relying in synthetic LDRs to access the main content of sub-refs. The synthetic MWReferenceNodes currently seem to be needed in some places to guarantee that we can access the InternalItemNodes storing the main content.
Task
The task is done, when all the accessors of main content from sub-refs can retrieve that content without relying on the presence of MWReferenceNodes using that content as their main content.
- T415523: [Refactor] Add helper method to retrieve InternalItems for content and use it
- T415524: [Refactor] Render search results withouth relying on `mainRefKey` in MWReferenceSearchWidget
- T415525: [Refactor] Render reference list withouth relying on `mainRefKey` in dm/ce.MWReferencesListNode
- T406022: [Refactor] Work on content in the MWReferenceEditPanel without relying in `mainRefKey` or mainNodes
Implementation
The goal is that wherever we need to retrieve the main content using the mainRefKey we can use internalList.getKeyIndex( group, key ) to get to the to InternalItemNode. See also https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/1194657/6