Closed Bug 1167359 Opened 9 years ago Closed 5 years ago

[computed view] Add a search link that applies the search property in the rule view

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1476687

People

(Reporter: gl, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

In chrome's computed view, there is a search icon next to each property name that will link to the rule view and filter by that property. I think this is a good way to link between the 2 views. See https://cloudup.com/c2dk9qElYx9
OS: Unspecified → All
Hardware: Unspecified → All
Great idea.
Assignee: nobody → gabriel.luong
This adds a search link in the computed view list that will select the node and switch to the rule view applying a strict search for the property name.
Attachment #8651635 - Flags: feedback?(pbrosset)
Depends on: 1197048
Attachment #8651632 - Attachment is obsolete: true
Attachment #8651632 - Flags: review?(pbrosset)
Attachment #8651639 - Flags: review?(pbrosset)
Attachment #8651639 - Flags: review?(pbrosset) → review+
Comment on attachment 8651635 [details] [diff] [review]
Part 2: Add a search link in the computed view that applies the search property in the rule view

Review of attachment 8651635 [details] [diff] [review]:
-----------------------------------------------------------------

I like the general idea, but I have one sort of problem with an aspect of it.
I don't think we should be jumping to another node when the user clicks on the search link because finding elements in the markup-view can be hard.
My feeling is that anything that allows you to select another node should look like a node, and possibly have the inspector icon next to it:
- in the markup-view itself, it's obvious that clicking on nodes is going to take you there,
- in the breadcrumbs, crumbs look like nodes,
- in the console, logging a DOM node produces something that looks like a node and has the inspector icon next to it,
- same in the variable-view
- same in the animation-inspector

However in the computed view, we don't have that concept, the things you click next to in your patch are selectors, not node previews. So I think there's an expectation from users that the selection isn't going to change.

Also, if the computed property value comes from an inherited rule, then that rule is going to show up in the rule-view even if you don't select the parent node.
The only problem is if the computed property value comes from a user-agent style and user-agent styles are disabled in the options panel. Then you'd end up with a search in the rule-view that shows no results.
One option is to not have the search icon next to user-agent styles if they're disabled.

::: browser/devtools/styleinspector/utils.js
@@ +188,5 @@
> + */
> +let selectNode = Task.async(function*(data, inspector) {
> +  let nodeFront = yield getNodeFront(data, inspector);
> +  let updated = inspector.once("inspector-updated");
> +  inspector.selection.setNodeFront(nodeFront);

Can you add a reason as a second parameter to setNodeFront? This is useful in other parts of the code to filter out unwanted inspector-updated events.
This can be a new reason like "computed-view"
Attachment #8651635 - Flags: feedback?(pbrosset)
Attachment #8651639 - Flags: checkin+
Keywords: leave-open
Inspector bug triage. Filter on CLIMBING SHOES.
Severity: normal → enhancement
Priority: -- → P3
Assignee: gl → nobody
Product: Firefox → DevTools
The leave-open keyword is there and there is no activity for 6 months.
:gl, maybe it's time to close this bug?
Flags: needinfo?(gl)

Actually this new feature isn't implemented. The part1 patch that landed a long time ago was just clean-up and the actual implementation of the feature didn't land.
We now have a new API to jump to the rule-view, maybe we want to re-consider implementing this based on it (cc Micah who knows about this).

Flags: needinfo?(gl)
Keywords: leave-open

Oh I just found another bug for the same feature, so let me close this one.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: