Closed Bug 1001412 Opened 10 years ago Closed 4 years ago

[markup view][meta] Customization of the markup-view

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pbro, Unassigned)

References

Details

(Keywords: meta)

Rough ideas regarding the customization of the markup-view.

I think customization refers to:
- addons being able to modify the display of the markup-view
- users being able to modify the display of the markup-view

Display modification types:
- changing the style of a node container (boldness, color, opacity, etc.)
- entirely hiding a node, optionally showing its children or not

Use cases:
- provide addons (angular, emberjs, etc.) with a way to mark framework nodes differently than other nodes
- provide addons with a way to hide certain (custom?) nodes, still showing their children
- provide users with a ctx menu option to select one node as the root in the markup-view
- provide users with a persistent way to style certain nodes differently than others (based on attributes, or even object properties of the node)
- provide configuration option to decide whether iframe #document nodes should be shown, or if anonymous content should be shown

I can see roughly two parts to this:

- on the server-side:
  - in NodeActor, being able to run code that outputs customData based on the node's attributes, properties, ...
  - the customData would be transported as part of the actor's form (we need, btw, to check all the method calls done that return nodeActors, because everytime the form is sent back, even if not used).

- on the client-side: based on customData and/or preferences and/or configuration, style (or even hide) the corresponding node containers.

Note that hiding nodes can be done relatively easily in importNode() by instantiating a new HiddenContainer (to be created) which would expand by default and revert the 1em left padding but otherwise resemble a normal MarkupContainer.
(In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #0)
> - on the server-side:
>   - in NodeActor, being able to run code that outputs customData based on
> the node's attributes, properties, ...
>   - the customData would be transported as part of the actor's form (we
> need, btw, to check all the method calls done that return nodeActors,
> because everytime the form is sent back, even if not used).
There's probably more to it on the server-side as hiding nodes or choosing whether anonymous content should be shown or not would be better solved at tree walker level (avoiding to send useless data to the client).
We use the nsIDOMTreeWalker interface to walk the DOM but I think we still have our own wrapper in toolkit/devtools/server/actors/inspector.js so an option is to provide customization hooks in this wrapper to decide if a node should be part of the displayed tree or not (note that this wrapper may change/disappear with bug 777674).
See Also: → 1036949
Inspector bug triage (filter on CLIMBING SHOES).
Priority: -- → P3
Product: Firefox → DevTools

The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:rcaliman, maybe it's time to close this bug?

Flags: needinfo?(rcaliman)
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(rcaliman)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.