-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add signal when an item factory is added to the toolbar #14376
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
Conversation
|
Thanks for making a pull request to jupyterlab! |
fcollonval
left a comment
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.
Thanks @brichet I think there is a small typo but otherwise it looks good.
| expect(factory2(new Widget())).toHaveLength(3); | ||
| }); | ||
|
|
||
| it('should update the toolbar items with late item factory', async () => { |
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.
🚀
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
|
Thanks @brichet! Wondering if there could be other situations than just toolbar items that could be affected by this new caching logic of the settings? |
This is hard to say, this is really an indirect effect, and there is probably no test on that behavior. |
fcollonval
left a comment
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.
Thanks @brichet
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. The mean relative comparison is computed with 95% confidence. Results table
Changes are computed with expected as reference.
Waiting for localhost:8888 Cell memory leaksCreate a code cellMemory change: +155 kB Leak detected: YesLeaking objects:
Leaking collections: Create a markdown cellMemory change: -96.5 kB Leak detected: NoLeaking objects:
Leaking collections: Create a raw cellMemory change: -170 kB Leak detected: NoLeaking objects:
Leaking collections: File editor memory leaksCreate a fileMemory change: -79.2 kB Leak detected: NoLeaking objects:
Notebook memory leaksCreate a notebookMemory change: +30.6 kB Leak detected: YesLeaking objects:
1 passing (7m) |
See #14366 for context.
References
Fixes #14366
The issue was first notified in jupyter/notebook#6838
Code changes
Adds a signal in
ToolbarWidgetRegistry, which is emitted when an item factory is added to the registry.This signal is caught by the
toolbarFactoryto render again the widget.User-facing changes
None
Backwards-incompatible changes
None
EDIT:
Tested successfully on jupyter/notebook#6838