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 boolean toggle style to match underlying value #15676

merged 1 commit into from Jul 25, 2021


Copy link

@tewson tewson commented Jul 24, 2021

Issue: N/A (I tried to search open issues on the boolean control but didn't find anything.)

What I did

The toggle slider on the boolean control doesn't visualise the actual control value. For example, when the value is true, the slider is expected to rest on the "True" label, but it's resting on "False". See screenshots below for before / after.





How to test

  • Is this testable with Jest or Chromatic screenshots? Control components don't seem to have tests but I can add one if required?
  • Does this need a new example in the kitchen sink apps? No
  • Does this need an update to the documentation? No
When `true`, the toggle slider should rest on the label "True".
Copy link

@nx-cloud nx-cloud bot commented Jul 24, 2021

Nx Cloud Report

CI ran the following commands for commit 534fbae. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

Copy link

@shilman shilman left a comment

This indeed looks like a regression introduced in #15449

@darleendenno @MichaelArestad merging, but can you please take a look when you get a minute?

@shilman shilman added this to the 6.4 PRs milestone Jul 25, 2021
@shilman shilman changed the title UI: Fix boolean toggle control style to match the underlying value Controls: Fix boolean toggle style to match underlying value Jul 25, 2021
@shilman shilman merged commit f15f7e0 into storybookjs:next Jul 25, 2021
32 of 41 checks passed
Copy link

@darleendenno darleendenno commented Jul 25, 2021

thanks @tewson for finding/fixing & @shilman for merging -- all looks good 🙏 ❤️

Copy link

@MichaelArestad MichaelArestad commented Jul 26, 2021

LGTM! Nice work!

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

Successfully merging this pull request may close these issues.

None yet

4 participants