break-stuff / wc-storybook-helpers

Helpers designed to make integrating Web Components with Storybook easier.
MIT License
52 stars 9 forks source link

Is is possible to hide the 'setObject' control from events? #42

Closed rstoneIDBS closed 7 months ago

rstoneIDBS commented 8 months ago

Not a huge issue, but when events are listed in the docs they include a useless 'setObject' control. I had a quick go at removing this with no success and suspect that this is just a Storybook thing but wanted to log it in case it turns out to be possible.

break-stuff commented 8 months ago

Yeah, that's a good call-out. We should be able to disable those.

break-stuff commented 7 months ago

@rstoneIDBS, this should be resolved in release 1.4.0. Let me know if you run into any issues.

rstoneIDBS commented 7 months ago

1.4.0 fixes this issue, thanks @break-stuff - however see https://github.com/break-stuff/wc-storybook-helpers/issues/51 for a possible negative side effect of this (or one of the other changes) ?

certainlyakey commented 7 months ago

I too have noticed that starting from 1.4.0 events get converted into attributes:

<my-button data-color-scheme="light" onlmclick="function() {
            return fn2.apply(this, arguments);
          }" appearance="primary">
    Default content
</my-button>

This happens both in the generated example code in story docs and in the rendered HTML.

Perhaps caused by #44?

break-stuff commented 7 months ago

Fixed in release 1.5.1 (#56). Let me know if you run into any issues.

rstoneIDBS commented 7 months ago

Thanks @break-stuff, this fixes it. It might be worth looking at the lit^2.6.1 peer dependency as this caused me some install issues as it didn't like lit^3.1.2

break-stuff commented 7 months ago

Release 1.5.2 should resolve that issue. Closing this as I believe the original issue has been resolved.