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

Add possibility to close all panels in stack with single action #8922

Closed
ArkadiuszMichalski opened this issue Sep 29, 2020 · 26 comments
Closed
Assignees
Labels

Comments

@ArkadiuszMichalski
Copy link
Contributor

ArkadiuszMichalski commented Sep 29, 2020

Description of the Issue

After this bug #8471 (PR #8753) there is no way to close all stack of panels with single command/action. The previous behavior has been around for years and some may get used to it, like @Uhf7 #8753 (comment) wrote.

I know it's enough to click [x] a few times ... but I would prefer once (because such an option existed and it is no longer there).

Overall this solution with [x] is better than previouse, but now there is no option to close all :) Maybe with Ctrl (or Shift) + [X] or other key can (even middle buton) do it?

PS, Even for undocked panels when we go to context menu >> Close Alt+F4 command only one panel is close. but when I press Alt+F4 it close all Notepad++ (weird).

Steps to Reproduce the Issue

  1. Open few panels in one docked area.
  2. How close all with one action?

Generally, we can live without this option, but if it was available that would be fine too. If this feature will be rejected, then this description will be as reference to any future same questions.

Debug Information

Notepad++ v7.9 (32-bit)
Build time : Sep 22 2020 - 03:24:22
Path : D:_test\NPPClean\notepad++.exe
Admin mode : ON
Local Conf mode : ON
OS Name : Windows 7 Ultimate (64-bit)
OS Build : 7601.0
Current ANSI codepage : 1250
Plugins : none

@Uhf7
Copy link
Contributor

Uhf7 commented Sep 29, 2020

  1. How close all with one action?

I have nothing against an additional function for closing all panels at once, the question still is: Shift-Click or configurable?

PS, Even for undocked panels when we go to context menu >> Close Alt+F4 command only one panel is close. but when I press Alt+F4 it close all Notepad++ (weird).

That's indeed a thing to go for, if you press Alt-F4 in MS VC, while a floating side window has the focus, then the entire MS VC closes. This should be implemented this way in Notepad++ too, I will go for it.

A click on the close icon of a floating window should behave the same way as the click on the close icon in the docked window, this part is already right and will not change with implementing the additional "close all" function.

@ArkadiuszMichalski
Copy link
Contributor Author

Firstly, if @donho accept such possibility we can deliberate:), otherwise it's a pity to waste time (except for unofficial releases). If yes then...

@Uhf7

Shift-Click or configurable?

What do you mean, Shift-Click or configurable? Works as VS as you wrote #8753 (comment), or configurable separate shortcuts (but without mouse) in Shortcut Mapper? Overall, an inseparable dilemma, with or without mouse:)

@Uhf7
Copy link
Contributor

Uhf7 commented Sep 29, 2020

With "configurable" I don't mean the Shortcut Mapper. I refer to the MS VS configuration. In MS VS there is a click to the close icon and a shift-click to the close icon. And you can configure, whether click closes the current panel and shift-click closes the entire stack (default), or shift-click closes the current panel and click closes the entire stack.

My favorite is the default behavior of MS VS, but the configurability has the plus, that it can be configured to work the "classic" way. But, of course, it needs a checkmark somewhere in Preferences...

@ArkadiuszMichalski
Copy link
Contributor Author

ArkadiuszMichalski commented Sep 29, 2020

@Yaron10 what would you like to have? For me Shift+click is enaught, but reverse Click <>Shift+Click in Prefs it can also be useful for others (maybe even for me, it will come out in the practice). For me, even a press scroll (second button) would be enough (without Shift, why use keyboard here?).

@sasumner
Copy link
Contributor

if @donho accept such possibility we can deliberate, otherwise it's a pity to waste time

Don doesn't always contribute to this type of discussion.
Sometimes, yes, but oftentimes no.
So if there is no guidance, we push ahead and try something.
For small things such as this, it is not a lot of wasted effort to try it in the form of a PR, even if it gets rejected.
For bigger things, it maybe isn't wise.

@sasumner
Copy link
Contributor

I would vote for skip the preference setting (because I always prefer that) and think of it this way:

  • click closes one (simplest action)
  • shift+click closes more (more complex action, has more effect)

@ArkadiuszMichalski
Copy link
Contributor Author

Yes, better than nothing, it will come out in practice if someone needs reverse behavior.

@sasumner
Copy link
Contributor

it will come out in practice if someone needs reverse behavior

I can't see why this would come out as a need.
A want, sure, but you don't always get what you want.
There comes a time when product owner says how it works is sufficient, and then stands by that.

@ArkadiuszMichalski
Copy link
Contributor Author

ArkadiuszMichalski commented Sep 29, 2020

But if 50 or 100 people came here and want such option maybe worth adding it. Of course, we only consider 1 additional switch in prefs, only for this case. At the moment, just Shift + click is enough.

@Yaron10
Copy link

Yaron10 commented Sep 29, 2020

@ArkadiuszMichalski,

Thank you for opening this issue.

As a "mouse-oriented" user I liked your idea of middle-click closing all.
But, I'm afraid, it's somewhat contrary to the conventional middle-click behavior.
(Even here, middle-clicking a tab closes its panel only).

So, like you and @sasumner, I think that a preference would be too much.
-- Shift+click closes all.

@Uhf7,

Thanks again for that too.

@sasumner
Copy link
Contributor

But if 50...

Seems to be Don's metric as well (not that exact number of course). It makes sense.
If you have a HUGE number of complainers, yes, chances are good you designed it wrong.

@Uhf7
Copy link
Contributor

Uhf7 commented Sep 29, 2020

OK, I will try a PR in which shift-click to the close icon of a side window closes the entire stack and Alt-F4 closes the application (even if the side window is "floating")...

@sasumner
Copy link
Contributor

middle click

I'd think any middle-click behavior would have to be entirely optional. And thus who has time/desire to code that as a secondary mechanism? :-)

@Yaron10
Copy link

Yaron10 commented Sep 29, 2020

@Uhf7,

OK, I will try a PR in which shift-click to the close icon of a side window closes the entire stack.

👍

@sasumner,

I'd think any middle-click behavior would have to be entirely optional.

👍

@ArkadiuszMichalski
Copy link
Contributor Author

Where middle click is used (and not optional)? Only for tab in Tab bar and tab in panels?

@Yaron10
Copy link

Yaron10 commented Sep 29, 2020

Where middle click is used (and not optional)? Only for tab in Tab bar and tab in panels?

I can't think now of other places in NPP.
But it's a broader convention: middle-clicking a tab in Firefox closes that tab only.

@ArkadiuszMichalski
Copy link
Contributor Author

I'm wonder if tooltip can be add to this [x] button which will tell us that Shift + click will close all stack. Well, maybe I will not forget about this possibility after some time:)

@Yaron10
Copy link

Yaron10 commented Sep 29, 2020

I'm wonder if tooltip can be add to this [x] button which will tell us that Shift + click will close all stack.

In principle you're right. The user should be informed of that option.
But this seemingly simple addition might require quite a few lines of code. I don't know. :)

@Uhf7
Copy link
Contributor

Uhf7 commented Sep 29, 2020

I'm wonder if tooltip can be add to this [x] button ...

Ups. I had exactly the same thought earlier this day, but I'm far away from promising this...

@Yaron10
Copy link

Yaron10 commented Sep 29, 2020

Ups. I had exactly the same thought earlier this day, but I'm far away from promising this...

@ArkadiuszMichalski,

That's a better answer than mine. :)

@ArkadiuszMichalski
Copy link
Contributor Author

ArkadiuszMichalski commented Sep 29, 2020

Relax, I will stick a yellow note to the monitor. But seriously it should be documented somewhere in the manual.

@Yaron10
Copy link

Yaron10 commented Sep 29, 2020

OK. I'm out. :)

The "confused" was a mistake. Sorry.

@ArkadiuszMichalski
Copy link
Contributor Author

Right click on [X] and display "Close all" it's also a solution, like we see here #9740 (comment). It takes two steps, so we certainly won't close them all by mistake.

@donho
Copy link
Member

donho commented Apr 22, 2021

@ArkadiuszMichalski Thank you for opening this issue (Sorry, I just saw it until now) for brain-storming.

@Uhf7

I have nothing against an additional function for closing all panels at once, the question still is: Shift-Click or configurable?

Shift-Click is good - it's conventional so I guess it's quite intuitive for the most of user. There's already a tooltip (Close) on the button, a tooltip Shift-Click: Close the whole Panel could be added to make it more explicit.

Don doesn't always contribute to this type of discussion.
Sometimes, yes, but oftentimes no.

Sorry again for not seeing it earlier. I've configured a email filter so I can check the issue I'm mentioned separately (so firstly).

@donho donho added the accepted label Apr 22, 2021
@donho
Copy link
Member

donho commented Apr 22, 2021

@Uhf7
Can I assign this issue to you if you want to implement it?
Otherwise, I can implement it myself.

@Uhf7
Copy link
Contributor

Uhf7 commented Apr 23, 2021

@donho,

I think, I can implement it, in the last week of May 2021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants