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

🇩🇪 React Day Berlin 2022

🇩🇪 React Day Berlin 2022

ℹ️ Consistent UX at Scale: Lessons learned when I wore the DesignOps hat

The need for Design Systems comes with the need for scale, efficiency, and consistency in design. Those have been one of the major talking points in the design—and front-end—community for the past years. Some love it; some are more skeptical.

In this session, I'm gathering the common denominators I've noticed while working on Design Systems across small, medium, and huge companies, with an eye on points like consistency, themeability, accessibility, the path to deliver designs to actual code, and their adoption.

Matheus Albuquerque

December 02, 2022
Tweet

More Decks by Matheus Albuquerque

Other Decks in Programming

Transcript

  1. Hello, React Day Berlin 🤘 🇩🇪 CONSISTENT UX AT SCALE:

    LESSONS LEARNED WHEN I WORE THE DESIGNOPS HAT • THE 2ND OF DECEMBER, 2022.
  2. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT ↑ ALL THE LINKS! 🤓 🧑🏫 @techlabs 🐦 @ythecombinator 👨💻 @medallia
  3. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT ↑ ALL THE LINKS! 🤓 🍺 LET’S DISCUSS MORE AFTER!
  4. THEY CAN HAPPEN ON: ↝ MOUSE CLICKS ↝ TOUCH TAPS

    ↝ ENTER OR SPACE KEY PRESSES ↝ SCREEN READER VIRTUAL CLICKS PRESS INTERACTIONS
  5. TO PROPERLY HANDLE THEM, YOU’D HAVE TO: ↝ USE POINTER

    EVENTS WHERE AVAILABLE AND FALLBACK TO MOUSE AND TOUCH EVENTS ↝ DISABLE TEXT SELECTION ON MOBILE WHEN PRESSED PRESS INTERACTIONS
  6. TO PROPERLY HANDLE THEM, YOU’D HAVE TO: ↝ HANDLE CANCELING

    PRESS INTERACTIONS ON SCROLL ↝ NORMALIZE A TON OF CROSS-BROWSER INCONSISTENCIES ↝ AND SO ON… PRESS INTERACTIONS
  7. ↝ IT PROVIDES SEMANTICS, ONLY ↝ IMPLEMENTATIONS PROVIDED BY THE

    WEB PLATFORM ARE EITHER NON-EXISTENT, LACKING IN FUNCTIONALITY, OR CANNOT BE CUSTOMIZED ↝ DEVELOPERS ARE FORCED TO BUILD CUSTOM COMPONENTS; AN INCREDIBLY DIFFICULT TASK WAI-ARIA
  8. #PROTIP💡 Try not to spend too much time implementing keyboard

    navigation, discussing focus traps, and researching appropriate ARIA techniques for your components.
  9. #PROTIP💡 Find an existing component library that is accessible and

    can be styled to match your brand and your design tokens.
  10. ↝ COMPOSITION PRIMITIVES ↝ REACT-ARIA DOWNSHIFT ↝ UNSTYLED COMPONENTS ↝

    RADIX, REACH UI, HEADLESS UI, REAKIT ↝ FULLY STYLED COMPONENTS ↝ MUI, CHAKRA UI, NEXTUI, BASE WEB ACCESSIBLE LIBRARIES
  11. #PROTIP💡 Which one you'll pick depends on the context, just

    keep in mind that accessibility is mandatory and they should be able to be styled to match your brand.
  12. ↝ COMPOSITION PRIMITIVES ↝ WHEN REVAMPING SOME EXISTING CODEBASE TO

    BE ACCESSIBLE. ↝ UNSTYLED COMPONENTS ↝ WHEN STARTING A BRAND NEW DESIGN SYSTEM FROM SCRATCH. ↝ FULLY STYLED COMPONENTS ↝ WHEN NO FULL-TIME DESIGNERS AND WHERE THE GUIDELINES MATCH. ACCESSIBLE LIBRARIES
  13. ↝ BUILD PROCESS ↝ CATCH ACCESSIBILITY ERRORS AS YOU BUILD

    OUT YOUR APP. (e.g. axe-core, jsx-a11y, Lighthouse Audits, AccessLint) ↝ CONTINUOUS INTEGRATION ↝ FIND ACCESSIBILITY ISSUES IN YOUR GITHUB PULL REQUESTS. (e.g. axe-Linter, AccessLint) AUTOMATED TESTING
  14. #PROTIP💡 Always try to combine automated testing with ongoing manual

    testing. Manual testing is still the most reliable method to assess accessibility.
  15. ↝ QUICK CHECK ↝ QUICKLY CHECK FOR COMMON ERRORS IN

    YOUR BROWSER. (E.G. aXe, Lighthouse Accessibility Audit, Accessibility Insights, OR WAVE. ↝ SIMULATE IMPAIRMENTS ↝ USE TOOLS TO SIMULATE COLOR BLINDNESS, LOW VISION, ZOOM, LOW CONTRAST, HIGH CONTRAST, AND MORE. MANUAL TESTING
  16. 0 1 2 3 4 5 6 7 8 9

    9 8 7 6 5 4 3 2 1 0
  17. 0 1 2 3 4 5 6 7 8 9

    9 8 7 6 5 4 3 2 1 0 LINK: BLUE[5] LINK: BLUE[4]
  18. 0 1 2 3 4 5 6 7 8 9

    9 8 7 6 5 4 3 2 1 0 ICON: GRAY[6] ICON: GRAY[3]
  19. 0 1 2 3 4 5 6 7 8 9

    9 8 7 6 5 4 3 2 1 0 ICON: GRAY[6] ICON: GRAY[3] ICON: GRAY[4]
  20. 0 1 2 3 4 5 6 7 8 9

    9 8 7 6 5 4 3 2 1 0 ACCENT: ORANGE[6] ACCENT: ORANGE[3]
  21. 0 1 2 3 4 5 6 7 8 9

    9 8 7 6 5 4 3 2 1 0 ACCENT: ORANGE[6] ACCENT: ORANGE[3] ACCENT: ORANGE[6]
  22. #QUESTION 🤔 How do you identify the source of truth

    in a Design System? Is it code, UI, or documentation?
  23. #QUOTE ✍ "Design tokens are indivisible pieces of a design

    system such as colors, spacing, typography scale." — Design Tokens W3C Community Group
  24. ↝ CI TO AUTOMATICALLY CHECK FOR UPDATES ↝ VERSIONING RELIES

    ON A COMPARISON SYSTEM WITH DIFF FILES ↝ CHANGELOGS AND VERSION BUMPING BASED ON THE DIFF FILE ITERATION #1
  25. ↝ SCHEDULED RUNS WERE REPLACED WITH WEBHOOKS ↝ DESIGNERS WERE

    ABLE TO CHANGE HUES, ADD COLORS, AND CHANGE FONT VARIABLES WITH NO ENGINEERS’ HELP ITERATION #2
  26. ↝ NOTIFICATIONS FOR FAILING BUILDS AND NEW RELEASES ↝ LINTING

    VIA CUSTOM FIGMA PLUGINS ↝ FULLY MOVING TO FIGMA TOKENS ITERATION #3
  27. AFTER A FEW WEEKS BACK TO SASS, I FOUND MYSELF

    WITH TWO ISSUES: ↝ I HAD DECREASED PRODUCTIVITY WHEN STYLING COMPONENTS IF COMPARED TO TYPED APPROACHES ↝ I FOUND QUITE A FEW COMPONENTS ACCESSING NON-EXISTENT CLASSNAMES TYPE SAFETY
  28. ↝ FIND AND SET UP A WEBPACK LOADER THAT GENERATES

    TS TYPINGS FOR CSS MODULES ↝ FIX BROKEN BUILDS CAUSED BY INEXISTENT STYLES OR INSUFFICIENT TYPE SAFETY ↝ RUN SOME TESTS TO CHECK WHETHER IT WORKS AS EXPECTED OR NOT TYPE SAFETY (FIXING IT)
  29. / / 😐 Manual and repetitive type CssPadding = 'padding-left'

    | 'padding-right' | 'padding-top' | 'padding-bottom'; TEMPLATE LITERAL TYPES
  30. / / 😐 Manual and repetitive type CssPadding = 'padding-left'

    | 'padding-right' | 'padding-top' | 'padding-bottom'; type Direction = 'left' | 'right' | 'top' | 'bottom'; type CssPadding = `padding-${Direction}` / / Result: 'padding-left' | 'padding-right' | 'padding-top' | 'padding-bottom' TEMPLATE LITERAL TYPES
  31. / / 😐 Manual and repetitive type CssPadding = 'padding-left'

    | 'padding-right' | 'padding-top' | 'padding-bottom'; type Direction = 'left' | 'right' | 'top' | 'bottom'; type CssPadding = `padding-${Direction}` type CssMargin = `margin-${Direction}` TEMPLATE LITERAL TYPES
  32. #PROTIP💡 A Design System has to be actively used to

    make the UX and DX better. Otherwise, it's a waste of effort.
  33. / / Homebrew const BaseButton = ({ children }) =

    > <button>{children}</button>; / / NOT Homebrew const Button = () = > <BaseButton>Click me<BaseButton/>; HOMEBREW COMPONENTS
  34. ↝ FIND HOMEBREW COMPONENTS ↝ FIND DESIGN SYSTEM IMPORTS ↝

    COLLECT USAGES OF BOTH ↝ CALCULATE PROPORTION ↝ REPEAT FOR COMMITS IN CODEBASE HISTORY USAGE SHARE
  35. / / Homebrew const BaseButton = ({ children }) =

    > <button>{children}</button>; / / NOT Homebrew const Button = () = > <BaseButton>Click me<BaseButton/>; USAGE SHARE
  36. / / Homebrew const BaseButton = ({ children }) =

    > <button>{children}</button>; / / Scenario #1 const StyledButton = BaseButton; const Button = () = > <StyledButton>Click me<StyledButton/>; USAGE SHARE
  37. / / Homebrew const BaseButton = ({ children }) =

    > <button>{children}</button>; / / Scenario #2 const StyledButton = () = > <View mainButton={BaseButton} /> USAGE SHARE
  38. / / Homebrew const BaseButton = ({ children }) =

    > <button>{children}</button>; / / Scenario #3 const withProps = (Component) = > (props) = > <Component { . . . props} />; const ButtonWithProps = withProps(BaseButton); const Button = () = > <ButtonWithProps>Click me</ButtonWithProps>; USAGE SHARE
  39. / / Homebrew export const BaseButton = ({ children })

    = > <button>{children}</button>; / / Scenario #4 import { BaseButton as Button } from './button' const StyledButton = () = > <Button>Click me</Button> USAGE SHARE
  40. #PROTIP💡 Usage in code is a complicated concept. Find a

    static analysis tool that does the work for you.
  41. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT IS YOUR DESIGN SYSTEM BEING ADOPTED? SPOILERS: EVANGELISM IS VERY HARD! #1
  42. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT BUILD IN ACCESSIBILITY AS YOU GO IF YOU PRIORITIZE AT THE COMPONENT LEVEL YOU GET IT FOR “FREE” #2
  43. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT "PERFECT IS THE ENEMY OF GOOD" — VOLTAIRE #3
  44. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT "PERFECT IS THE ENEMY OF GOOD" EARLY PREVIEW = EARLY FEEDBACK #3
  45. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT ENFORCE THE MOST IMPORTANT CODE THINGS BY TOOLS AND AUTOMATION PS.: DOCUMENT THE PROCESS! #4
  46. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT CSS CLASSES, TOKEN DEFINITIONS, TYPEFACES… #5
  47. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT TOOLING, ACTIVE SUPPORT, AND ADVOCACY CSS CLASSES, TOKEN DEFINITIONS, TYPEFACES… #5
  48. CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE

    DESIGNOPS HAT "IN GOD WE TRUST. ALL OTHERS MUST BRING DATA." — W. EDWARDS DEMING #6
  49. THAT’S ALL, FOLKS! THANKS! 🤘 🇩🇪 QUESTIONS? MATHEUS ALBUQUERQUE ↑

    ALL THE LINKS! 🤓 CONSISTENT UX AT SCALE: LESSONS LEARNED WHEN I WORE THE DESIGNOPS HAT