Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.8k
Description
Description
Command palette gets re-rendered even if hidden.
Reproduce
- Open command palette and two tabs
- Close the command palette
- Go to inspector right click on command palette element, select "break on" > "subtree modifications"
- Switch tabs
- See that command palette fragments get re-rendered via lumino virtual DOM
It is not clear to me why this update appears. Of note the migration torequestAnimationFrame in lumino seems to make the debugging/profiling a bit more confusing as I don't immediately see if this was a genuine animation frame request or just lumino messaging.
Expected behavior
Updating command palette on tab switch is expected because different commands will become available in different contexts (e.g. text editor/notebook), but re-rendering it while it is hidden is not expected.
In a bigger picture we could ask: should command palette get detached rather than hidden. I think hiding is ok because there is ever only one command palette, but requires a better hygiene on when a re-render is triggered.
Context
- JupyterLab version: 4.0.0a31
