You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this signal fires too often leading to unncessary re-rendering when tab was switched (rather than closed/removed), which is because no filtering of the tabsChanged signal takes place - it is just proxied as-is:
this signal is received and triggers re-render even if the running sidebar is closed; it should be proxied in the widget and skipped if widget isHidden.
Reproduce
Record profile
Change tab
See that running sidebar was re-rendered
Expected behavior
Hidden widgets do not re-render unnecessarily.
We could use props.shouldUpdate for UseSignal.
Context
JupyterLab version: 4.0.0.a31
The text was updated successfully, but these errors were encountered:
this signal fires too often leading to unnecessary re-rendering when tab was switched (rather than closed/removed), which is because no filtering of the tabsChanged signal takes place - it is just proxied as-is:
This one is difficult because the original signal comes from lumino's title.changed which emits without any data from changes to text, icon or className; it is reasonable that we listen to this signal because we may want to sync some of the title styling changes (e.g. text, icon, maybe colour in the future) in the "Open tabs" section of the running panel. The problem is that this changed fires on tab switch as a consequence of className update and we would need to make assumptions on what class name changes mean "tab switched" (and therefore are safe to ignore) and which should possibly need to be propagated.
I can also imagine a feature request of highlighting active tab in the panel so maybe this is not a priority.
Description
On initialization of running sidebar
Section
(PanelWithToolbar
subclass) a ReactWidget observingoptions.manager.runningChanged
signal is created:jupyterlab/packages/running/src/index.tsx
Lines 248 to 266 in 552cdfe
There are two problems
tabsChanged
signal takes place - it is just proxied as-is:jupyterlab/packages/running-extension/src/opentabs.ts
Line 85 in 552cdfe
isHidden
.Reproduce
Expected behavior
Hidden widgets do not re-render unnecessarily.
We could use
props.shouldUpdate
forUseSignal
.Context
The text was updated successfully, but these errors were encountered: