Abstract more selection handling by selection type
Open, NormalPublic8 Story Points

Description

Methods such as ve.ce.Surface#focus and handleInsertion should be less aware of selection types.

In general anywhere we write selection instanceof ve.(dm|ce).SomeTypeOfSelection.js, we should probably be rewriting that as selection.hasSomeProperty().

Esanders created this task.Dec 13 2015, 4:22 PM
Esanders updated the task description. (Show Details)
Esanders raised the priority of this task from to Normal.
Esanders added subscribers: gerritbot, Esanders, Aklapper.

Change 258756 had a related patch set uploaded (by Esanders):
ve.ce.Selection: Introduce isFocusedNode && isNativeCursor methods

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

Change 258756 merged by jenkins-bot:
ve.ce.Selection: Introduce isFocusedNode && isNativeCursor methods

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

Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF removed a project: Patch-For-Review.
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.

Change 270776 had a related patch set uploaded (by Esanders):
Move selection directionality to ve.ce.Selection

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

Change 270776 merged by jenkins-bot:
Move selection directionality to ve.ce.Selection

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

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Still stuff to do, according to Ed.

Jdforrester-WMF removed Esanders as the assignee of this task.Mar 25 2017, 3:22 AM
Deskana moved this task from TR0: Interrupt to Backlog on the VisualEditor board.Oct 13 2017, 11:55 AM

Change 408316 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Use .isNull check for NullSelection

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

Esanders updated the task description. (Show Details)Feb 6 2018, 2:04 PM

Change 408316 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Use .isNull check for NullSelection

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

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

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

With that merged, there are still 30 instanceof calls in ve.ce.Surface.js. How many is "done"?

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

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