Same as T385666: Show references with the same details as re-use in the legacy rendering (Merge Use Case) but for VE
Context
VE already supports the concept of re-uses and that's not excluding sub-references per se. If nodes share the same listKey they are regarded as reuse. Currently using copy and paste on a sub-ref creates a VE reuse using the same listKey. To align the whole experience to this concept there are a few steps needed still:
Technical Implementation
- Using the reuse tab on sub-refs needs to create a reuse in VE where the resulting node uses the same listKey https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/1200367
- Same as above must be made sure for Citoid https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Citoid/+/1201039
- When loading VE we must check for identical sub-refs and might need to compare the content of existing sub-refs for the same mainKey. This can be done by comparing the refListItemIds of the incoming nodes. The same listKey and index should be used on the identical sub-refs then. VE: Merge identical sub-refs based in reflistItemId
Out of scope
- When adding details to an existing ref we need to check for duplicate content on existing sub-refs for the mainKey. We might solve that later.
- Editing can also lead to a reuse. We might solve that later.
Open question
- How to make sure all existing ones are checked when opening an article page in VE? Solved by using the Converter state
- Does it make sense to solve Parsoid reuse first before handling the loading of refs here? Not really a hard dependency.