-
Notifications
You must be signed in to change notification settings - Fork 74
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
plugin API method to close_in_tray #2562
Conversation
4a752c6
to
e8cf0d2
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.
Actually for both open and close, should they be no-op if the requested item is already opened/closed? Then we don't have to loop over stuff for no reason, or is that too hard to find out before hand or it doesn't matter because the underlying call will already be a no-op?
I suspect it would cost just as much to add the check before updating the traitlet as it does to set the traitlet to the same value that it currently is, but if anyone wants to test that theory and add the test if its cheaper, feel free! |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2562 +/- ##
=======================================
Coverage 90.79% 90.80%
=======================================
Files 160 160
Lines 19356 19394 +38
=======================================
+ Hits 17575 17610 +35
- Misses 1781 1784 +3 ☔ View full report in Codecov by Sentry. |
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.
Seems to work. Very convenient to have indeed. Thanks!
33ca441
to
1ae25f9
Compare
Description
This pull request adds a new method to all plugin user APIs to close the item in the tray (useful for demos and notebook workflows, especially when the plugin in question has live-previews enabled). By default, it does not close the tray itself, but accepts an optional argument to close the entire tray.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.