RESOLVED FIXED 149195
Web Inspector: Command-Enter in Debugger should show a popover with evaluation result
https://bugs.webkit.org/show_bug.cgi?id=149195
Summary Web Inspector: Command-Enter in Debugger should show a popover with evaluatio...
Nikita Vasilyev
Reported 2015-09-15 16:14:45 PDT
I've been using Command-Enter in Debugger (https://bugs.webkit.org/show_bug.cgi?id=148368) for a few days and I'm not very satisfied. I think Command-Enter should show the exact same popover as on hover. The current behavior, evaluating in the console, is too disconnected from the source code and requires an extra mental effort to keep the context.
Attachments
[Animated GIF] With the patch applied (470.53 KB, image/gif)
2015-09-15 16:21 PDT, Nikita Vasilyev
no flags
[Animated GIF] Cmd-Enter shows type info popovers (118.43 KB, image/gif)
2015-09-15 16:35 PDT, Nikita Vasilyev
no flags
WIP (16.48 KB, patch)
2015-09-15 16:37 PDT, Nikita Vasilyev
nvasilyev: review-
nvasilyev: commit-queue-
Patch (20.17 KB, patch)
2015-09-16 07:28 PDT, Nikita Vasilyev
no flags
Patch (20.17 KB, patch)
2015-09-16 07:29 PDT, Nikita Vasilyev
bburg: commit-queue-
Patch (20.19 KB, patch)
2015-10-21 22:00 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2015-09-15 16:15:35 PDT
Nikita Vasilyev
Comment 2 2015-09-15 16:21:36 PDT
Created attachment 261257 [details] [Animated GIF] With the patch applied Command-Enter shows the popover.
Nikita Vasilyev
Comment 3 2015-09-15 16:35:19 PDT
Created attachment 261258 [details] [Animated GIF] Cmd-Enter shows type info popovers I also accidentally improved keyboard navigation for type profiler. Command-Enter shows popovers with type information too.
Nikita Vasilyev
Comment 4 2015-09-15 16:37:30 PDT
Nikita Vasilyev
Comment 5 2015-09-16 07:28:00 PDT
Created attachment 261305 [details] Patch Currenty, the only way to display the popover is to hover over the text with a mouse cursor. Provide a way to display it via a keyboard shortcut, Command-Enter.
Nikita Vasilyev
Comment 6 2015-09-16 07:29:39 PDT
Blaze Burg
Comment 7 2015-10-18 16:24:50 PDT
Comment on attachment 261306 [details] Patch Oops, this patch has been gathering dust far too long, sorry about that. I don't know the CodeMirror integrations well enough to review this. Joe or Tim (or Devin), can you take a look?
Joseph Pecoraro
Comment 8 2015-10-20 14:10:12 PDT
Comment on attachment 261306 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261306&action=review > Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js:593 > +WebInspector.CodeMirrorTokenTrackingController.TriggeredBy = { > + Keyboard: "keyboard", > + Hover: "hover" > +}; Seems this would add complexity for a very hard to discover feature. Is there some way we can make this more discoverable, otherwise I fear it wouldn't be used much?
Nikita Vasilyev
Comment 9 2015-10-21 21:58:11 PDT
(In reply to comment #8) > Comment on attachment 261306 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=261306&action=review > > > Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js:593 > > +WebInspector.CodeMirrorTokenTrackingController.TriggeredBy = { > > + Keyboard: "keyboard", > > + Hover: "hover" > > +}; > > Seems this would add complexity for a very hard to discover feature. Is > there some way we can make this more discoverable, otherwise I fear it > wouldn't be used much? I don't think it's that different from the rest of keyboard shortcuts. Also, Command-Enter already evaluates selected console message: https://twitter.com/ELV1S/status/636431257379864576. Eventually, we will have a page with all shortcuts. I'll also write a blog post, too. I think this shortcut isn't that hard to remember. Certainly easier than Chrome's Control-Shift-E, which evaluates selection in the console. I don't think we should give up on keyboard accessability only because it adds complexity. This patch levereges existing mouse over handling. I had to add WebInspector.CodeMirrorTokenTrackingController.TriggeredBy.Keyboard to avoid hiding the popover on mouse move. When we show the popover on mouse hover, we hide it when there is a mouse movement outside of evaluated token. It didn't work well with Command-Enter and I had to add WebInspector.CodeMirrorTokenTrackingController.TriggeredBy.Keyboard.
Nikita Vasilyev
Comment 10 2015-10-21 22:00:43 PDT
Created attachment 263793 [details] Patch Rebaselined.
WebKit Commit Bot
Comment 11 2015-10-23 10:11:46 PDT
Comment on attachment 263793 [details] Patch Clearing flags on attachment: 263793 Committed r191496: <http://trac.webkit.org/changeset/191496>
WebKit Commit Bot
Comment 12 2015-10-23 10:11:52 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.