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

Add "Little Things to Know" section to the docs #604

Open
manzt opened this issue Jun 7, 2024 · 1 comment
Open

Add "Little Things to Know" section to the docs #604

manzt opened this issue Jun 7, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@manzt
Copy link
Owner

manzt commented Jun 7, 2024

Thanks @koaning for the idea. There are just some little things to know when actually using widgets, especially the ipywidgets/traitlets ecosystem, which without documentation could lead to a "meh" overall experience with anywidget.

It would be nice to have an FAQ-style list of tips to steer folks into the pit of success with Jupyter Widgets.

Example:

widget = MyWidget()
widget.observe(on_change)
widget

very rarely is a blanket observe what you want, since multiple traitlet changes will occur per user expected "change", causing the callback to fire multiple times and glitching.

It's better to specify names and filter which changes you actually care about:

widget = MyWidget()
-- widget.observe(on_change)
++ widget.observe(on_change, names=["value"])
widget
@prusswan
Copy link

prusswan commented Oct 21, 2024

as someone new to widgets, these will be important:

  1. capturing ipywidgets.Output so failures can be seen (otherwise not even import errors will show up). The method used is different for jupyter classic and lab so this took me quite a while to realize

  2. interactions between widgets, e.g.

@manzt manzt added enhancement New feature or request documentation Improvements or additions to documentation and removed enhancement New feature or request labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants