Add the ability to select/highlight/scroll-to a property in the rule-view

RESOLVED FIXED in Firefox 67

Status

enhancement
RESOLVED FIXED
6 months ago
2 months ago

People

(Reporter: pbro, Assigned: mtigley)

Tracking

unspecified
Firefox 67

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 months ago
There are at least a couple of reasons why we would like to do this:

- in bug 1493677 we would like to jump from the box-model to the rule-view, to tell users where a given margin, or padding or border was actually defined in the CSS
- in bug 1478396 were are considering jumping from the flex item sizing properties list to the rule-view, to show users where a given base size, growth or max clamping were defined in CSS.

So, the idea here is to have the rule-view expose an API that allows other panels to do just this.
Something like ruleView.highlightProperty(name, value);

This would find the first instance of this property (the one that's not overridden), scroll to it, and maybe flash it for a second to draw the user's attention towards it.
(Reporter)

Comment 1

5 months ago
This is a feature enhancement that we were hoping to capture in the Flexbox inspector milestone 2 scope, but as we're getting near our deadline for M2 and as this is separate enough, I think we should move it to later. If we do manage to land it in time for 65, fine, but if we don't, no big deal.
No longer blocks: 1478396
(Assignee)

Updated

4 months ago
Assignee: nobody → mtigley
Status: NEW → ASSIGNED

We might want to hold off on landing this patch until we have a feature ready that can make use of this API.

(Assignee)

Comment 4

2 months ago

Another thing to consider is ensuring the rule-view is visible before highlighting/scrolling-to the property for 2-pane mode. So, in the case of the box-model example, when the box-model property is selected we should be switching to the rule-view before highlighting.

Comment 6

2 months ago
Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a4aefb36aff
Expose a method from rule view that scrolls to a rule property's name and value. r=gl

Comment 7

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.