Slide 1

Slide 1 text

September 2017 Storybook: Design, Develop, Document and Debug your React UI components Marie-Laure Thuret

Slide 2

Slide 2 text

Thanks to our sponsors!

Slide 3

Slide 3 text

MARIE-LAURE THURET Developer at @mlthuret

Slide 4

Slide 4 text

@mlthuret A UI component often relies on several states

Slide 5

Slide 5 text

@mlthuret A simple pagination component

Slide 6

Slide 6 text

@mlthuret currentPage pagePadding showNext showPrevious showLast numberOfPages showFirst A simple pagination component

Slide 7

Slide 7 text

@mlthuret expect buttons to be disabled currentPage = 1 currentPage = 6 and nbPages = 6 A simple pagination component

Slide 8

Slide 8 text

@mlthuret How do we make sure they are ? well documented

Slide 9

Slide 9 text

@mlthuret isolated environment to quickly develop and design your components thanks to hot reloading

Slide 10

Slide 10 text

@mlthuret Muhammed Thanish https://github.com/storybooks/ Arunoda Susiripala

Slide 11

Slide 11 text

@mlthuret Introducing a new maintainers team

Slide 12

Slide 12 text

@mlthuret Design Develop Document Debug Discuss Development Lifecycle

Slide 13

Slide 13 text

@mlthuret Getting Started Easy to install Ready for iterating quickly $getStorybook

Slide 14

Slide 14 text

@mlthuret Storybook interface

Slide 15

Slide 15 text

@mlthuret List of the stories Storybook interface

Slide 16

Slide 16 text

@mlthuret Storybook interface Stories kind List of the stories

Slide 17

Slide 17 text

@mlthuret Stories Stories kind List of the stories Storybook interface

Slide 18

Slide 18 text

@mlthuret Actions and add- on panels Storybook interface

Slide 19

Slide 19 text

@mlthuret Component view Storybook interface

Slide 20

Slide 20 text

@mlthuret Demo

Slide 21

Slide 21 text

@mlthuret API First

Slide 22

Slide 22 text

@mlthuret Create live documentation

Slide 23

Slide 23 text

@mlthuret Create live documentation Document style and behaviour

Slide 24

Slide 24 text

@mlthuret How can I use a component? Create live documentation

Slide 25

Slide 25 text

@mlthuret Examples

Slide 26

Slide 26 text

@mlthuret How do we make sure the documentation ? never breaks

Slide 27

Slide 27 text

@mlthuret We need to add tests

Slide 28

Slide 28 text

@mlthuret Testing markup through snapshot testing Storyshots

Slide 29

Slide 29 text

@mlthuret Tests are your application’s specifications

Slide 30

Slide 30 text

@mlthuret Explicit behaviour by adding tests next to your stories Specs add-on

Slide 31

Slide 31 text

@mlthuret Tests are failing if differences are spotted between two components pictures Visual regression testing

Slide 32

Slide 32 text

@mlthuret Visual regression testing

Slide 33

Slide 33 text

@mlthuret Visual regression testing

Slide 34

Slide 34 text

@mlthuret Demo

Slide 35

Slide 35 text

@mlthuret what about maintenance ?

Slide 36

Slide 36 text

@mlthuret Debug and enhance Small environment to debug efficiently Entry point to start when adding a new feature

Slide 37

Slide 37 text

@mlthuret Communicate with others

Slide 38

Slide 38 text

@mlthuret Communicate with others When submitting a Pull Request

Slide 39

Slide 39 text

@mlthuret When opening issues Communicate with others

Slide 40

Slide 40 text

@mlthuret When an external contributor fixes a bug Communicate with others

Slide 41

Slide 41 text

@mlthuret Design Develop Document Debug Discuss Iterate quickly Live documentation Add specifications through tests Create a styleguide Share stories Entry points Isolated environment Hot reloading Expose props Isolate bugs Storybook contribution during the developer journey

Slide 42

Slide 42 text

@mlthuret Why adopt Storybook ?

Slide 43

Slide 43 text

@mlthuret Universal Storybook

Slide 44

Slide 44 text

@mlthuret Universal Storybook ReactJS React Native VueJS Angular

Slide 45

Slide 45 text

@mlthuret Demo

Slide 46

Slide 46 text

@mlthuret It’s up to you to create what’s missing The add-on API

Slide 47

Slide 47 text

@mlthuret Add-ons from the community And a lot of others… Material-UI Readme Background Internationalisation Specs

Slide 48

Slide 48 text

@mlthuret Roadmap Playground add-on Theming ability Add-on API refactoring See multiple stories in 1 preview Responsive and multi-device viewports preview Automatic story detection

Slide 49

Slide 49 text

Thanks! MARIE-LAURE THURET Developer at @mlthuret