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 in the ContextItem
- T415524: [Refactor] Show main content in the ReferenceSearchWidget of a sub-ref node without relying on a main node
- T415525: [Refactor] Show main content in the ReferencesList of a sub-ref node without relying on a main node
- T406022: [Refactor] Allow editing main content in the ReferenceDialog of a sub-ref node without relying on a main node
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