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

[Storybook] Update utils to ensure properly merged story configs #7583

Open
mgadewoll opened this issue Mar 14, 2024 · 0 comments · Fixed by #7611
Open

[Storybook] Update utils to ensure properly merged story configs #7583

mgadewoll opened this issue Mar 14, 2024 · 0 comments · Fixed by #7611
Assignees
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries

Comments

@mgadewoll
Copy link
Contributor

Summary

Our storybook utils to disable/hide/move component props in the controls table are currently generating and returning objects without context of any existing entries on the config it adds to (component or story level). While Storybook does merge configs (component and story level - story level overwrites component level) this can still result in the utils output potentially overwriting existing prop control definitions - e.g. when we call multiple utils on the same prop and in the same level (e.g. story level).

We want to update the utils to ensure they update the existing config instead of overwriting it.

💬 See this conversation for more information.

Acceptance criterea

  • utils (hideStorybookControls, disableStorybookControls and moveStorybookControlsToCategory) don't overwrite other config entries but mutate the existing config while respecting existing entries
  • props that are adjusted in the controls panel via utils are properly output (e.g. moved and disabled)
@mgadewoll mgadewoll added the documentation Issues or PRs that only affect documentation - will not need changelog entries label Mar 14, 2024
@mgadewoll mgadewoll self-assigned this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant