On Apr 14, 8:39 am, Domizio Demichelis <[email protected]> wrote:
> A quite common use of HTML comments is embedding meta/debugging data
> into the HTML: I am wondering whether there is already some kind of
> support for showing that info in some nice way.
>
> A tipical case is a web app that uses templates, and eventually embeds
> HTML comments about the path of the (partial) templates that generates
> the output, along with other data like benchmark time etc...
>
> A case that I am facing now (but is not the only one) is the DRYML the
> template system used by the Rails/Hobo project. DRYML is very "magic"
> and may generate a lot of HTML code with very short and declarative
> templates. For that reason, debugging/customizing it requires a lot of
> metadata to attach to each fragment that it produces, so you know what
> is doing what. The only problem is the overelming quantity of comments
> in the HTML.

So you want to have a tool that operates with Show Comments false in
the HTML panel?

>
> I would like to find the way to selectively show the meta-info for any
> given html-node. I mean something triggered by a contextual menu, or a
> mouseover, or anything that could just show what the developer is
> interested in.

One solution is another HTML side panel, one that listens for event
onObjectBoxSelected(objectBox)
onObjectBoxUnselected(objectBox)

>From the object box you can get the element and find comments around
it by some rule you create, parse the comment and display it in the
side panel.

>
> We can eventually change the way DRYML embeds its meta-info by
> changing the comments for some custom tag attribute or anything else
> that might simplify that task to Firebug, although a sort of meta-
> commenting could be extendable to any other context (not just DRYML).
>
> Is there any canonical/suggested way to do that? What would you
> recommend? Is there any extension that could give me any hint about
> how to implement it?

Any of the current side panels are synced to the selection so you can
use the same solution; I think they may use panel events instead of
the one I mentioned above.

As for the structure of the extension, they are all pretty similar,
and Honza has some great tutorial info
http://www.softwareishard.com/blog/firebug-tutorial/extending-firebug-hello-world-part-i/

jjb


>
> Thank you in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to