-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hide metadata inputs for tasks in HTML visualization. #346
Hide metadata inputs for tasks in HTML visualization. #346
Conversation
Co-authored-by: Xing Wang <xingwang1991@gmail.com>
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. |
c2ace09
to
09af3e2
Compare
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.
LGTM!
Fixes #119.