Repository navigation
Close empty active window when Close command is given - #9607
Conversation
|
Would you mind adding specs for this? Thanks! |
fabbeb4 to
dba566b
Compare
|
@mnquintana I amended the existing test: https://github.com/atom/atom/pull/9607/files#diff-013fa854db95a703465103ef15c4b0edR1470. Is that enough? |
dba566b to
f935657
Compare
|
Refs #863 |
|
Great job @DouweM! ⚡ We'll see if everyone yells at us for changing it to work this way now. 😬 |
|
Code looks good, restarting the failed Travis build. |
|
IMO, there should be an option to preserve the current behavior |
|
@DouweM Can you add a setting for this? Something like |
|
@benogle May I ask why? The old behavior has never made sense to me or any other Mac/Linux Atom user I know (I don't know any Windows Atom users). You'll always have people complain about changes in behavior, but I think this is a change for the better and I'm seriously wary about adding configuration options just because people don't like change. |
|
For behavior changes like this, we need to give people who rely on the current behavior an out. Similar to the recent changes in fuzzy-finder matching algorithm, if it's clear that almost no one wants the old behavior, we can pull the option in the future.
I dont necessarily think this is a change for the better. It's just different. I for one really love the current behavior, commands do explicitly one thing: close an item or close a window and do not change based on state. I can mash cmd-w 100 times, and know that I wont accidentally close the window. We honestly have had little to no complaining about the current behavior in the last year or so. I'm inclined to think that many people are now used to it. |
|
Agreed on adding the option. There's no reason to have a bike shed debate on something that's so easy to customize. It originally worked this way and we changed it based on internal feedback from GitHubbers, so I think there's a good argument that it's going to be controversial. Let's avoid the controversy and let people design their own experience. |
|
@nathansobo Fair enough, I will add an option! |
|
@nathansobo Option was added! |
|
Kicking off another Travis build. |
|
Our Travis build is timing out. Think it may have to do with Blink throttling our timers and animation frames on CI. I'm running a build locally. |
|
Okay, I figured it out. @DouweM locally I'm seeing the spec you added actually closing the test window, which prevents us from informing the browser process that the tests completed. Could you move the |
|
Actually, nevermind, I'll just move it and merge. |
|
🚇 Thanks for your help @DouweM. 🚇 |
|
@nathansobo ❤️ |
There was a problem hiding this comment.
Was this deletion intentional?
There was a problem hiding this comment.
It was, te default title is the key (followSymlinks) capitalized, which would be Follow Symlinks. The downcase s was inconsistent with the other titles.

On OS X, Command-W is expected to close the current window, unless the current window has tabs (Safari, Chrome, Finder), in which case it will close the current tab, until only one is left, in which case it closes the entire window (and thus also the tab).
Currently in Atom, Command-W will close every pane item in the current pane, then the current pane, and so on until every pane is empty, which makes sense since pane items and panes ~ tabs. However, when only the empty root pane is left, which the user experiences as there being no panes left at all, hitting Command-W will not close the window, but will instead have no effect at all. To actually close the window, one needs to either manually hit the red close button in the upper left corner or the window, choose "Close Window" in the File menu or use the Cmd-Shift-W shortcut, all of which break the OS X UX contract.
With this PR, Command-W will behave exactly as it does right now, with one exception: when only the root pane is left, Command-W closes the entire window.
Hitting Command-W with only one pane item ~ tab open will NOT close the window, which is inconsistent with tabbed web browsing but makes more sense for a text editor.