Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon-a11y: deterministically create config object #8832

Closed
donaldpipowitch opened this issue Nov 14, 2019 · 2 comments
Closed

Addon-a11y: deterministically create config object #8832

donaldpipowitch opened this issue Nov 14, 2019 · 2 comments

Comments

@donaldpipowitch
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The problem was described in more detail here: #8779 (comment)

There are currently four levels which need to be considered in order to deterministically create the config object for a11y.

  1. addon-a11y has a default config object (which is also slightly changed at some point, but I don't know where?)
  2. we have global-level custom config (import { addParameters } from '@storybook/react'; addParameters({ a11y })),
  3. we have component-level custom config (export default { parameters: { a11y } } or storiesOf('...', module).addParameters({ a11y })),
  4. we have story-level custom config (Example.story = { parameters: { a11y } }; or storiesOf('...', module).add('...', () => {}, { a11y })).

For every run of addon-a11y we need to be able to deterministically get the correct config object by merging everything from level 1 to 4.

⚠️ Note: I haven't created an addon so far. I'm not sure if this will be a fix specific for addon-a11y or if this needs to be supported upstream by Storybook itself.

Describe the solution you'd like

Before the run function is called, there needs to a function call like getConfig or something like that which correctly merges all possible configurations from every level described above.

Describe alternatives you've considered

I'm not sure if this should be a more general feature offered by the Storybook core for every addon?

Are you able to assist bring the feature to reality?

Currently not. I'd need to know at least two things:

  1. Where is the default config object (mentioned as level 1) altered?
  2. Should this be a fix specific to this addon or more general?

Additional context

Related MR which has a limited workaround for this problem: #8779

@stale
Copy link

stale bot commented Dec 27, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Dec 27, 2019
@stale
Copy link

stale bot commented Jan 26, 2020

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants