Bug 149521 - Web Inspector: Option-Click on a goto arrow in the Computed view should jump to resource view
Summary: Web Inspector: Option-Click on a goto arrow in the Computed view should jump ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-24 05:59 PDT by Nikita Vasilyev
Modified: 2016-02-10 12:48 PST (History)
9 users (show)

See Also:


Attachments
Patch (5.99 KB, patch)
2015-09-27 23:28 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Video] Option-Click on a property name in the Computed view doesn't do anything (1.97 MB, video/mp4)
2015-12-20 01:55 PST, Nikita Vasilyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2015-09-24 05:59:50 PDT
Option-Click on a CSS property in the "Styles — Rules" view jumps to the resource view.
Option-Click on a CSS property in the "Styles — Computed" view should do the same.
Comment 1 Radar WebKit Bug Importer 2015-09-24 06:00:14 PDT
<rdar://problem/22837357>
Comment 2 Devin Rousso 2015-09-27 23:28:19 PDT
Created attachment 262001 [details]
Patch
Comment 3 WebKit Commit Bot 2015-10-02 14:12:14 PDT
Comment on attachment 262001 [details]
Patch

Clearing flags on attachment: 262001

Committed r190521: <http://trac.webkit.org/changeset/190521>
Comment 4 WebKit Commit Bot 2015-10-02 14:12:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Joseph Pecoraro 2015-10-02 14:19:22 PDT
Comment on attachment 262001 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=262001&action=review

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:970
> +            let arrowElement = WebInspector.createGoToArrowButton();
> +            arrowElement.title = "Option-click to show source";

This should be a localized string (WebInspector.UIString(...)).
Comment 6 Devin Rousso 2015-10-02 14:45:04 PDT
(In reply to comment #5)
> Comment on attachment 262001 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=262001&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:970
> > +            let arrowElement = WebInspector.createGoToArrowButton();
> > +            arrowElement.title = "Option-click to show source";
> 
> This should be a localized string (WebInspector.UIString(...)).

Ah whoops.  Totally forgot about that.  I'll make another bug and fix it.
Comment 7 Nikita Vasilyev 2015-12-20 01:55:24 PST
Created attachment 267711 [details]
[Video] Option-Click on a property name in the Computed view doesn't do anything

The landed patch doesn't do what the title of this bug says:
Option-Click on a property NAME in the Computed view should
jump to resource view.

Also, note how in the Styles view while Option key is held,
hovering over property names and values changes them to blue
and adds underline (although, it seems to not work that well
for "-webkit-" and other browser vendor properties, for some
reason).

I'm sorry I haven't replied earlier.
Comment 8 Nikita Vasilyev 2016-02-09 16:17:37 PST
Reopening.
Comment 9 Nikita Vasilyev 2016-02-10 12:23:23 PST
I've decided to close this bug. The go-to arrows implemented
by Devin are easier to discover.

In "Styles — Rules", Option-clicking on a property name isn't
a very common action. CSS rule's source links (on the right
to CSS selectors) allow navigating to the corresponding line
in CSS resource already.

With CSS variables gaining popularity, we may want to
repurpose Option-Click. In the following example,

    .title {
      color: var(--theme-text-color)
    }

Option-clicking on "--theme-text-color" would jump to the variable's
definition, e.g.:

    body {
      --theme-text-color: black
    }
Comment 10 Timothy Hatcher 2016-02-10 12:41:24 PST
Please file a bug about variable jumping.
Comment 11 Nikita Vasilyev 2016-02-10 12:48:53 PST
https://bugs.webkit.org/show_bug.cgi?id=154082