Skip to content

Improve handling of default values #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2015
Merged

Improve handling of default values #11

merged 1 commit into from
May 1, 2015

Conversation

hinerm
Copy link
Member

@hinerm hinerm commented Apr 30, 2015

This change leans on the new ModuleService#getDefaultValue(ModuleItem) method, which is smarter about default value computation across the board. It avoids the pitfall of bounding min/max using the widget model's min and max—which fall back to the numeric type's min/max values for the purposes of bounding the widget—and instead uses the ModuleItem's stated default/min/max, or a default converted from "0" if none.

@ctrueden ctrueden changed the title DO NOT MERGE Improve handling of default values Apr 30, 2015
This change leans on the new ModuleService#getDefaultValue(ModuleItem)
method, which is smarter about default value computation across the
board. It avoids the pitfall of bounding min/max using the widget
model's min and max -- which fall back to the numeric type's min/max
values for the purposes of bounding the widget -- and instead uses the
ModuleItem's stated min/max, or a default converted from "0" if none.
@hinerm hinerm force-pushed the default-values branch from b1bfe66 to 7dc0af5 Compare May 1, 2015 16:54
@hinerm hinerm merged commit 7dc0af5 into master May 1, 2015
@ctrueden ctrueden deleted the default-values branch May 1, 2015 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants