Page MenuHomePhabricator

Move annotation-removal logic out of AnnotationAction into SurfaceFragment
Open, Needs TriagePublic

Description

dm.Annotation supports a removes key which specifies other annotations that shouldn't overlap a given annotation. However, this is only respected by AnnotationAction, so it's relatively easily to accidentally ignore this. We can move it upstream into SurfaceFragment, so AnnotationAction doesn't need to know about it and more places will automatically respect it.

Related Objects

Mentioned In
T403745: ve.track module isn't loaded when launching 2017 editor on a page with discussiontools enabled
T400849: Enable "Thanks" from talk pages as an opt-in beta feature
T391521: VE: Deleting sub-ref attached to main content does not orphan other sub-refs in same article
T397145: Move footnote numbering information out of singleton document cache
T401890: Long link labels don't show ellipsis in link context on mobile
T402392: Bring basic reference functionality into VisualEditor standalone
T397518: VisualDiff should use vertical ellipsis consistenly
T302413: Visual diff of templates inside the table shows all descriptions at the bottom, in backwards order
T402717: ClipboardHandler preserves existing ImportedDataAnnotation when pasting over previously-pasted content
Mentioned Here
rGVEDa5bd08c8bc2a: Move ve.track.js into a separate module
T302413: Visual diff of templates inside the table shows all descriptions at the bottom, in backwards order
T391521: VE: Deleting sub-ref attached to main content does not orphan other sub-refs in same article
T397145: Move footnote numbering information out of singleton document cache
T397518: VisualDiff should use vertical ellipsis consistenly
T400849: Enable "Thanks" from talk pages as an opt-in beta feature
T401890: Long link labels don't show ellipsis in link context on mobile
T402392: Bring basic reference functionality into VisualEditor standalone
T402717: ClipboardHandler preserves existing ImportedDataAnnotation when pasting over previously-pasted content
T403745: ve.track module isn't loaded when launching 2017 editor on a page with discussiontools enabled

Event Timeline

Change #1184817 had a related patch set uploaded (by DLynch; author: DLynch):

[VisualEditor/VisualEditor@master] dm.SurfaceFragment: fix updating of insertion annotations

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

Change #1184818 had a related patch set uploaded (by DLynch; author: DLynch):

[VisualEditor/VisualEditor@master] dm.SurfaceFragment.test: test annotateContent

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

Change #1184819 had a related patch set uploaded (by DLynch; author: DLynch):

[VisualEditor/VisualEditor@master] SurfaceFragment: respect annotation.removes

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

Change #1184820 had a related patch set uploaded (by DLynch; author: DLynch):

[VisualEditor/VisualEditor@master] ImportedDataAnnotation: note that it should remove itself if present

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

Change #1184818 abandoned by Esanders:

[VisualEditor/VisualEditor@master] dm.SurfaceFragment.test: test annotateContent

Reason:

squashed into Ifd463502161491cc358bde94ec9e61581253daa0

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

Change #1184817 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] dm.SurfaceFragment: fix updating of insertion annotations

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

Change #1185179 had a related patch set uploaded (by DLynch; author: DLynch):

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

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

Change #1185179 merged by jenkins-bot:

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

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

Change #1185982 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.45.0-wmf.17] Update VE core submodule to master (a5bd08c8b)

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

Change #1185982 abandoned by DLynch:

[mediawiki/extensions/VisualEditor@wmf/1.45.0-wmf.17] Update VE core submodule to master (a5bd08c8b)

Reason:

Would need to do the subrepo backport anyway

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

Change #1185982 restored by DLynch:

[mediawiki/extensions/VisualEditor@wmf/1.45.0-wmf.17] Update VE core submodule to master (a5bd08c8b)

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

Change #1185982 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.45.0-wmf.17] Update VE core submodule to master (a5bd08c8b)

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

Mentioned in SAL (#wikimedia-operations) [2025-09-08T20:11:02Z] <kemayo@deploy1003> kemayo, esanders: Backport for [[gerrit:1185991|Enable DT thanks at mediawikiwiki (T400849)]], [[gerrit:1185982|Update VE core submodule to master (a5bd08c8b) (T302413 T391521 T397145 T401890 T402392 T397518 T402717 T403741 T403745)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-08T20:17:50Z] <kemayo@deploy1003> Finished scap sync-world: Backport for [[gerrit:1185991|Enable DT thanks at mediawikiwiki (T400849)]], [[gerrit:1185982|Update VE core submodule to master (a5bd08c8b) (T302413 T391521 T397145 T401890 T402392 T397518 T402717 T403741 T403745)]] (duration: 13m 05s)

Change #1184820 abandoned by Esanders:

[VisualEditor/VisualEditor@master] ImportedDataAnnotation: note that it should remove itself if present

Reason:

See I6ef87b39ca4c9726d3f1b8908ab20a4811e44e12

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