Page MenuHomePhabricator

Enforce suggestedParentNodeTypes in fixupInsertion
Closed, ResolvedPublic8 Story Points

Description

Currently suggestedParentNodeTypes is only checked during isolateAndUnwrap, which means if you try to convert a paragraph to a heading inside a list it will unwrap (the primary use case), however we should protect against other actions that would lead to headings being inserted into lists, such as copy & paste, or naive API calls (such as SurfaceFragment#insert).

parentNodeTypes is enforced during document#fixupInsertion, which is run on every transactionBuilder and is much more robust.

Event Timeline

Esanders created this task.Apr 27 2017, 5:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 27 2017, 5:27 PM
Jdforrester-WMF triaged this task as Normal priority.May 2 2017, 7:18 PM
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 8.
Esanders assigned this task to DLynch.May 26 2017, 11:55 AM

Change 361890 had a related patch set uploaded (by Jforrester; owner: DLynch):
[mediawiki/extensions/VisualEditor@master] dm.SurfaceFragment tests: exercise fixupInsertion for mwHeadings

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

Change 361888 had a related patch set uploaded (by Jforrester; owner: DLynch):
[VisualEditor/VisualEditor@master] dm.Document fixupInsertion: check suggestedParents as well

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

Change 361888 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] dm.Document fixupInsertion: check suggestedParents as well

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

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

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

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

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

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptJun 29 2017, 7:29 AM

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

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