Page MenuHomePhabricator

[Epic] Use InternalItems only instead of synthetic LDRs to store content for sub-refs
Open, In Progress, Needs TriagePublic

Description

Context

This is meant as an umbrella ticket to manage WMDE-TechWish 's refactoring work in Cite and VE, to use InternalList items rather than "synthetic list-defined main refs" for Sub-referencing (product board) features. The items added here are the result of discussions on how we can better handle the data that's relevant for creating, reusing, deleting and converting MWReferenceNodes in the #Cites VE integration.

We identified the need to store references more independently of the MWReferenceNodes. The reference nodes are very close to <ref> tags in wikitext and will only appear once in the document when a ref or a main+details occurs, or once in the references list. This has become a problem when communicating between Parsoid and VE, and when deleting references that have a sub- and main-ref dependency. Making more use of the InternalItemNode and InternalList for that would help a lot in these use cases.

See T411856: [Epic] Avoid unintended content loss due the usage of synthetic ldr's

Goals

Acceptance criteria

  • Make sure content of deleted (main) nodes can still be found using the InternalNodeItems
  • Use the content from the InternalNodeItems to render the content of main nodes (deleted or not) when looking them up from subref nodes
  • Use the content from the InternalNodeItems when serializing main+details nodes to Parsoid DOM if the (original) main node was deleted at some point
  • Make sure that it's still possible to edit the main content from the context items
  • Preview of the sub-reference still includes main ref content.
  • References list still shows main ref, deleted or not.

Refactoring

  • Implement a sustainable way how InternalItemNodes can be accessed even if there's no distinct "main" MWReferenceNode

WIP

https://docs.google.com/document/d/13ZScENROJkVj1J-PJjF2qgVLtTg5TgEO7meguT9v724/edit?tab=t.q8g9ceit3aom#heading=h.dmy7uhvasd4o

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenBUG REPORTNone
OpenBUG REPORTNone
In ProgressNone
DuplicateNone
DeclinedNone
Resolvedawight
InvalidNone
InvalidNone
Resolvedawight
DuplicateNone
DeclinedNone
OpenNone
OpenNone
DeclinedNone
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
OpenNone
DeclinedSpikeNone
OpenNone
StalledSpikeNone
ResolvedNone
OpenNone
OpenWMDE-Fisch
StalledNone
OpenNone
OpenNone
OpenWMDE-Fisch
OpenNone
OpenNone
OpenNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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

[VisualEditor/VisualEditor@master] Make some of the new InternalListNodeGroup methods @private

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

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

[VisualEditor/VisualEditor@master] Optimize/document ve.dm.InternalListNodeGroup implementation

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

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

[mediawiki/extensions/Cite@master] Replace deprecated InternalList method

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

Change #1181114 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Replace deprecated InternalList method

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

WMDE-Fisch renamed this task from [Epic] Improve the InternalList to help managing references in VE to [Epic] Use InternalItems only instead of synthetic LDRs to store content for sub-refs.Sep 30 2025, 10:47 AM
WMDE-Fisch updated the task description. (Show Details)
Johannes_Richter_WMDE removed Due Date which was set to Wed, Jan 21, 9:00 PM.Fri, Jan 23, 12:05 PM
mikez-WMF changed the task status from Open to In Progress.Fri, Feb 13, 2:33 PM
mikez-WMF added a project: Community-Wishlist.
mikez-WMF moved this task from Backlog to In Progress on the Community-Wishlist board.