cargomedia/cm

Enable "cm.debug.viewTree()" on production

Closed this issue · 5 comments

njam commented

The idea was for product development to have a tool to quickly see the view-structure of a page.
Unfortunately cm.logger.info() is not visible on production.

@zazabe what's the best way here?
Could be only for users with the developer role.

one way, already available:

screen shot 2017-02-02 at 18 50 08

njam commented

I was hoping to have the DevTools-reference to the "HTMLDivElement". This way when you hover over it the element is highlighted in the viewport.

It's more a hack, but we can easily change the viewTree() implementation and not use the logger at all.
We could even use console.group(), like this:

screen shot 2017-02-03 at 10 54 46

see #2556

njam commented

Done in #2556

@NicolasSchmutz let's discuss