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
feat: add int knob #942
feat: add int knob #942
Conversation
hide 'IntKnob' from package public API
9765cea
to
87b7a64
Compare
Hi @YoussefRaafatNasry can you please take a look/review? |
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.
While this implementation is well-crafted, but we are looking into feature-parity between double
and int
knobs (i.e knobs.int.slider
, knobs.int.input
, etc.).
This will result into a lot of duplicated code between the DoubleXField
and IntXField
, so can you explore the possibility of creating a generic NumSilderField<T extends num>
and NumInputField<T extends num>
that can be used for both int
and double
knobs?
Does this mean we end up with only |
@Mastersam07 We will maintain all 6 classes ( |
Alright. Made the changes. |
remove unneccessary type definition
ccc20b8
to
4986902
Compare
@YoussefRaafatNasry please review |
@Mastersam07 Apology for this taking time, but I have it in my queue, no need to worry about it. |
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.
@YoussefRaafatNasry the conflict is due to places like this that were specified as type int
. There is no conflict with double because no variable/args is specified as type double
.
|
@Mastersam07 Nevermind the last comment. I have came up with an idea as a workaround, because I am more leaning towards the You can add a typedef at the top of the file as follows: typedef $int = int; Then we name |
Alright. Made the changes. |
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.
Another interesting PR, thanks a lot @Mastersam07 for improving Widgetbook! 💙
NumXField
.IntXField
andDoubleXField
extending genericNumXField
List of issues which are fixed by the PR
#430
Screenshots
int_knob.mov
Checklist
///
).If you need help, consider asking for advice on Discord.