Page MenuHomePhabricator

VisualEditor: this.referenceSurface should be a Surface, not a SurfaceWidget
Closed, ResolvedPublic

Description

In ve.ui.MWReferenceDialog, this.referenceSurface changed from being a Surface to a SurfaceWidget. I noticed this because I rebased some old code that used this.referenceSurface.getModel() and broke, but this seems to have happened a while ago with the introduction of SurfaceWidget.

When a variable name is 'fooSurface', it should be a Surface, not something else. In particular, you shouldn't have to do this.referenceSurface.getSurface() to get the surface.

The same applies to this.captionSurface in ve.ui.MWMediaEditDialog.


Version: unspecified
Severity: enhancement

Details

Reference
bz54588

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:13 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz54588.
Esanders claimed this task.
Esanders subscribed.

These are now fooTarget instace of TargetWidget, however TargetWidget behaves like target, not a target wrapper, so this bug is resolved.