-
Notifications
You must be signed in to change notification settings - Fork 949
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 a cookiecutter based tutorial to build a custom widget #2919
Conversation
This should now cover the content of the previous tutorial and be ready for review. |
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.
Definitely a helpful read. I left a few comments on some things that might be nice to mention.
Also: I think it would be great to have a screenshot of the finished product right at the top as a hook to capture interest. The widget architecture screenshot is useful but it is not the most inviting start to the tutorial.
Good idea, added that to the todo list 👍 |
There are references to |
Thanks @MicaelJarniac for the pointer. Adding the PR to the 8.0 milestone since the previous notebook-based tutorial was removed in #2677 |
Also, we will want to update the tutorial for JupyterLab 3.0 too, when changes are backported from the This can probably be tracked and done in a separate PR. |
I'm going to close and re-open to try to pick up the RTD build on PRs |
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.
This is looking great! I left a comments on a few small things which can mostly done in subsequent PRs. I think the only things that really need addressing are contents of some of the code blocks. Following along I found that I was misled into deleting things, or never ended up defining a necessary variable a few times.
Other than that a great read, I learned a few things along the way :)
"- Union\n", | ||
"\n", | ||
"\n", | ||
"Not all of these traitlets can be synchronized across the network, only the JSON-able traits and Widget instances will be synchronized." |
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.
Can we specify which ones can't be synced? Maybe just with an asterisk after them in the bulleted list?
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.
We can probably go through the list and check them all with a call to json.dumps()
to know which ones are serializable.
Thanks @ianhi for the comments, I pushed changes to the branch which should be available on the RTD preview now too: https://ipywidgets--2919.org.readthedocs.build/en/2919/examples/Widget%20Custom.html |
We could probably iterate more on this tutorial in separate PRs, to cover the following points:
|
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.
This is fantastic 🎉 thanks!
We could probably iterate more on this tutorial in separate PRs, to cover the following points:
👍
Fixes #2731
The idea is to update the tutorial so it uses the TypeScript cookiecutter to bootstrap the widget.
For now we can probably keep the content and narration of the original tutorial (email widget, screenshot in #2731 (comment)), and we might want to iterate on it more later.
Structure and narration inspired by: https://jupyterlab.readthedocs.io/en/latest/developer/extension_tutorial.html
Screenshot:
TODO