Page MenuHomePhabricator

(Re-) unify data and metadata
Closed, ResolvedPublic160 Estimated Story Points

Description

Because about half the code in the DM is solely there to keep this delicate data structure together, and now that we don't need ±1 cursoring it seems like a lot of effort for nothing.

The behaviour it provides (protecting metadata from deletion) can all be done in the transaction builders, and in fact we already do this for internal lists)

Going forward this will make multi user editing a lot easier to.

That said this is going to be a massive commit.


Currently, MetaItems are stored outside the main linear data structure, in a separate meta linear data structure. This complicates the processing of linear data: transaction processing, rebasing, serialization/deserialization etc, and makes it harder to reason about document correctness. Instead:

  • Store metadata as block nodes in the main data list
  • On conversion from HTML, hoist metadata found in a content position to a legal structural position
  • On conversion back to HTML, roundtrip metadata hoisted from unmodified content branch nodes back into the original content position
  • When deleting across metadata (e.g. <p>foo[-</p><meta/><p>-]bar</p>), hoist metadata to a legal structural position as necessary

Related Objects

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:59 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz54299.
Jdforrester-WMF lowered the priority of this task from High to Medium.Feb 24 2015, 10:14 PM
Jdforrester-WMF added a project: Epic.
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.

We now have ve.dm.Node.static.isDeletable.

Esanders renamed this task from VisualEditor: Reunify data and metadata to (Re-) unify data and metadata.May 22 2016, 4:59 PM

Change 314568 had a related patch set uploaded (by Jforrester):
Store metadata as block nodes in the main data list

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

Change 314568 merged by jenkins-bot:
Store metadata as block nodes in the main data list

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

Change 336899 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (0dfc50a88)

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

Change 336925 had a related patch set uploaded (by Jforrester):
[BREAKING CHANGE] Store metadata as block nodes in the main data list

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

Change 385492 had a related patch set uploaded (by Divec; owner: Divec):
[VisualEditor/VisualEditor@master] WIP: [BREAKING CHANGE] Store metadata as block nodes in the main data list

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

Change 336925 abandoned by Divec:
WIP: [BREAKING CHANGE] Store metadata as block nodes in the main data list

Reason:
Moved to Ib5174b0dcba1c24f44d889e08140bee31a064011

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

Change 336929 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] [WIP] [PULLTHROUGH] MW changes for the meta-data inlining commit

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

Change 385492 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] [BREAKING CHANGE] Store metadata as block nodes in the main data list

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

Change 405751 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (67548dc57)

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

Change 405751 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (c5fddd508)

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

Jdforrester-WMF changed the point value for this task from 160 to 0.Jan 30 2018, 5:51 PM
Jdforrester-WMF changed the point value for this task from 0 to 160.