Can Panes have a non default configuaration


In the documentation for the Pane class, it says “In the default configuration, tabs are also displayed for each item.”

However it’s not possible to configure this behaviour because the tab creation is linked to the emitting of the did-add-item event in the Pane::addItem() method.

I wanted to add an item to pane, without having a tab appear and I had to hack the Pane code. Shouldn’t there be an option to turn this behaviour off?


You can disable the tabs package to turn this behavior off globally. What is it you’re trying to do?


Thanks for that @leedohm. However I’m trying to customise Atom to create a custom tool for my project, as it has the bulk of what I need. I don’t want the tabs to be disabled globally as sometimes I do want them when an item is added to the Pane.

From my limited understanding, I’m wondering why the tab creation is linked via an event. I think emitting the did-add-item event is a good idea so other components can know what’s going on, but I would expect the tab would be a UI component of the Pane and thus I can use methods on the Pane instance to configure the outcome.

Ideally I’d like be able to tell a Pane that when adding an item of a given type, don’t add a tab. This I feel is more in line with the documentation for the Pane class where I can overwrite the default configuration.


But what does a pane item not having a tab buy you?

You could also implement your own tabs package that works how you want. Or submit a PR with a change to the current tabs package.

I wasn’t around when the tabs package was originally written, so I’m not privy to why it was designed the way it was.


What do you mean by UI component? The tabs have to be in a tab div and the panes are in another div. Also there is no reason for a pane to know a tab exists and shouldn’t know. There is a package that replaces tabs with a vertical chooser. Should the pane know about that also?


Fair enough @mark_hahn I’m wanting to understand why certain decisions have been made. I’ll look at the tabs-package and see if I can configure it to do what I want :smile:


I assume it was a normal separation of concerns issue.


@mark_hahn What’s the name of the package please?


I was slightly mistaken. The package opened-files and tree-view-open-files add a list but don’t replace tabs. You could disable the tabs package to get what I thought was available.