From: "Jens Lideström" <jens@lidestrom.se>
To: Johannes Sixt <j6t@kdbg.org>
Cc: "Paul Mackerras [ ]" <paulus@ozlabs.org>, git@vger.kernel.org
Subject: Re: [PATCH 9/9] gitk: default select reset hard in dialog
Date: Wed, 28 Jun 2023 09:16:11 +0200 [thread overview]
Message-ID: <b2e0d8fa1b54d9dbc6a0831d53acb85f@lidestrom.se> (raw)
In-Reply-To: <e74cc1b3-8459-101f-4613-17df0f5d69e3@kdbg.org>
> I would prefer to keep the default at "mixed" mode, set the focus on
> the
> radio button to make it easy to switch to "hard" mode by hitting the
> Down arrow key, and then make it so that Enter triggers the OK button.
That indeed sounds better! Safer but still convenient. I'll change the
solution to this.
I noticed that some dialogues have a key bind to close with success
using Enter.
/Jens
On 2023-06-28 07:46, Johannes Sixt wrote:
> Am 27.06.23 um 16:41 schrieb Jens Lidestrom via GitGitGadget:
>> From: Jens Lidestrom <jens@lidestrom.se>
>>
>> Reset hard is dangerous but also the most common reset type, and not
>> having it pre-selected in the dialog is annoying to users.
>
> I agree that the operation of the Reset dialog is clumsy before this
> series. However, this patch together with the previous patch turns it
> into a foot gun. It becomes far too easy to destroy uncommitted work.
>
> I would prefer to keep the default at "mixed" mode, set the focus on
> the
> radio button to make it easy to switch to "hard" mode by hitting the
> Down arrow key, and then make it so that Enter triggers the OK button.
>
>> It is also less dangerous in the GUI where there is a confirmation
>> dialog. Also, dangling commits remain in the GUI and can be recovered.
>
> The problem with "hard" mode are not the commits. The real danger is
> that it blows away uncommitted changes. Besides of that, I do not
> consider this UI a confirmation dialog.
>
> -- Hannes
>
>>
>> Signed-off-by: Jens Lidestrom <jens@lidestrom.se>
>> ---
>> gitk-git/gitk | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/gitk-git/gitk b/gitk-git/gitk
>> index 9d93053e360..5b0a0ea46be 100755
>> --- a/gitk-git/gitk
>> +++ b/gitk-git/gitk
>> @@ -9906,7 +9906,9 @@ proc resethead {reset_target_id} {
>> [mc "Reset branch %s to %s?" $mainhead [commit_name
>> $reset_target_id 1]]
>> pack $w.m -side top -fill x -padx 20 -pady 20
>> ${NS}::labelframe $w.f -text [mc "Reset type:"]
>> - set resettype mixed
>> + # Reset hard is dangerous but also the most common reset type,
>> and not
>> + # having it pre-selected in the dialog is annoying to users.
>> + set resettype hard
>> ${NS}::radiobutton $w.f.soft -value soft -variable resettype \
>> -text [mc "Soft: Leave working tree and index untouched"]
>> grid $w.f.soft -sticky w
next prev parent reply other threads:[~2023-06-28 8:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 14:41 [PATCH 0/9] gitk: improve keyboard support Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 1/9] gitk: add procedures to get commit info from selected row Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 2/9] gitk: use term "current branch" in gui Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 3/9] gitk: add keyboard bind for reset Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 4/9] gitk: show branch name in reset dialog Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 5/9] gitk: add keyboard bind for checkout Jens Lidestrom via GitGitGadget
2023-07-02 12:10 ` Jens Lideström
2023-06-27 14:41 ` [PATCH 6/9] gitk: add keyboard bind for create and remove branch Jens Lidestrom via GitGitGadget
2023-06-28 5:59 ` Johannes Sixt
2023-06-28 7:12 ` Jens Lideström
2023-06-28 20:30 ` Johannes Sixt
2023-07-02 11:50 ` Jens Lideström
2023-06-27 14:41 ` [PATCH 7/9] gitk: add keyboard bind to cherry-pick Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 8/9] gitk: focus ok button in reset dialog Jens Lidestrom via GitGitGadget
2023-06-27 14:41 ` [PATCH 9/9] gitk: default select reset hard in dialog Jens Lidestrom via GitGitGadget
2023-06-28 5:46 ` Johannes Sixt
2023-06-28 7:16 ` Jens Lideström [this message]
2023-07-02 12:09 ` Jens Lideström
2023-06-28 6:09 ` [PATCH 0/9] gitk: improve keyboard support Johannes Sixt
2023-06-28 7:01 ` Jens Lideström
2023-06-28 17:32 ` Jens Lideström
2023-06-28 20:32 ` Johannes Sixt
2023-07-02 12:28 ` Jens Lideström
2023-07-03 18:45 ` [PATCH v2 00/10] " Jens Lidestrom via GitGitGadget
2023-07-03 18:45 ` [PATCH v2 01/10] gitk: add procedures to get commit info from selected row Jens Lidestrom via GitGitGadget
2023-07-03 18:45 ` [PATCH v2 02/10] gitk: use term "current branch" in gui Jens Lidestrom via GitGitGadget
2023-07-03 18:45 ` [PATCH v2 03/10] gitk: add keyboard bind for reset command Jens Lidestrom via GitGitGadget
2023-07-03 18:45 ` [PATCH v2 04/10] gitk: show branch name in reset dialog Jens Lidestrom via GitGitGadget
2023-07-03 18:45 ` [PATCH v2 05/10] gitk: add keyboard bind for checkout command Jens Lidestrom via GitGitGadget
2023-07-05 17:29 ` Johannes Sixt
2023-07-08 12:09 ` Jens Lideström
2023-07-03 18:45 ` [PATCH v2 06/10] gitk: add keyboard bind for remove branch command Jens Lidestrom via GitGitGadget
2023-07-05 20:00 ` Johannes Sixt
2023-07-08 12:09 ` Jens Lideström
2023-07-03 18:45 ` [PATCH v2 07/10] gitk: add keyboard bind for cherry-pick command Jens Lidestrom via GitGitGadget
2023-07-05 20:07 ` Johannes Sixt
2023-07-08 12:09 ` Jens Lideström
2023-07-03 18:45 ` [PATCH v2 08/10] gitk: add keyboard bind for create branch command Jens Lidestrom via GitGitGadget
2023-07-05 20:02 ` Johannes Sixt
2023-07-03 18:45 ` [PATCH v2 09/10] gitk: improve keyboard convenience in reset dialog Jens Lidestrom via GitGitGadget
2023-07-05 19:52 ` Johannes Sixt
2023-07-03 18:45 ` [PATCH v2 10/10] gitk: allow checkout of remote branch Jens Lidestrom via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2e0d8fa1b54d9dbc6a0831d53acb85f@lidestrom.se \
--to=jens@lidestrom.se \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=paulus@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).