Last modified: 2014-10-27 18:17:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74404, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72404 - VisualEditor: Move default value and autoValue code from MWParameterPage (UI) to MWParameterModel (DM)
VisualEditor: Move default value and autoValue code from MWParameterPage (UI)...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: Normal enhancement
: VE-deploy-2014-10-29 (1.25wmf6)
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-22 23:07 UTC by Roan Kattouw
Modified: 2014-10-27 18:17 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2014-10-22 23:07:04 UTC
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.
Comment 1 Alex Monk 2014-10-26 15:21:08 UTC
(In reply to Roan Kattouw from comment #0)
> Instead, MWParameterPage.getValue() should be
> smart enough to return either the real value or the autoValue if there is no
> real value.

MWParameterModel.getValue()?
Comment 2 Gerrit Notification Bot 2014-10-27 03:32:52 UTC
Change 168926 had a related patch set uploaded by Alex Monk:
Move autoValue logic from ui.MWParameterPage to dm.MWParameterModel

https://gerrit.wikimedia.org/r/168926
Comment 3 Gerrit Notification Bot 2014-10-27 18:15:10 UTC
Change 168926 merged by jenkins-bot:
Move autoValue logic from ui.MWParameterPage to dm.MWParameterModel

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links