modernweb-dev / storybook-prebuilt

Storybook prebuilt to work with native es modules
MIT License
36 stars 9 forks source link

Would love to have the a11y plugin included, how can I help ? #41

Open sync opened 3 years ago

sync commented 3 years ago

Happy to do the work, if you give me some guidelines, I am comfortable with rollup, esm and friends

sync commented 3 years ago

I can include it get the plugin booted but I have to remove references form api.useChannel (emit)

sync commented 3 years ago

cannot get past this error

  this.getChannel = function () {
    // this.channel should get overwritten by setChannel. If it wasn't called (e.g. in non-browser environment), throw.
    if (!_this.channel) {
      throw new Error('Accessing non-existent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel');
    }
dan-valinotti commented 3 years ago

+1 this issue, I definitely think that the a11y addon should be included in this package since I can't seem to find a working solution to add my own plugins.

It would make a lot of sense to include the a11y addon, since Accessibility is obviously something @open-wc cares about since they include docs in their site for testing + ESLint a11y.

bennypowers commented 3 years ago

@sync can you provide a little more context? what have you done so far and how do you get to that error?

sync commented 3 years ago

to be honest the new esm storybook and Vite builder got super fast now, but I'll look at what I did in January (it's been a while)

LarsDenBakker commented 3 years ago

I don't want to add the a11y addon by default, as it always loads axe which is huge. It would be great if the a11y addon lazy loads axe when you switch to the panel.

Since we do a11y testing in eslint and during testing, I personally don't see that much extra value in the addon. However we could make it optional, ideally creating a prebuild which you can import and add to the addons array.

dan-valinotti commented 3 years ago

I don't want to add the a11y addon by default, as it always loads axe which is huge. It would be great if the a11y addon lazy loads axe when you switch to the panel.

Since we do a11y testing in eslint and during testing, I personally don't see that much extra value in the addon. However we could make it optional, ideally creating a prebuild which you can import and add to the addons array.

I think this is a good middle ground. Great point that you'd have to have axe as a dependency even if you didn't need it, I think the larger issue is that this is a prebuilt system but it's not extendible, ie you can't bring your own addons, or choose which addons you want/don't want on install.