Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Exiting terminal doesn't close window tab #299

Closed
davidbrochart opened this issue Dec 6, 2021 · 3 comments · Fixed by #319
Closed

Exiting terminal doesn't close window tab #299

davidbrochart opened this issue Dec 6, 2021 · 3 comments · Fixed by #319
Labels
enhancement New feature or request

Comments

@davidbrochart
Copy link
Contributor

Problem

When exiting a terminal by entering exit, it would be nice for the window tab to close as well.
Currently, the user is left with an empty page:

image

Proposed Solution

Maybe use:

window.close();

Additional context

That would match JupyterLab's behavior (for which the tab is closed).

@davidbrochart davidbrochart added the enhancement New feature or request label Dec 6, 2021
@jtpio
Copy link
Member

jtpio commented Dec 6, 2021

Thanks @davidbrochart.

Maybe use:

window.close();

Right there could be small plugin in the terminal-extension package that listens to widget.disposed and performs this action.

For reference the classic notebook keeps the terminal widget displayed, and appends [CLOSED]:

classic-terminal-closed.mp4

@jtpio
Copy link
Member

jtpio commented Dec 8, 2021

Thinking about this more, I'm wondering if automatically closing the tab might be a bit too aggressive.

For example we could imagine someone running something in the terminal, and expecting to keep the output of a command displayed on the screen. Ideally we would find a way to replicate the behavior of the classic notebook and keep the terminal widget displayed on the page after exit. Although it's true that in JupyterLab the terminal widget is just disposed.

@davidbrochart
Copy link
Contributor Author

Yes, I agree that we should try and keep as close as possible to the classic notebook.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants