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

Controls: Fix array args invalid when some are disabled #23807

Open
wants to merge 5 commits into
base: next
Choose a base branch
from

Conversation

Dalcvi
Copy link

@Dalcvi Dalcvi commented Aug 11, 2023

What I did

Problem:
If you disable some values in controls that is an array (lets say its a 'check' type), then some values will be stored as 'undefined'.
The current implementation, checks if the argsType contains all values from our args, but it will not contain undefined, as it is the same as 'disabled'.

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes

Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@yannbf
Copy link
Member

yannbf commented Sep 19, 2023

Hey there, thank you so much for your contribution! @kasperpeulen could you check this out when you have time? Thank you!

It might take some time as we are quite busy, we really appreciate your efforts and patience <3

@ndelangen ndelangen changed the title fix: Control addon array args are always invalid if some of them are disabled Controls: Fix array args invalid when some are disabled Sep 19, 2023
@yannbf
Copy link
Member

yannbf commented Oct 3, 2023

Friendly ping @kasperpeulen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants