Page MenuHomePhabricator

[Epic] VisualEditor must stop relying on synthetic LDRs to access main content
Open, Needs TriagePublic

Description

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.

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

Related Objects

Event Timeline

Change #1194659 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Cite@master] [refactor] Don't count synthetic refs when placing body

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

Change #1194658 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Cite@master] [refactor] Can render a reflist item without ref node

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

awight renamed this task from [refactor] Visual Editor can avoid orphaning subrefs, without using synthetic ref to [refactor] Visual Editor must stop relying on synthetic ref.Oct 9 2025, 2:05 PM
awight updated the task description. (Show Details)

Change #1196434 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Cite@master] [refactor] references list uses internal item

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

Change #1196452 had a related patch set uploaded (by Awight; author: Awight):

[VisualEditor/VisualEditor@master] Maintain keyIndexes when rebuilding InternalList

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

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

[VisualEditor/VisualEditor@master] Add missing listIndex to "stubReference" test setup

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

Change #1196452 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Maintain keyIndexes when rebuilding InternalList

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

Update: 20c4837bc23a2 is merged and now we're waiting for the next VisualEditor/lib/ve submodule bump.

Change #1197291 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (20c4837bc)

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

Change #1197667 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (6caeeb2e4)

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

The attempted submodule bump revealed test failures in the Cite extension bisecting to this change :( Reverted for now via https://gerrit.wikimedia.org/r/c/VisualEditor/VisualEditor/+/1197674

Change #1197291 abandoned by DLynch:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (20c4837bc)

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

Change #1198544 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] VE: Improve MWReferenceModel QUnit reuse test

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

Change #1198980 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] VE: Add MWReferenceModel QUnit test for internal item updates

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

Change #1199001 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] VE: Simplify ve.dm.Transaction test runner

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

Change #1199001 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] VE: Simplify ve.dm.Transaction test runner

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

Change #1202126 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[VisualEditor/VisualEditor@master] Maintain keyIndexes when rebuilding InternalList

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

Change #1196863 abandoned by Thiemo Kreuz (WMDE):

[VisualEditor/VisualEditor@master] Add missing listIndex to "stubReference" test setup

Reason:

Done again as part of I9d9a60f.

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

Change #1202126 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Maintain keyIndexes when rebuilding InternalList

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

Change #1212557 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (4b7ec1130)

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

Change #1212557 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (4b7ec1130)

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

WMDE-Fisch renamed this task from [refactor] Visual Editor must stop relying on synthetic ref to [Epic] VisualEditor must stop relying on synthetic LDRs to access main content.Tue, Jan 27, 12:51 PM
WMDE-Fisch updated the task description. (Show Details)