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

UX-575 upgrade to 6.0 alpha, refactor stories for sidepanel #440

Merged
merged 3 commits into from
Apr 16, 2020

Conversation

oscarkwan
Copy link
Contributor

@oscarkwan oscarkwan commented Feb 28, 2020

Purpose 🚀

  • Bump storybook to 6.0 alpha
  • Refactor sidepanel stories

Notes ✏️

  • with storybook 6.0, viewmode is introduced to make sure stories are defaulted to a certain mode.
  • Sidepanel mdx file is WIP (will be done in a future PR), right now it just shows the prop table
  • Removed background prop for SidePanel.Overlay

Updates 📦

  • MAJOR (breaking) change to SidePanel

Storybook 📕

http://storybooks.highbond-s3.com/paprika/UX-575-sidepanel-stories

@nahumzs
Copy link
Contributor

nahumzs commented Mar 27, 2020

fyi seems like storybook has a bug you can't toggle stories unless those stories have the folder icon, don't know why :P no blocker but just weird behaviour from storybook

@oscarkwan
Copy link
Contributor Author

Hm, in my version?

@@ -10,15 +10,13 @@ const propTypes = {
* Will accept the click event on outside of the sidepanel when losing focus
* @boolean
*/
background: PropTypes.string,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this technically constitutes a breaking change to SidePanel. I'm okay with that, it will be very low impact, but please indicate that in the PR description, tag the PR with that label, and add a note to the CHANGELOG.

@nahumzs
Copy link
Contributor

nahumzs commented Mar 27, 2020

yeap in this version, but no big deal.
2020-03-27 11 19 16

@mikrotron
Copy link
Contributor

mikrotron commented Mar 27, 2020

yeap in this version, but not big deal.

You can't toggle any expandable selection closed, if the active story is contained below. And since a "component" section auto selects the first story, you're seeing that behaviour. If you go selecte the Heading/Showcase story, then you can close the Guard, but won't be able to close the Heading. This make some sense, if you collapse the section with the active page... then you can't see where the active page is anymore and you can get lost.

@mikrotron
Copy link
Contributor

Can you add !important to the body { padding:0; } rule in /.storybook/reset.scss? The extra padding is bothering me, especially on the cover page where there's now a scrollbar.

@mikrotron
Copy link
Contributor

mikrotron commented Mar 27, 2020

Hey, I think that with these new options, we don't need the confusing "Canvas / Docs" tabs at all! In fact, it seems they can be turned off, while still maintaining the rest of that "canvas toolbar" by adding this to the story parameters:

previewTabs: {
  canvas: { hidden: true },
}

Reference: storybookjs/storybook#9095

What do you think?
Screen Shot 2020-03-27 at 12 04 56 PM

Copy link
Contributor

@mikrotron mikrotron left a comment

Choose a reason for hiding this comment

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

llgtm 70

@oscarkwan oscarkwan merged commit 61b835d into master Apr 16, 2020
@oscarkwan oscarkwan deleted the UX-575-sidepanel-stories branch April 16, 2020 22:57
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.

3 participants