storybook-addon-console icon indicating copy to clipboard operation
storybook-addon-console copied to clipboard

Object content

Open DB-Alex opened this issue 4 years ago • 7 comments

Is there a way to output the real object instead of "Object"

Now I need to add JSON.stringify to debug

Screenshot 2020-04-20 at 13 07 56

DB-Alex avatar Apr 20 '20 11:04 DB-Alex

Hey @alexvandervegt Haven't you noticed those small triangle icons at the left of each line?

image

You can use them to expand any nesting objects

usulpro avatar Apr 21 '20 22:04 usulpro

In general I see the problem. This addon is using "actions panel" from addon-actions to output logs. But probably in the next version we'll need to switch to own panel to provide better DX

usulpro avatar Apr 21 '20 22:04 usulpro

I did see the triangles.

But i do not get information. When i expand them i just see "Object"

DB-Alex avatar Apr 23 '20 14:04 DB-Alex

Hm... are you passing regular js array? could you test it with something simple?

usulpro avatar Apr 23 '20 14:04 usulpro

It is an object

DB-Alex avatar Apr 23 '20 14:04 DB-Alex

will need to check it. @alexvandervegt what versions of Storybook and addon are you using?

usulpro avatar Apr 23 '20 16:04 usulpro

Both latest stable

DB-Alex avatar Apr 23 '20 16:04 DB-Alex