Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close a single panel instead of the entire stack. #8753

Closed
wants to merge 1 commit into from

Conversation

Uhf7
Copy link
Contributor

@Uhf7 Uhf7 commented Aug 23, 2020

Clicking the "Close" icon in docked windows closes the current panel now instead of the entire stack.

This implements the last part of #8471.

@Yaron10
Copy link

Yaron10 commented Aug 23, 2020

@Uhf7,

Currently you can close a single panel by middle-clicking its tab, and you can also close the entire stack by clicking the Close button.

The expected behavior of clicking the Close button is indeed closing the current panel only.
But shouldn't we have an option to "Close All" (the entire stack)? - How about Ctrl+Close closing all?

Thank you.

@Uhf7
Copy link
Contributor Author

Uhf7 commented Aug 23, 2020

Currently you can close a single panel by middle-clicking its tab.

I would never have known this, but it's true.

I expect the MS VS behavior here, and I expect it to be similar to the small close button at the far right in the menu line, which closes the current document only.

This expectation is fortified by the fact, that the close button for the docked window is beside the headline of the docked window. And this headline is content-dependent. It doesn't say: "Left Docking Area" or "Right Docking Area", it says "Function List", "Document Map", and so on. So I expect to close exactly what the headline says, and not everything docked at the same place.

How about Ctrl+Close closing all?

It would be easy to do that, but I wouldn't expect this function there neither.

And I find multiple clicks to the close button not too hindering, the mouse stays at the same position while doing it.

@Yaron10
Copy link

Yaron10 commented Aug 23, 2020

I expect the MS VS behavior here, and I expect it to be similar to the small close button at the far right in the menu line, which closes the current document only.

This expectation is fortified by the fact, that the close button for the docked window is beside the headline of the docked window. And this headline is content-dependent. It doesn't say: "Left Docking Area" or "Right Docking Area", it says "Function List", "Document Map", and so on. So I expect to close exactly what the headline says, and not everything docked at the same place.

You're absolutely right.
(I also wrote: "The expected behavior of clicking the Close button is indeed closing the current panel only").

How about Ctrl+Close closing all?
...
I wouldn't expect this function there neither.

I agree.
But wouldn't it be better than no option to "Close All"? - Some users might request it.

@Yaron10
Copy link

Yaron10 commented Aug 23, 2020

Just found out that Shift + Clicking Close closes the entire stack in MS VS.
For example: Find Results 1 + Find Results 2.

@Uhf7
Copy link
Contributor Author

Uhf7 commented Aug 23, 2020

OK, I see. There is no way to get around it :-). I would prefer Shift + clicking Close then.

In MS VS, it is even configurable, whether the close button affects only the active panel or the entire stack : "Close button affects active tool window only" is the option. Must have been checked all the time I used it. And this setting is (in MS VS) negated by the Shift key:

  • Option "Close button affects active tool window only" on: Click on close closes active tool window, Shift + click on Close closes all tool windows
  • Option "Close button affects active tool window only" off: Click on close closes all tool windows, Shift + click on Close closes active tool window.

So, I see some white space left in the MISC. page of preferences ...

@Yaron10
Copy link

Yaron10 commented Aug 23, 2020

In MS VS you can't see the forest for the trees.

So, I see some white space left in the MISC. page of preferences ...

If you think it's important. :)

Thank you.
👍

@chcg chcg added the enhancement Proposed enhancements of existing features label Aug 26, 2020
@KnIfER
Copy link

KnIfER commented Aug 30, 2020

I think it's more convenient to press ctrl+w and close a single panel .

(I have a mouse button bound to ctrl+w, and I am using it every where )

@Uhf7
Copy link
Contributor Author

Uhf7 commented Aug 30, 2020

I think it's more convenient to press ctrl+w and close a single panel

Started Notepad++, pressed Ctrl+W. While in text windows, it inserts a control character ETB, while in docking windows, nothing happens.

Is this a kind of hidden function that already exists? Or is it just a kind of feature request or another way in which it could be done?

@sasumner
Copy link
Contributor

@Uhf7

Started Notepad++, pressed Ctrl+W. While in text windows, it inserts a control character ETB...

Default behavior of Ctrl+w should be to close the tab.

If it is intended to be hidden, it isn't hidden very well:

image

But, historically, in Windows, Ctrl+w has been a "close tab" command. I think it has fallen out of favor and Ctrl+F4 is now the favorite for this. Why F4 I have no idea.

@Uhf7
Copy link
Contributor Author

Uhf7 commented Aug 30, 2020

historically, in Windows, Ctrl+w has been a "close tab" command

OK, but this cannot be applied here, because the "Close" keyboard shortcut is for documents only. So, if we would want to use it for side windows too, we would have to make the "Close" keyboard shortcut dependent on in which window it is pressed. If it is pressed in the edit window, then the current document would be closed, if it is pressed in a side window, the current tab of the side window would be closed. That's actually not what I intent here.

The question still lingering from my side is, in which degree the click to the "Close" icon of a side window should be configurable. Is it enough to provide a Shift-Click for closing all tabs in the side window, or would a configuration be acceptable, so that all users, who got used to it, can continue to close the entire stack instead of the current tab only.

@sasumner
Copy link
Contributor

OK, but this cannot be applied here, because the "Close" keyboard shortcut is for documents only.

Correct, I was NOT suggesting it, just relaying some history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted enhancement Proposed enhancements of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants