jupyterlab / lumino

Lumino is a library for building interactive web applications
https://lumino.readthedocs.io/
Other
635 stars 126 forks source link

The `Title.changed` signal could emit some detail about the change #553

Open krassowski opened 1 year ago

krassowski commented 1 year ago

Problem

In https://github.com/jupyterlab/jupyterlab/issues/13676#issuecomment-1465205757 we would like to filter out updates caused by tab switch, which changes className of tab title leading to the signal being emitted:

https://github.com/jupyterlab/lumino/blob/06a87ead9b6b87842e8592fda8a15f27802c0646/packages/widgets/src/title.ts#L225-L231

However, sine it is emitted with undefined, we cannot distinguish the cause of the change and filter out specific updates.

Proposed Solution

Change the signal to include the update information.