hedron
hedron copied to clipboard
Allow values above 1 and below 0 for param display
Currently, param values only ever display between 0 and 1. While this simple approach has worked for some time, the limitations are starting to become apparent. With min and max values now configurable, the values displayed between 0 and 1 don't make quite as much sense.
For instance, you may have a value between -1 and 1. In this case, 0 would be displayed as 0.5. This isn't very transparent. I'm proposing we display the actual values in these instances. This will also have an effect on the defaultValue
, defaultMin
and defaultMax
config settings:
{
key: 'fooBar',
defaultValue: 0.5, // This will become 0
defaultMin: -1,
defaultMax: 1,
},
The main issues with this new approach:
- Displaying large numbers and negative numbers may break the design
- We need to consider whether we still store the values as their actual values or keep them as values between 0 and 1 just transform them to display nicely for the user.
@cale-bradbury I'd be interested in your thoughts on this. I know you had similar opinions a while ago.
I think (sadly) that both make sense, in some cases we would want to display the normalized value, with others the real value.
I think the answer is to add a displayNormalized
property
That makes sense! It could be checkbox in the advanced section and a defaultDisplayNormalized
property in the config. Would this setting affect how the 'defaultValue' behaves also? I'm assuming not.
I think it's safe to not, your controllers default state will be with knobs and sliders at 0, 1, or .5, so I think it makes sense that people would design sketches to similarly look best at one of these values. That said, this could also cause confusion at first to sketch makers