Page MenuHomePhabricator

Cite: Hardcoded 'mwReference' name makes subclassing difficult
Open, Needs TriagePublic

Description

The 'mwReference' static name property of ve.dm.MWReference class is used in related classes as hardcoded value as seen in https://codesearch.wmflabs.org/extensions/?q=mwReference&i=nope&files=&repos=

This makes subclassing of ve.dm.MWReferenceNode with a different name difficult. The associated inspectors stop working, and the code breaks in number of places. Example: https://phabricator.wikimedia.org/T203160#4738735

Event Timeline

I don't know a lot about CX integration, so I'm sorry if this is a silly idea. But would it be possible to unregister ve.dm.MWReferenceNode from the model registry, and instead register your ve.dm.CXReferenceNode under the name 'mwReference'?