This message was deleted.
# report-bugs
s
This message was deleted.
c
cc @merrill for keyboard shortcuts
❤️ 1
m
We have a few KPs around escape taking you back to the PR inbox when it’s supposed to back out of focus on local UI - it should only take you back to the dashboard if you’re at the top level of focus. We’re planning to fix those in the next few weeks, and then let’s revisit and see if it feels better?
1
d
@Ben Jaffe what contexts are you accidentally hitting esc in? can you speak more to what you're trying to do when this occurs?
b
Oh gosh, that's all so sub-conscious. I know i hit the discard changes? modal twice today unexpectedly, and I've been learning to use escape again to get back out of it (though it makes me uneasy every time). I'll try and track how these situations come up and follow up here.
Unrelated: Looks like escape doesn't exit out of the Syntax Highlighting selection menu.
d
Unrelated: Looks like escape doesn't exit out of the Syntax Highlighting selection menu.
filed a linear for this one
yeah as soon as you hit any escape issues feel free to dump here
b
Part of it is that for keyboard shortcut people, it's easy to move fast. If I hit escape, I expect it'd close a modal or an emoji picker, so it's usually safe, and so my fingers don't shy away from it. But with Graphite, if I press it, my whole world disappears, and I have to click in and find my place again. I also have anxiety every time about whether the comments I was writing got lost.
I'll also document other cases if I find them, but that's the trees. The forest is that I don't expect Esc to flip the table upside down.
If y'all decide you really want to leave Esc as a shortcut for going to the main dashboard, please at least consider adding an "are you sure, you'll lose your place" modal if I've scrolled down, or done anything in the PR.
If you really want an esc-like shortcut, maybe consider mapping it to Cmd-Esc, and leaving Esc for closing small ephemeral UI.
m
Makes sense - you definitely shouldn’t lose any pending comments or edits by navigating back the inbox
b
I think I don't lose anything (I'm not positive, but I think)... but that's not exactly the issue.
I'm losing scroll position (which is a bit hard to regain while you're working on scroll stability), and I'm losing flow
👍 1
m
(Scroll as well)
b
Flow is the big one, but I'm glad to know that stable and persistent scroll is coming ❤️
b
I run into this problem pretty frequently since I use vim keybindings. When I click to add a comment and then decide against it, I'll hit escape but I'll often hit it 2-3 times because of vim muscle memory (I usually tap it multiple times to make sure it reads correctly since there is no penalty to doing that in vim) and it drops me back into the PR list. If I'm remembering right it used to be worse because the escape also handled the delete comment confirmation screen (which it doesn't seem to anymore which is probably good) and I would get dropped to the PR list more often, but now I get locked there if I've written anything
1
b
Another situation I ran into. I clicked to add a comment, changed my mind, and then pressed escape a few times. That booted me all the way out to the dashboard and I had to find my place again. Edit: gah, I did it again 😐
Yes, technically I should only press space once in that situation, but alas, I don't have direct control of my muscle memory. The fact that some people press
esc
with such reckless abandon is probably because it's safe to do in most applications.
Did it again, this time was weird. I clicked to make a comment, right-clicked, then pressed escape to dismiss the right-click dialog, then escape again to dismiss the empty comment box. That second escape popped be to the dashboard instead of dismissing the comment box.
b
I got dumped out of a review again today due to a double escaping, this time it was because I was doing a ctr+f search and wanted to end the search
d
@Ben Jaffe yeah i think if you right clicked out of the box, your
document.activeElement
is the
<body>
and now
esc
will send you to the dashboard
@Brian Crites and in this case you hit esc 1x too many times right? i'm seeing that at least the find box does handle
esc
if you don't overhit
esc
b
Yeah, the issue is I'm hitting it twice instead of once. So not exactly a bug since I think this is how its intended to work, more that it feels less than ideal for me
👍 1
d
curious if there are other users lurking in this channel that also have issues accidentally pressing
escape
and being sent to the review dashboard? (esp. curious if it's a vim thing, or a general thing)
2
b
I'm not a vim user... not cool enough.
😆 2
b
I just hit a similar (and maybe more annoying version) of this bug in the edit PR description field. I was going to create a code block and on the last ` I entered I accidentally hit
esc
instead and then was already hitting enter to go to the next line of the code box which discarded my changes 🫠
😢 2
d
i'm curious if allowing enter to trigger buttons is useful or dangerous, vs. sticking with web patterns of spacebar only
b
I think for dialogs that are potentially very destructive, more friction (while still being accessible) is better.
d
in this case, i might say that we shouldn't be autofocusing the destructive button
and let you tab to it
because even if we went spacebar only, what if you were typing a space, which happens oh idk like every word?!
we should autofocus the dialog box itself
so that the buttons are 1-2 tabs away
b
good call