-
Notifications
You must be signed in to change notification settings - Fork 339
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
All prop sequencing #48
Conversation
…lator, sanitizer and a value mutator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this PR! Adds a bunch of features in one go! I added a few comments which are all minor changes.
if (typeof defaultValue !== 'number') { | ||
|
||
if ( | ||
typeof defaultValue !== 'number' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do we need to explicitly check for a number type here now? Because I think we offloaded that responsibility to the prop types, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do, as no prop config on the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a bug with the tests then, so we should fix this where the tests are defined
theatre/studio/src/panels/DetailPanel/propEditors/ColorPropEditor.tsx
Outdated
Show resolved
Hide resolved
…w done when the value is called.
Allows sequencing of all prop types, with the ability to override the interpolator. (including compound types, but not supported by the studio yet)
For a value to be sequencable, it needs to either be a number, or implement the functions: Sanitize & Interpolate. which by default, String and Compound types don't do, as I can't interpret the general usage for those types. so I've left it up to the user.
Colours are done using TinyColor2 thanks to Tom for reminding me not only hex colours exist!