Skip to content
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

Feature/knob #2701

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Feature/knob #2701

wants to merge 2 commits into from

Conversation

Immac
Copy link

@Immac Immac commented Feb 24, 2025

Added the VUE knob, as an exploration on how to add knobs to the UI itself, I mistook the front-end and the litegraph part, ended up adding the VUE knob to front-end. Might come in handy or just a different flavor of a slider in some menus.

┆Issue is synchronized with this Notion page by Unito

@@ -91,6 +92,8 @@ function getFormComponent(item: FormItem): Component {
return InputNumber
case 'slider':
return InputSlider
case 'knob':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you changed the wrong thing here. The FormItem is for settings dialog content mainly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was indeed an accident, but after checking it out I thought someone would like to use those as an alternative,
image

Copy link
Author

@Immac Immac Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you changed the wrong thing here. The FormItem is for settings dialog content mainly.

Should I remove it? I do not see the harm in having the option.

@Immac Immac marked this pull request as ready for review February 25, 2025 06:32
@Immac Immac requested a review from a team as a code owner February 25, 2025 06:32
@Immac
Copy link
Author

Immac commented Feb 25, 2025

Realized late merge is not allowed will fix tomorrow.

@Immac Immac marked this pull request as draft February 25, 2025 16:00
@Immac
Copy link
Author

Immac commented Feb 25, 2025

Regarding the following:

Error: src/composables/widgets/useFloatWidget.ts(46,9): error TS2345: Argument of type '"number" | "slider" | "knob"' is not assignable to parameter of type '"string" | "number" | "toggle" | "button" | "text" | "custom" | "combo" | "multiline" | "slider"'.
  Type '"knob"' is not assignable to type '"string" | "number" | "toggle" | "button" | "text" | "custom" | "combo" | "multiline" | "slider"'.
Error: src/composables/widgets/useIntWidget.ts(45,9): error TS2345: Argument of type '"number" | "slider" | "knob"' is not assignable to parameter of type '"string" | "number" | "toggle" | "button" | "text" | "custom" | "combo" | "multiline" | "slider"'.

where are these declared? as I think in this case knob should be in the second list.

@christian-byrne
Copy link
Collaborator

where are these declared? as I think in this case knob should be in the second list.

https://github.com/Comfy-Org/litegraph.js/blob/cdbd0899e2755a082ed51f1e67b62c454ebef641/src/types/widgets.ts#L100

@Immac
Copy link
Author

Immac commented Feb 26, 2025

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.

3 participants