-
Notifications
You must be signed in to change notification settings - Fork 12
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
✨Directly connect parameter inPort to its literal node #196
Conversation
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.
Thanks for the PR! I've tried out the new feature, feels super nice to use. Hope to get this merged soon!
Some things to note:
- Dragging a literal component from the tray doesn't prompt the input dialog
- For the float input.. it wasn't included in the tooltip description, but it feels a bit wonky to input .0.1. Let's piggy back on the integer notation using # then do an additional check if the input has a decimal or not. Don't forget to include the tooltip as well.
Those two for now. Thanks again for the PR!
Thanks for the reviewed. I wasn't aware the sidebar's literal was broken. Fix that. For the float, I made the changes as requested. Even add a check if there is non-numeric value, it'll show an error dialog. Also, change a bit regarding |
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.
Feels solid. I've tested all the parameters and can confirm each correctly prompts the right input dialogue and renders the right node.
def main(args):
ctx = {}
ctx['args'] = args
c_1 = HelloParameters()
c_1.input_int.value = 1
c_1.input_float.value = 1e2
c_1.input_str.value = """asd"""
c_1.input_bool.value = True
c_1.input_list.value = [1,2,3]
c_1.input_tuple.value = (1,2,3)
c_1.input_dict.value = {"a":1}
c_1.input_any.value = False
Great work, merging with main.
Description
This will automatically connect to its literal node when link is dropped from a parameter
InPort
. There are 2 type of implementation:Non-any
type - Drag a link should automatically render the correct literal node.any
type - The literal node's type is render based on the first character of the given input.Types taken into consideration for
any
type are :Pull Request Type
Type of Change
Tests
non-any
typeInPorts
inPorts
withnon-any
typeany
typeInPorts
inPorts
withany
typeTested on?