Skip to content
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

Adding a signal for application dirty status state changes #4840

Closed
dharmaquark opened this issue Jul 5, 2018 · 1 comment
Closed

Adding a signal for application dirty status state changes #4840

dharmaquark opened this issue Jul 5, 2018 · 1 comment

Comments

@dharmaquark
Copy link
Contributor

@dharmaquark dharmaquark commented Jul 5, 2018

I would like to add a dirtySignal, similar to busySignal, that returns a signal for when the application changes it’s dirty status. This would be useful for extensions that would like to show a visual indication of the dirty state- in the chrome tab, for example, similar to what the application-extension does with the favicon here: https://github.com/jupyterlab/jupyterlab/blob/master/packages/application-extension/src/index.tsx#L280

Proposed modification:
https://github.com/jupyterlab/jupyterlab/compare/master...dharmaquark:0718-dirtysignal?expand=1

Since, in theory, any extension could update the dirty status via setDirty, down the line, it might useful to add something like callback logic to ‘reset’ the dirty status. Currently, the dirty state reflects unsaved documents, and that state can only be cleared when documents are saved. It might be useful to introduce an API that allows an extension to actively clear the dirty state from the app level- each extension that sets dirty state would have the option of connecting to something like a callback that gets triggered when the dirty state is reset at the app level (eg. in the doc manager, that could trigger a ‘save all’ command)

@ian-r-rose
Copy link
Member

@ian-r-rose ian-r-rose commented Jul 10, 2018

Fixed by #4844. Thanks @dharmaquark!

@ian-r-rose ian-r-rose closed this Jul 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants