git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-gui: allow closing console window with Escape
@ 2019-12-06 22:20 Pratyush Yadav
  2019-12-07 16:24 ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Pratyush Yadav @ 2019-12-06 22:20 UTC (permalink / raw)
  To: git

It is often expected that popup windows like the console window be
close-able with Esc.

Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
---
This was requested by https://github.com/prati0100/git-gui/issues/17

 lib/console.tcl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/console.tcl b/lib/console.tcl
index 1f3248f..8828f6f 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -88,6 +88,7 @@ method _init {} {
 	bind_button3 $w_t "tk_popup $w.ctxm %X %Y"
 	bind $w_t <$M1B-Key-a> "$w_t tag add sel 0.0 end;break"
 	bind $w_t <$M1B-Key-A> "$w_t tag add sel 0.0 end;break"
+	bind $w <Key-Escape> [list destroy $w]
 }

 method exec {cmd {after {}}} {
--
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-06 22:20 [PATCH] git-gui: allow closing console window with Escape Pratyush Yadav
@ 2019-12-07 16:24 ` Johannes Schindelin
  2019-12-08 19:40   ` Pratyush Yadav
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2019-12-07 16:24 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: git

Hi,

On Sat, 7 Dec 2019, Pratyush Yadav wrote:

> It is often expected that popup windows like the console window be
> close-able with Esc.

Seeing as the console windows is not your regular popup window with an
"OK" button, I could see how it would be all too easy to close the window
via the Esc button all too easily, annoying users.

For windows like the console one, I would expect Ctrl+W a much more
natural keyboard shortcut to close it.

Ciao,
Dscho

>
> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
> ---
> This was requested by https://github.com/prati0100/git-gui/issues/17
>
>  lib/console.tcl | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/console.tcl b/lib/console.tcl
> index 1f3248f..8828f6f 100644
> --- a/lib/console.tcl
> +++ b/lib/console.tcl
> @@ -88,6 +88,7 @@ method _init {} {
>  	bind_button3 $w_t "tk_popup $w.ctxm %X %Y"
>  	bind $w_t <$M1B-Key-a> "$w_t tag add sel 0.0 end;break"
>  	bind $w_t <$M1B-Key-A> "$w_t tag add sel 0.0 end;break"
> +	bind $w <Key-Escape> [list destroy $w]
>  }
>
>  method exec {cmd {after {}}} {
> --
> 2.24.0
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-07 16:24 ` Johannes Schindelin
@ 2019-12-08 19:40   ` Pratyush Yadav
  2019-12-09  9:18     ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Pratyush Yadav @ 2019-12-08 19:40 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

On 07/12/19 05:24PM, Johannes Schindelin wrote:
> Hi,
> 
> On Sat, 7 Dec 2019, Pratyush Yadav wrote:
> 
> > It is often expected that popup windows like the console window be
> > close-able with Esc.
> 
> Seeing as the console windows is not your regular popup window with an
> "OK" button, I could see how it would be all too easy to close the window
> via the Esc button all too easily, annoying users.

I'm not sure why it is "too easy" to hit Escape. If you're hitting Esc 
(which for most people is pretty far from other more frequently used 
keys) you expect _something_ to happen. People don't just spam Esc for 
no reason, do they?
 
> For windows like the console one, I would expect Ctrl+W a much more
> natural keyboard shortcut to close it.

But, that "something" the user expects to happen could also be "stop the 
command". AFAIK, Esc is often expected to stop commands. But closing the 
console window won't actually stop the command. It will keep running in 
the background, and when the command is done, the window will open again 
showing the final output.

So all in all, I do think Ctrl-W would be a better idea. Will re-roll.
 
> Ciao,
> Dscho

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-08 19:40   ` Pratyush Yadav
@ 2019-12-09  9:18     ` Johannes Schindelin
  2019-12-09 15:53       ` Vasili Novikov
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2019-12-09  9:18 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: git

Hi Pratyush,

On Mon, 9 Dec 2019, Pratyush Yadav wrote:

> On 07/12/19 05:24PM, Johannes Schindelin wrote:
> >
> > On Sat, 7 Dec 2019, Pratyush Yadav wrote:
> >
> > > It is often expected that popup windows like the console window be
> > > close-able with Esc.
> >
> > Seeing as the console windows is not your regular popup window with an
> > "OK" button, I could see how it would be all too easy to close the window
> > via the Esc button all too easily, annoying users.
>
> I'm not sure why it is "too easy" to hit Escape. If you're hitting Esc
> (which for most people is pretty far from other more frequently used
> keys) you expect _something_ to happen. People don't just spam Esc for
> no reason, do they?

Is it possible to issue a command in that console window? If yes, Esc D is
what people like me would possibly use to delete entire words.

Even if not, if there is no "OK" button, it would annoy me no end if the
Escape key closes the window (it is not a dialog box, after all).

> > For windows like the console one, I would expect Ctrl+W a much more
> > natural keyboard shortcut to close it.
>
> But, that "something" the user expects to happen could also be "stop the
> command". AFAIK, Esc is often expected to stop commands. But closing the
> console window won't actually stop the command. It will keep running in
> the background, and when the command is done, the window will open again
> showing the final output.
>
> So all in all, I do think Ctrl-W would be a better idea. Will re-roll.

Thank you,
Dscho

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-09  9:18     ` Johannes Schindelin
@ 2019-12-09 15:53       ` Vasili Novikov
  2019-12-10 12:02         ` Pratyush Yadav
  0 siblings, 1 reply; 9+ messages in thread
From: Vasili Novikov @ 2019-12-09 15:53 UTC (permalink / raw)
  To: git

What have console windows to do with git gui though? I'd work under the 
following assumptions:
* we're talking about a GUI window, not a TUI one
* the window has no useful information at all except the fact that 
something has "finished", is "done". There are no actions that you can 
take except to dismiss the window.

If we agree on the following assumptions, then I see these real-world 
examples:
* Mousepad > About > Esc = closes the popup
* Firefox > About > Esc = closes the popup
* Thunar > select any file and ask its properties > Esc = closes the window
* file-roller (GNOME compressed archive manager) > Extract archive > 
Observe success window upon completion > Esc = closes the window.

Are there any real-world examples where `Ctrl W` or `Esc D` work but 
`Esc` doesn't, to consider these alternatives as more intuitive to users?


On 09/12/2019 10.18, Johannes Schindelin wrote:
> Hi Pratyush,
> 
> On Mon, 9 Dec 2019, Pratyush Yadav wrote:
> 
>> On 07/12/19 05:24PM, Johannes Schindelin wrote:
>>>
>>> On Sat, 7 Dec 2019, Pratyush Yadav wrote:
>>>
>>>> It is often expected that popup windows like the console window be
>>>> close-able with Esc.
>>>
>>> Seeing as the console windows is not your regular popup window with an
>>> "OK" button, I could see how it would be all too easy to close the window
>>> via the Esc button all too easily, annoying users.
>>
>> I'm not sure why it is "too easy" to hit Escape. If you're hitting Esc
>> (which for most people is pretty far from other more frequently used
>> keys) you expect _something_ to happen. People don't just spam Esc for
>> no reason, do they?
> 
> Is it possible to issue a command in that console window? If yes, Esc D is
> what people like me would possibly use to delete entire words.
> 
> Even if not, if there is no "OK" button, it would annoy me no end if the
> Escape key closes the window (it is not a dialog box, after all).
> 
>>> For windows like the console one, I would expect Ctrl+W a much more
>>> natural keyboard shortcut to close it.
>>
>> But, that "something" the user expects to happen could also be "stop the
>> command". AFAIK, Esc is often expected to stop commands. But closing the
>> console window won't actually stop the command. It will keep running in
>> the background, and when the command is done, the window will open again
>> showing the final output.
>>
>> So all in all, I do think Ctrl-W would be a better idea. Will re-roll.
> 
> Thank you,
> Dscho
> 

-- 
Vasilii Novikov
Software Developer
vasilii.novikov@zivver.com

ZIVVER B.V. • Koningin Wilhelminaplein 30 • 1062 KR Amsterdam
www.zivver.com • +31 85 01 60 555 <+31-85-0160555>
Follow us on: twitter <https://twitter.com/zivver_nl>, facebook
<https://www.facebook.com/zivver> and linkedin
<https://www.linkedin.com/company/zivver>

✓ Voldoe jij al aan de GDPR-wetgeving?
<https://get.zivver.eu/nl/gdpr-checklist/>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-09 15:53       ` Vasili Novikov
@ 2019-12-10 12:02         ` Pratyush Yadav
  2019-12-10 12:11           ` Vasili Novikov
  0 siblings, 1 reply; 9+ messages in thread
From: Pratyush Yadav @ 2019-12-10 12:02 UTC (permalink / raw)
  To: Vasili Novikov; +Cc: git

Hi Vasili,

Please try to not top-post on the list.

On 09/12/19 04:53PM, Vasili Novikov wrote:
> What have console windows to do with git gui though? I'd work under the

Well, the window/popup in question is internally named "console" and is 
defined in lib/console.tcl. It is used by many parts of git-gui that 
need to execute a command and show the output to the user.

> following assumptions:
> * we're talking about a GUI window, not a TUI one
> * the window has no useful information at all except the fact that something
> has "finished", is "done". There are no actions that you can take except to
> dismiss the window.
 
It also shows you the output of a command currently in progress (like 
git-push). My main argument with avoiding Escape is that people often 
expect Escape to stop an ongoing command. In this case though, closing 
the window does not actually stop the command. It keeps going on in the 
background.

But since the window is gone, people might think the command they were 
running has stopped, which might lead to some unexpected results.

> If we agree on the following assumptions, then I see these real-world
> examples:
> * Mousepad > About > Esc = closes the popup
> * Firefox > About > Esc = closes the popup
> * Thunar > select any file and ask its properties > Esc = closes the window
> * file-roller (GNOME compressed archive manager) > Extract archive > Observe
> success window upon completion > Esc = closes the window.

In this case, the thing is done. There is no ongoing task. Not quite the 
case with the console window in git-gui, which can also show ongoing 
tasks.
 
> Are there any real-world examples where `Ctrl W` or `Esc D` work but `Esc`
> doesn't, to consider these alternatives as more intuitive to users?
> 
> 
> On 09/12/2019 10.18, Johannes Schindelin wrote:
> > Hi Pratyush,
> > 
> > On Mon, 9 Dec 2019, Pratyush Yadav wrote:
> > 
> > > On 07/12/19 05:24PM, Johannes Schindelin wrote:
> > > > 
> > > > On Sat, 7 Dec 2019, Pratyush Yadav wrote:
> > > > 
> > > > > It is often expected that popup windows like the console window be
> > > > > close-able with Esc.
> > > > 
> > > > Seeing as the console windows is not your regular popup window with an
> > > > "OK" button, I could see how it would be all too easy to close the window
> > > > via the Esc button all too easily, annoying users.
> > > 
> > > I'm not sure why it is "too easy" to hit Escape. If you're hitting Esc
> > > (which for most people is pretty far from other more frequently used
> > > keys) you expect _something_ to happen. People don't just spam Esc for
> > > no reason, do they?
> > 
> > Is it possible to issue a command in that console window? If yes, Esc D is
> > what people like me would possibly use to delete entire words.
> > 
> > Even if not, if there is no "OK" button, it would annoy me no end if the
> > Escape key closes the window (it is not a dialog box, after all).
> > 
> > > > For windows like the console one, I would expect Ctrl+W a much more
> > > > natural keyboard shortcut to close it.
> > > 
> > > But, that "something" the user expects to happen could also be "stop the
> > > command". AFAIK, Esc is often expected to stop commands. But closing the
> > > console window won't actually stop the command. It will keep running in
> > > the background, and when the command is done, the window will open again
> > > showing the final output.
> > > 
> > > So all in all, I do think Ctrl-W would be a better idea. Will re-roll.
> > 
> > Thank you,
> > Dscho
> > 
> 
> -- 
> Vasilii Novikov
> Software Developer
> vasilii.novikov@zivver.com
> 
> ZIVVER B.V. • Koningin Wilhelminaplein 30 • 1062 KR Amsterdam
> www.zivver.com • +31 85 01 60 555 <+31-85-0160555>
> Follow us on: twitter <https://twitter.com/zivver_nl>, facebook
> <https://www.facebook.com/zivver> and linkedin
> <https://www.linkedin.com/company/zivver>
> 
> ✓ Voldoe jij al aan de GDPR-wetgeving?
> <https://get.zivver.eu/nl/gdpr-checklist/>

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-10 12:02         ` Pratyush Yadav
@ 2019-12-10 12:11           ` Vasili Novikov
  2019-12-10 13:31             ` Pratyush Yadav
  0 siblings, 1 reply; 9+ messages in thread
From: Vasili Novikov @ 2019-12-10 12:11 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: git

Hi all,
Sorry if threading was broken: Thunderbird possibly doesn't fully 
support mbox import that I used. Or I did it unproperly. Either way, 
hope it's correct now.

Thanks for explaining. I misunderstood the purpose of the window. If 
it's a slow ongoing task, then indeed it should not be closeable with 
Esc. I'd say it makes sense to allow Esc to work when it gets into 
"Success" state though, as in the screenshot.


Thanks,
Vasili

On 10/12/2019 13.02, Pratyush Yadav wrote:
> Hi Vasili,
> 
> Please try to not top-post on the list.
> 
> On 09/12/19 04:53PM, Vasili Novikov wrote:
>> What have console windows to do with git gui though? I'd work under the
> 
> Well, the window/popup in question is internally named "console" and is
> defined in lib/console.tcl. It is used by many parts of git-gui that
> need to execute a command and show the output to the user.
> 
>> following assumptions:
>> * we're talking about a GUI window, not a TUI one
>> * the window has no useful information at all except the fact that something
>> has "finished", is "done". There are no actions that you can take except to
>> dismiss the window.
>   
> It also shows you the output of a command currently in progress (like
> git-push). My main argument with avoiding Escape is that people often
> expect Escape to stop an ongoing command. In this case though, closing
> the window does not actually stop the command. It keeps going on in the
> background.
> 
> But since the window is gone, people might think the command they were
> running has stopped, which might lead to some unexpected results.
> 
>> If we agree on the following assumptions, then I see these real-world
>> examples:
>> * Mousepad > About > Esc = closes the popup
>> * Firefox > About > Esc = closes the popup
>> * Thunar > select any file and ask its properties > Esc = closes the window
>> * file-roller (GNOME compressed archive manager) > Extract archive > Observe
>> success window upon completion > Esc = closes the window.
> 
> In this case, the thing is done. There is no ongoing task. Not quite the
> case with the console window in git-gui, which can also show ongoing
> tasks.
>   
>> Are there any real-world examples where `Ctrl W` or `Esc D` work but `Esc`
>> doesn't, to consider these alternatives as more intuitive to users?
>>
>>
>> On 09/12/2019 10.18, Johannes Schindelin wrote:
>>> Hi Pratyush,
>>>
>>> On Mon, 9 Dec 2019, Pratyush Yadav wrote:
>>>
>>>> On 07/12/19 05:24PM, Johannes Schindelin wrote:
>>>>>
>>>>> On Sat, 7 Dec 2019, Pratyush Yadav wrote:
>>>>>
>>>>>> It is often expected that popup windows like the console window be
>>>>>> close-able with Esc.
>>>>>
>>>>> Seeing as the console windows is not your regular popup window with an
>>>>> "OK" button, I could see how it would be all too easy to close the window
>>>>> via the Esc button all too easily, annoying users.
>>>>
>>>> I'm not sure why it is "too easy" to hit Escape. If you're hitting Esc
>>>> (which for most people is pretty far from other more frequently used
>>>> keys) you expect _something_ to happen. People don't just spam Esc for
>>>> no reason, do they?
>>>
>>> Is it possible to issue a command in that console window? If yes, Esc D is
>>> what people like me would possibly use to delete entire words.
>>>
>>> Even if not, if there is no "OK" button, it would annoy me no end if the
>>> Escape key closes the window (it is not a dialog box, after all).
>>>
>>>>> For windows like the console one, I would expect Ctrl+W a much more
>>>>> natural keyboard shortcut to close it.
>>>>
>>>> But, that "something" the user expects to happen could also be "stop the
>>>> command". AFAIK, Esc is often expected to stop commands. But closing the
>>>> console window won't actually stop the command. It will keep running in
>>>> the background, and when the command is done, the window will open again
>>>> showing the final output.
>>>>
>>>> So all in all, I do think Ctrl-W would be a better idea. Will re-roll.
>>>
>>> Thank you,
>>> Dscho
>>>
>>
>> -- 
>> Vasilii Novikov
>> Software Developer
>> vasilii.novikov@zivver.com
>>
>> ZIVVER B.V. • Koningin Wilhelminaplein 30 • 1062 KR Amsterdam
>> www.zivver.com • +31 85 01 60 555 <+31-85-0160555>
>> Follow us on: twitter <https://twitter.com/zivver_nl>, facebook
>> <https://www.facebook.com/zivver> and linkedin
>> <https://www.linkedin.com/company/zivver>
>>
>> ✓ Voldoe jij al aan de GDPR-wetgeving?
>> <https://get.zivver.eu/nl/gdpr-checklist/>
> 

-- 
Vasilii Novikov

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-10 12:11           ` Vasili Novikov
@ 2019-12-10 13:31             ` Pratyush Yadav
  2019-12-13 13:29               ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Pratyush Yadav @ 2019-12-10 13:31 UTC (permalink / raw)
  To: Vasili Novikov; +Cc: git, Johannes Schindelin

(+Cc Dscho who got dropped from the Cc list somewhere along the way)

Hi Vasili,

On 10/12/19 01:11PM, Vasili Novikov wrote:
> Hi all,
> Sorry if threading was broken: Thunderbird possibly doesn't fully support
> mbox import that I used. Or I did it unproperly. Either way, hope it's
> correct now.

Threading seems to works fine for you. I meant avoiding top posting. 
More explanation on top posting and bottom posting here 
http://www.idallen.com/topposting.html
 
> Thanks for explaining. I misunderstood the purpose of the window. If it's a
> slow ongoing task, then indeed it should not be closeable with Esc. I'd say
> it makes sense to allow Esc to work when it gets into "Success" state
> though, as in the screenshot.

Hmm, I like the idea. Does that work for you Dscho?
 
> 
> Thanks,
> Vasili
> 
> On 10/12/2019 13.02, Pratyush Yadav wrote:
> > Hi Vasili,
> > 
> > Please try to not top-post on the list.
> > 
> > On 09/12/19 04:53PM, Vasili Novikov wrote:
> > > What have console windows to do with git gui though? I'd work under the
> > 
> > Well, the window/popup in question is internally named "console" and is
> > defined in lib/console.tcl. It is used by many parts of git-gui that
> > need to execute a command and show the output to the user.
> > 
> > > following assumptions:
> > > * we're talking about a GUI window, not a TUI one
> > > * the window has no useful information at all except the fact that something
> > > has "finished", is "done". There are no actions that you can take except to
> > > dismiss the window.
> > It also shows you the output of a command currently in progress (like
> > git-push). My main argument with avoiding Escape is that people often
> > expect Escape to stop an ongoing command. In this case though, closing
> > the window does not actually stop the command. It keeps going on in the
> > background.
> > 
> > But since the window is gone, people might think the command they were
> > running has stopped, which might lead to some unexpected results.
> > 
> > > If we agree on the following assumptions, then I see these real-world
> > > examples:
> > > * Mousepad > About > Esc = closes the popup
> > > * Firefox > About > Esc = closes the popup
> > > * Thunar > select any file and ask its properties > Esc = closes the window
> > > * file-roller (GNOME compressed archive manager) > Extract archive > Observe
> > > success window upon completion > Esc = closes the window.
> > 
> > In this case, the thing is done. There is no ongoing task. Not quite the
> > case with the console window in git-gui, which can also show ongoing
> > tasks.
> > > Are there any real-world examples where `Ctrl W` or `Esc D` work but `Esc`
> > > doesn't, to consider these alternatives as more intuitive to users?

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] git-gui: allow closing console window with Escape
  2019-12-10 13:31             ` Pratyush Yadav
@ 2019-12-13 13:29               ` Johannes Schindelin
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2019-12-13 13:29 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Vasili Novikov, git

Hi,

On Tue, 10 Dec 2019, Pratyush Yadav wrote:

> On 10/12/19 01:11PM, Vasili Novikov wrote:
>
> > Sorry if threading was broken: Thunderbird possibly doesn't fully support
> > mbox import that I used. Or I did it unproperly. Either way, hope it's
> > correct now.
>
> Threading seems to works fine for you. I meant avoiding top posting.
> More explanation on top posting and bottom posting here
> http://www.idallen.com/topposting.html
>
> > Thanks for explaining. I misunderstood the purpose of the window. If it's a
> > slow ongoing task, then indeed it should not be closeable with Esc. I'd say
> > it makes sense to allow Esc to work when it gets into "Success" state
> > though, as in the screenshot.
>
> Hmm, I like the idea. Does that work for you Dscho?

I'm fine with whatever you settle with, I am not really a Git GUI user (I
just deal with a couple of those users in my role as Git for Windows
maintainer).

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-12-13 13:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 22:20 [PATCH] git-gui: allow closing console window with Escape Pratyush Yadav
2019-12-07 16:24 ` Johannes Schindelin
2019-12-08 19:40   ` Pratyush Yadav
2019-12-09  9:18     ` Johannes Schindelin
2019-12-09 15:53       ` Vasili Novikov
2019-12-10 12:02         ` Pratyush Yadav
2019-12-10 12:11           ` Vasili Novikov
2019-12-10 13:31             ` Pratyush Yadav
2019-12-13 13:29               ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).