Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@carlosingles
Copy link
Contributor

Introduces new setting that opens all tabs in a temp state, allowing them to be closed when focus is changed from item to item.

Origin: ddavison/sublime-tabs#43

@lee-dohm
Copy link
Contributor

/cc @atom/feedback

@carlosingles
Copy link
Contributor Author

Sorry added an extra commit, forgot that Sublime Text keeps the file open if it has been modified.

@benogle
Copy link
Contributor

benogle commented May 22, 2015

Multiple commits is totally fine. We never squash.

lib/main.coffee Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is misleading considering that the tabs stay open once they're modified. Perhaps Tabs will only stay open if they are modified or double-clicked or Tabs with no changes are closed once they lose focus unless they are double-clicked.

@winstliu
Copy link
Contributor

Also, some specs would be nice for this 😄.

@thomasjo
Copy link
Contributor

Also, some specs would be nice for this

I'm gonna be a little bit stricter; specs for this is mandatory.

@thomasjo
Copy link
Contributor

I don't really like the name temporaryTabs. We're in the context of "tabs" already, so maybe it should be something along the lines of temporaryMode, useTransientBehavior, transience, or some such.

Naming stuff is difficult.

Also added check to see if the Tab is a TextEditor (This prevents
accidental closing of tabs when opening panels)
@carlosingles
Copy link
Contributor Author

Thanks for the help guys 😃

I've implemented your suggestions and renamed the setting to "useTransientBehaviour" - seems to make the most sense

I also modified the code to prevent TextEditor tabs from being closed when any other panel is opened and focused

I'll work on writing some specs next 👍

@carlosingles
Copy link
Contributor Author

I'm not extremely familiar with writing specs, so forgive me if they're completely wrong 🙈

Any tips / help appreciated if I missed anything!

@ddavison
Copy link

use specs from sublime-tabs.. since this PR is based on that, you should be able to see which tests test which behavior and try accordingly

@carlosingles
Copy link
Contributor Author

Thanks 👍

I've updated the specs to use the specs from sublime-tabs and have also updated them to suit this fork.

Also I removed the case for Images since my fork is only testing for TextEditors, I'm not sure what the preferred behaviour would be for images - for me it makes more sense that images open in non-transient tabs.

@roman01la
Copy link

👍

1 similar comment
@acontreras89
Copy link
Contributor

👍

This was referenced Jun 3, 2015
@dioxmio
Copy link

dioxmio commented Nov 10, 2015

Nice work 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.