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
merged 1 commit into from Jul 25, 2021

Conversation

tewson
Copy link
Contributor

@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.

Before

storybook-boolean-fix-before

After

storybook-boolean-fix-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".
@nx-cloud
Copy link

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
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@darleendenno
Copy link
Contributor

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

@MichaelArestad
Copy link
Contributor

LGTM! Nice work!

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.

None yet

4 participants