debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Confusing tooltips on step buttons

Open kenjiO opened this issue 8 years ago • 15 comments

It's hard for me to understand the tooltips showing the keyboard shortcuts for the step buttons. I think it would be better to use parenthesses and add an 'or' between the two shortcuts. ie: (⌘\ or F8)

The tooltips for the toolbox panels use cmd instead of ⌘ and also use '+' for multikey shortcuts. Do you want to do this here as well?

kenjiO avatar Sep 18 '18 20:09 kenjiO

I got this one. /claim

ghost avatar Sep 24 '18 03:09 ghost

Thanks for claiming the issue! :wave:

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Sep 24 '18 03:09 claim

I think putting parens around multi-key options is a great idea. It is always a bit confusing when an app or some part of a UI doesn't distinguish how to accomplish keyboard shortcuts. This improves usability. Going to work on this tomorrow.

ghost avatar Sep 24 '18 03:09 ghost

Looks like this is fixed. Seems the desired behavior is working in Firefox Developer Build.

@jasonLaster maybe this is fixed? I don't want to unclaim this if there is something I can do.

ghost avatar Sep 24 '18 03:09 ghost

Hello @twhite96 , so here the issue is on the stepping / pausing buttons:

image

There are 3 things that differs from tooltip in other places (like on the panel tabs) :

image
  1. We use the ⌘ char in the debugger, where we use Cmd in other places
  2. We user the \ char to separate multitple shortcuts, where we could use a more explicit or
  3. We don't show a + between chars when the shortcut is multi-keys.

I think using ⌘ is fine, we do it in several places in the debugger. But we should drop \ in favor of or, and use the + when needed.

By the way, looking at the "help" modal, we already use the +.

image

It looks like we don't reference all the possible shortcut, it may be nice to do it there as well

nchevobbe avatar Sep 24 '18 05:09 nchevobbe

Okay. Misunderstood the issue. I was trying to find the component/css file where the tooltips are but couldn't. I'll have to read through the codebase a couple times to see where things are.

ghost avatar Sep 24 '18 05:09 ghost

So the stepping buttons are created here https://github.com/devtools-html/debugger.html/blob/ffaf7049156cb17b3dfccfdbf02835661515619c/src/components/SecondaryPanes/CommandBar.js#L140-L162

and the Pause one https://github.com/devtools-html/debugger.html/blob/ffaf7049156cb17b3dfccfdbf02835661515619c/src/components/SecondaryPanes/CommandBar.js#L169-L203

You can see that they all use the debugButton function, that we import https://github.com/devtools-html/debugger.html/blob/ffaf7049156cb17b3dfccfdbf02835661515619c/src/components/SecondaryPanes/CommandBar.js#L22

https://github.com/devtools-html/debugger.html/blob/ffaf7049156cb17b3dfccfdbf02835661515619c/src/components/shared/Button/CommandBarButton.js#L17-L37

So, now for the tooltip, let's have a look for the pause button.

https://github.com/devtools-html/debugger.html/blob/e6113cf4d9e972fc681939de859a6a748a28bb69/src/components/SecondaryPanes/CommandBar.js#L202

The string comes from https://github.com/devtools-html/debugger.html/blob/a3085aec5bd0b4da1661f81707b921fd12801a97/assets/panel/debugger.properties#L63

The %S part means there's a string substitution being made, with the result of formatKey("resume").

https://github.com/devtools-html/debugger.html/blob/e6113cf4d9e972fc681939de859a6a748a28bb69/src/components/SecondaryPanes/CommandBar.js#L64-L73

It then uses https://github.com/devtools-html/debugger.html/blob/181074bee99b0e9e6042792ea6123d6588e36a2b/src/utils/text.js#L29-L40


I hope this will help you getting started :)

nchevobbe avatar Sep 24 '18 06:09 nchevobbe

Yep! Thanks @nchevobbe.

ghost avatar Sep 25 '18 04:09 ghost

How's it going @twhite96?

jasonLaster avatar Dec 20 '18 16:12 jasonLaster

@jasonLaster I really haven't even gotten to this yet. At the time I was having a hard time getting web sockets to just run on my machine and I gave up. I've also been in a round of interviews. I'm going to pull the changes here and see what I can get done over the weekend before Christmas. I'm sorry for this. I was just so frustrated.

ghost avatar Dec 21 '18 07:12 ghost

@twhite96 that's okay. ping me if you have questions

jasonLaster avatar Dec 21 '18 14:12 jasonLaster

Working on this now. Just need to update my fork.

ghost avatar Jan 29 '19 16:01 ghost

Great! Welcome back @twhite96 !

darkwing avatar Jan 29 '19 17:01 darkwing

Looking over the lines that @nchevobbe pointed out and I am starting to get what is happening. I'm going to take a few notes and come back to it later tonight.

ghost avatar Jan 29 '19 17:01 ghost

Hello @twhite96! How is this going? Anything I can do to help?

darkwing avatar Feb 11 '19 19:02 darkwing