Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tame the Component Multi-verse v1

Michael Chan
May 04, 2022
12

Tame the Component Multi-verseย v1

Error state, loading state, awkward breakpoint, bad data, poor formatting, browser support. Every component is a multitude of challenges. How do you actually manage it? Disable the network โ€” temporarily. Insert bad code โ€” just for a minute. Paw at the edge of your screen. Hack local database fixtures to bits. Frontend development is a multiverse where dimensions like time and variation result in an infinite number of UI possibilities. In this talk, we'll use Storybook to progressively develop, test, document our work and tame the multiverse of our components.

Michael Chan

May 04, 2022
Tweet

Transcript

  1. WhoTF is this? โ€ข ๐Ÿ‘‹ Iโ€™m chan, chantastic, or Michael

    (he/him/any) โ€ข ๐Ÿฉฒ I have accidentally peed myself as an adult โ€ข ๐ŸŽ™ I used to host React Podcast โ€ข ๐Ÿ•ฏ I burned out โ€ข ๐Ÿ”ซ Pivoted to being the oldest guy logging 40/wk on Destiny 2 (probably) โ€ข ๐Ÿ‘ท Part of the React Working Group โ€ข ๐ŸŽฎ Started my favorite online space: discord.gg/lunchdev โ€ข ๐Ÿง“ 12 years in developer productivity, design systems, and frontend architecture โ€ข ๐Ÿฅธ I read at a roughly 3rd grade reading level โ€ข ๐Ÿ•ธ Iโ€™m now working at Chromatic to improve the UX of the web.
  2. 8 โ€” Authorization and logic ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€

    ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€
  3. 9 โ€” Localization (LTR/RTL) ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚

    ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ โฌ… โžก
  4. 10 โ€” Organization ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘†

    ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ โฌ… โžก ๐Ÿ”ฎ
  5. Table stakes ๐Ÿฝ โ€ข 1 view โ€ข ร— 6 viewports

    โ€ข ร— 3 browser engines (was 4) โ€ข ร— 3 device capabilities (โ˜โŒจ๐Ÿ–ฑ) โ€ข ร— 4 user abilities (โŒจ๐Ÿ–ฑโ˜๐Ÿ‘‚)
  6. Scale ๐Ÿ“ˆ โ€ข 2 Authorization โ€” user types โ€จ (one

    logical variation) โ€ข 2 directions (RTL) โ€ข 2 UI frameworks
  7. โœ… Verify responsive behaviour โœ… Debug layouts โœ… Check alignment

    Features that make CSS debugging a snap CSS debugging Outline
  8. ๐Ÿ‘จ๐Ÿ’ป During dev: use A11y panel to audit components as

    you build them. โœ… PR check: import stories into Jest and run Axe on CI. Accessibility tests
  9. Verify event handlers Use ArgTypes to create callbacks that appear

    in the actions panel. Verify whether the handler received the correct arguments in a glance. Events log
  10. Ryan Bahan , Shopify [Interactive] Storybook Controls improve our teamโ€™s

    cross-functional literacy and communication around React.
  11. Chromatic checks each commit for visual changes. They work by

    taking screenshots of every story and comparing them previous baseline. Visual tests This changed
  12. Interaction tests โœ… Simulates user behavior in browser ๐Ÿ™ Powered

    by Testing Library & play functions โšก No waiting and no fl ake ๐Ÿ›  Low maintenance
  13. Brad Frost , Atomic Design Testing has historically been really

    rough for us because it's been like โ€˜picture in your mind's eye, a modal, and imagine clicking on a button that opens that modelโ€ฆโ€™
  14. Brad Frost , Atomic Design By writing the story, you

    get the documentation for the component, tests, and a playgroundโ€ฆ all for free.
  15. โ€ฆbut I love the web ๐Ÿ‘ฏโค๐Ÿ•ธ Desktop in Edge Admin

    on mobile Keyboard focus on Desktop Accessible via VoiceOver RTL in Arabic Loading State Light mode High contrast Reduced motion
  16. 10-ish dimensions of UI complexity ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€

    ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ ๐Ÿ‘† ๐Ÿ‘€ ๐Ÿ‘‚ โฌ… โžก
  17. Static Unit Integration End to end Visual imperative UI Testing

    Continuum imperative Declarative Component-driven development is the unlock