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-controls: Update style of Boolean control #12515

Merged
merged 4 commits into from
Sep 19, 2020

Conversation

mattrothenberg
Copy link
Contributor

Issue:
https://twitter.com/mattrothenberg/status/1306952200619466763?s=20

What I did

Updated the visual style of the Boolean control to look more like @dizzyup's mockup.

Screen Shot 2020-09-18 at 10 04 24 AM

@domyen I couldn't quite figure out how to get the gray colors to match up (since y'all are relying heavily on transparency + opacity to reduce the lightness of the base gray color). For the sake of expediency, I hard-coded a gray value of #d9d9d9.

@shilman shilman added ui theming maintenance User-facing maintenance tasks labels Sep 18, 2020
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.

Love this design @mattrothenberg 😍

@domyen @ndelangen can you help fix up the hard-coded color value to comply with our dark and light themes?

@mattrothenberg
Copy link
Contributor Author

Thanks @shilman !

I can't get over how great V6 is 🥂

@shilman
Copy link
Member

shilman commented Sep 18, 2020

Thanks so much! 🙏

6.0 is still very WIP but it feels like we're going in the right direction!

@domyen
Copy link
Member

domyen commented Sep 18, 2020

@ghengeveld might want to merge this into the SB UI work you're doing?

@rafaelrinaldi
Copy link

@mattrothenberg You are the real MVP.

@ghengeveld
Copy link
Member

ghengeveld commented Sep 19, 2020

Damn. Looks like you beat me to it by 5 hours. https://github.com/storybookjs/storybook/compare/improve-boolean-toggle-ux

ezgif com-video-to-gif

What I'm gonna do is merge your PR so you'll get credit for the new UI. Then I'll apply some tweaks originating from my version, because it was made in collaboration with @domyen to make sure it follows the Storybook visual style.

@ghengeveld
Copy link
Member

One more thing to consider is the dark theme (see Chromatic tests). It looks out of place right now. Admittedly so does mine. Let's collaborate on that.

@mattrothenberg
Copy link
Contributor Author

@ghengeveld Let me know specifically what you need from me, happy to help

@ghengeveld
Copy link
Member

@mattrothenberg I've updated your branch with some tweaks and made sure it looks good in the dark theme as well:

Screenshot 2020-09-19 at 16 01 46

@mattrothenberg
Copy link
Contributor Author

@ghengeveld wow, that looks amazing! great work

textAlign: 'center',
fontSize: theme.typography.size.s1,
fontWeight: theme.typography.weight.bold,
lineHeight: '1',
cursor: 'pointer',
display: 'inline-block',
padding: '8px 16px',
padding: '7px 15px',
Copy link
Member

Choose a reason for hiding this comment

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

All inputs are 28px in height. Reducing the padding makes this control 28px tall as well.

@shilman shilman changed the title design: update style of Boolean control Addon-controls: Update style of Boolean control Sep 19, 2020
@ghengeveld
Copy link
Member

ghengeveld commented Sep 19, 2020

@shilman I'm not sure what's up with the Docs build on TeamCity, but other than that I think this PR is good to merge. WDYT?

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.

@shilman shilman merged commit ab4ce94 into storybookjs:next Sep 19, 2020
@ghengeveld
Copy link
Member

Don't forget @domyen 👍

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

Successfully merging this pull request may close these issues.

6 participants