Page MenuHomePhabricator

[Epic] Find solution to avoid "orphaning" a subreference when a parent reference is deleted in VE
Open, HighPublic

Description

VisualEditor requirement (T245299):

  • As someone editing a sub-reference in VE, you should not be able to accidentally "orphan" sub-references by deleting their parent reference

User Story:
As an article editor editing in VE
I want to be able to delete a chunk of text in an article that includes a parent reference without breaking subreferences elsewhere in the text
So that I don’t “orphan” subreferences accidentally

Proposed implementation (tbc):
Move parent reference content into a list-defined reference when the usage is deleted. There’s a precedent: when deleting a reused reference which included the reference body, VE rescues the content out of the main reference and moves it into the first reference that reuses it, so it might be possible to apply a similar approach to subreferences.

Sub-tickets needed:

  • What happens when I cut and paste a ref and temporarily break the connection?
    • This already works!
    • As of now the rendering of the children changes and they appear as if they are normal (parent) refs. A first step should be to make this rendering consistent and still render them as children, plus some placeholder for the parent.
  • What about wikis where the MOS (manual of style) dictates to use a template like {{reflist}}?
    • Does it make sense to hard-code knowledge about this template in VE? What if the template behaves different on other wikis, or changes in the future?
    • An incremental step towards a sane solution could be this: The user can delete the parent. VE knows it needs to move it to somewhere else, but can't (yet) move it to the reflist template. Instead it moves the parent right next to the first child, resulting in double footnote markers like [1][1.1].
    • An alternative is to auto-merge the parent into all children. This gets rid of all extends.
  • In articles that already contain a plain <references /> at the end we can just move the ref down.

Event Timeline

Lena_WMDE renamed this task from Find solution to avoid "orphaning" a subreference when a parent reference is deleted to Find solution to avoid "orphaning" a subreference when a parent reference is deleted in VE.Mar 18 2020, 8:31 AM
Lena_WMDE set the point value for this task to 8.
Lena_WMDE moved this task from Backlog to Default version backlog on the Cite-Extends board.
thiemowmde updated the task description. (Show Details)
thiemowmde added subscribers: WMDE-Fisch, awight, thiemowmde and 2 others.

One of the possibilities we discussed is to *allow* the orphaning to happen, but to then show warnings about this condition, eg. in the reflist. The task title should be tweaked to reflect this.

WMDE-Fisch renamed this task from Find solution to avoid "orphaning" a subreference when a parent reference is deleted in VE to [Epic] Find solution to avoid "orphaning" a subreference when a parent reference is deleted in VE.Fri, Dec 20, 1:06 PM
WMDE-Fisch moved this task from Ready for pickup to Epics on the WMDE-References-FocusArea board.