Package creating/managing separate windows


Is there a common idiom for packages to create new windows for displaying information to users?

In an atom package you can easily say which will create a new window. However, windows created this way act ‘funny’. For example, the standard commands like the shortcut to close a tab do not work and there are limited ways of communicating between the various windows.

So, should there be a standard way to create and manage windows from within a package?


New windows run in a separate process. So, in my experience, packages do not open separate windows because of the challenges you cite.


I’m not sure. There are different types of information that may need different types of UI. For example, there is a git package that shows “git status” in a way similar to the command palette. And then there is a different Atom package named git control or similar which shows “git status” in a new tab. And then there is atomatigit (yet another Atom package) which shows “git status” in a separate pane on the right hand side.

Same information, vastly different presentation.

What do you want to show?


That are not new “Windows”, though. A window is a OS-level window, an independently running process of Atom. What you’re talking about are Views.


Oh, I see. I don’t see such “Windows” in Atom, so I presumed there is no common idiom that uses them, so I went to the next best match. You did ask for common idioms…


I’m not sure what @ashgti wanted. Opening a new window does not seem useful to me. Opening new Views is something that packages do all the time…


My idea was to create a preview of a generated result. It could be in an attached view but I thought it might make sense to open a new window.