-
Notifications
You must be signed in to change notification settings - Fork 5
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
Hide metadata inputs for tasks in HTML visualization. #346
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Xing Wang <[email protected]>
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.
Hi @GeigerJ2 , instead of handling metadata
specially, it would be good to also handle other namespace ports. I suggest to use a parameter to control it.
For example, we can add an attribute to the node, e.g., show_socket_level
, and the default value is 0
to only the top level, if it is 1
, then show all root.sub
, and so on.
Nice idea, I like it! Will implement it! |
Hi, @superstar54, I generalized it in my latest commit. The namespace nesting depth for the shown sockets can now be controlled by a parameter of the |
Thanks for the update! def _repr_mimebundle_(self, *args: Any, **kwargs: Any) -> any:
if self._widget is None:
print(WIDGET_INSTALLATION_MESSAGE)
return
# if ipywdigets > 8.0.0, use _repr_mimebundle_ instead of _ipython_display_
+ self._widget.from_node(self, show_socket_depth=self.show_socket_depth)
- self._widget.from_node(self)
if hasattr(self._widget, "_repr_mimebundle_"):
return self._widget._repr_mimebundle_(*args, **kwargs)
else:
return self._widget._ipython_display_(*args, **kwargs) This way, the user can control the widget. |
Fixes #119.