intel / rib

Rapid Interface Builder (RIB) is a browser-based design tool for quickly prototyping and creating the user interface for web applications. Layout your UI by dropping widgets onto a canvas. Run the UI in an interactive "Preview mode". Export the generated HTML and Javascript. It's that simple!
https://01.org/rib
Apache License 2.0
148 stars 74 forks source link

[Property View] Fix bug: Two types of form widget are used for Grid's integer properties #270

Closed zhizhangchen closed 12 years ago

zhizhangchen commented 12 years ago

Rebased for #262

grgustaf commented 12 years ago

It's weird to create the need to parse a range, and also lose some flexibility. Better to have a separate min and max. Then you can leave one off if you like. I'll probably just make that change myself, but noting it here in case I don't get to it.

grgustaf commented 12 years ago

This patch breaks integers that do not have a range, such as the "width" property on the Image widget.

I would prefer that getPropertyRange return an object: { minimum: 2, maximum 5 }. This would also allow flexibility like: { minimum: 1 } (i.e., no maximum)... which we might use for Grid rows if we fix the performance issues.

Replace the "range:" field within widget definitions with "minimum:" and "maximum:".

Also put in the comments that this is only defined for integer properties currently.

zhizhangchen commented 12 years ago

Updated using { min: 2, max: 5} as range