How to Configure the Sidebar | Storybook Quick Tip

Поделиться
HTML-код
  • Опубликовано: 5 июн 2024
  • Master your sidebar organization with @chantastic!
    CHAPTERS
    00:00 How to organize the Storybook Sidebar
    00:19 The wrong way…
    00:46 Make categories look like folders
    01:40 Order categories with storySort
    02:43 Warning: order is case-sensitive
    02:57 Order nested folders and components
    03:35 Warning: the order API is confusing
    04:07 Order stories by changing the module export order
    04:42 Tip: Docs are always first
    04:48 Sort stories alphabetically
    05:45 Tip: Alphabetic order isn't my favorite…
    06:15 Take complete control with a custom storySort function
    06:53 Warning: storySort is not supported by parameter inheritance
    07:06 Remember: Restart after every change to the .storybook directory
    07:32 Learn more about naming…
    LINKS
    - Naming components storybook.js.org/docs/react/w...
    - Sidebar & URLS configuration storybook.js.org/docs/react/c...
    - Storybook at learnstorybook.com/
    - Storybook addons at storybook.js.org/addons
    - Component driven UI development at www.componentdriven.org/
    SOCIALS
    Discord: / discord
    Twitter: / storybookjs
    GitHub: github.com/storybookjs/storybook
    Follow chantastic:
    RUclips: @chantastic
    Twitter: / chantastic
    OFFER
    Get a $500 credit for automated visual testing. Signup to Chromatic with promo code DAY.
  • РазвлеченияРазвлечения

Комментарии • 16

  • @oneohthreejs
    @oneohthreejs 2 месяца назад +1

    @chantastic In the last bit of this video you mentioned to refer to the docs. Noticed that sometimes the docs on the website don't have all the information in the github repo. Would you mind doing a demo of using the docs to find out these "hidden" options that aren't covered in the website?

  • @Opalidol
    @Opalidol Год назад +1

    Watched it just out of curiosity but it is actualy kinda awesome :D

    • @chantastic
      @chantastic Год назад

      haha! glad you gave ti a shot :)

  • @jeremytenjo
    @jeremytenjo Год назад

    Awesome!

  • @SaaSMakers
    @SaaSMakers Год назад

    Would be great to make an episode about storybook composition (several storybooks linked). Just discovered it in the doc and it’s great

    • @chromaticui
      @chromaticui  11 месяцев назад

      great suggestion! which use case is most interesting to you?
      - incorporating the storybook of a design system/component library?
      - microfrontends (different UI frameworks)

    • @AneeshKR-me
      @AneeshKR-me 10 месяцев назад

      @@chromaticui I'd vote on different UI frameworks. would love to see that!

  • @user-cx5ob1nc6m
    @user-cx5ob1nc6m 4 месяца назад

    Great video!
    Is there a way to style the sidebar similar to the demo image provided on the official Storybook "Sidebar & URLS" docs page? That sidebar showcases different title styles, versioning, and dividers! Would love to be able to use all of those :)

  • @ethangeorge3244
    @ethangeorge3244 8 месяцев назад

    Is there a way to edit the sidebar icon for stories?

    • @chromaticui
      @chromaticui  8 месяцев назад

      we're sorry. not at the moment, no. i do believe that you could target it with CSS and write a selector that uses a remote image. but that's about it right now.

  • @user-gj3vb1np2v
    @user-gj3vb1np2v 6 месяцев назад

    Interesting, your "Introduction" item is sorted to the middle by your approach. But in my case, when using same storySort approach with listing Introduction in the end, all such stories (Introduction or other landing pages) are always placed in the beginning, before all the stories categories...

    • @chromaticui
      @chromaticui  6 месяцев назад

      thanks for sharing. which framework?

    • @user-gj3vb1np2v
      @user-gj3vb1np2v 6 месяцев назад

      @@chromaticui we are using Angular 👌

  • @IAmLesleh
    @IAmLesleh Год назад

    Why couldn't the server just detect changes to the config and automatically reload in dev?

    • @chromaticui
      @chromaticui  Год назад

      different builders have varying degrees of support for setting being reloaded.

    • @IAmLesleh
      @IAmLesleh Год назад

      @@chromaticui got it, thanks 🙂