Closed Bug 1134551 Opened 10 years ago Closed 9 years ago

Refactor the rule-view, computed-view and style-inspector-overlay for addons to add features

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: pbro, Unassigned)

Details

The rule-view and computed-view panels essentially display style information. But recently (over the past year or so), they've started to do more: - they have color editor tooltips - they have color previews - they have image preview tooltips - they highlight nodes on some properties/selectors hover - etc... It seems that these panels are a good candidate for more features, some of which will be done by addons. The code right now, however, doesn't adapt to the extension model very well. It started with just the rule-view and computed-view doing everything internally, and at some stage we got the style-inspector-overlays which deals will all of these extra features. But even it was not really thought for extensibility and it's currently constrained to a very limited number of use cases. One of the nice things we have in these panels is they both implement a 'getNodeInfo' method that returns meta data about nodes in them. This can be used to know whether the user clicked on a selector, or a property, or a value, which property, etc... It seems to me that these panels should expose at least events when they get created, populated, destroyed.
Honza: is there anything Firebug does that would benefit from a new rule-view/computed-view extension API?
Flags: needinfo?(odvarko)
I don't know about specific feature that would be missing but, here are some general comments: 1) Extension can append, but also customize existing features. E.g. the color picker has 'eye dropper' tool button at the bottom. Extensions might want to appends new tools (buttons) into the color editor (or other exiting popup editors). 2) As you mentioned, usually exposing events that allows to follow life-cycle of the UI components is the most useful thing. Extensions can add new UI as well as do clean up. It's important to make possible to register these listeners at the right time (other events might be required). Note that extensions, can be installed/removed/disabled at any time dynamically. 3) This is related to getNodeInfo() you mentioned. When working with the Inspector panel I have been immediately missing API that would return object actor from the node actor (bug 1035742) 4) Of course, having API for adding new inline/popup editors and tooltips for CSS props would be nice. 5) Being able to track changes could support new inventions related to creating diffs/patches or even auto propagation of changes to the server. Honza
Flags: needinfo?(odvarko)
Inspector bug triage. Filter on CLIMBING SHOES. A bit too generic to be kept as is, and received no activity in one year. Closing, but feel free to reopen more specific bugs if need be.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.