https://bugzilla.wikimedia.org/show_bug.cgi?id=72404
Bug ID: 72404
Summary: VisualEditor: Move default value and autoValue code
from MWParameterPage (UI) to MWParameterModel (DM)
Product: VisualEditor
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
Severity: normal
Priority: Unprioritized
Component: Technical Debt
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Web browser: ---
Mobile Platform: ---
Half of dm.MWParameterModel is dedicated to looking things up in the parent
template's spec. Despite that, ui.MWParameterPage manually looks up the default
value and autoValue because there are no getters in dm.MWParameterModel for
those things, for no good reason whatsoever. Those getters should be added.
What's even worse is the "if there is no real value, set the value to the
autoValue" logic (added in https://gerrit.wikimedia.org/r/168204 ). Currently
this logic (which is fundamentally DM logic) is in ui.ParameterPage as well.
Instead, MWParameterPage.getValue() should be smart enough to return either the
real value or the autoValue if there is no real value.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l