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

Can we get better logging output?

Open boatcoder opened this issue 4 years ago • 5 comments

Right now, if I changed the <span> to <pre> the output in the actions panel is much better, but I don't see where the message is actually getting wrapped in <span>.

We could add this rule (but it seems a bit "broad"

span {
    white-space: pre;
    font-family: monospace;
    display: block;
    unicode-bidi: embed
}

Doing some more digging myself, looking for pointers.

boatcoder avatar Feb 03 '20 21:02 boatcoder

@boatcoder we currently reuse addon-action for outputting logs. This actually makes this addon simpler to maintain. But we have to stick with addon-action options. I consider switching to separate own panel where we could setup all messages as we need. But I can’t name any specific dates related to this feature

usulpro avatar Feb 04 '20 10:02 usulpro

Yes, that part is working, and I followed the post message path all the way back into storybook, but never found the spot where the spans got wrapped around the output. This could be done with CSS if storybook as skinnable like that....

boatcoder avatar Feb 04 '20 15:02 boatcoder

probably you need that file https://github.com/storybookjs/storybook/blob/next/addons/actions/src/components/ActionLogger/style.tsx if you want to create a PR to addon-actions

usulpro avatar Feb 05 '20 21:02 usulpro

@UsulPro are there any plans for this addon to have a separate panel?

dawidk92 avatar Mar 12 '21 20:03 dawidk92

Yes I think I'd add this. But I can't give any eta. Any PRs are also welcome

usulpro avatar Mar 12 '21 21:03 usulpro