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

[Storybook] Add story code snippets #7716

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Commits on Jun 20, 2024

  1. feat: add custom code-sippet addon panel

    - adds addon panel for outputting code snippet with Storybooks SyntaxHighlighter
    
    - registers code-snippet addon panel in Storybook manager
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    a3a8806 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9db3e30 View commit details
    Browse the repository at this point in the history
  3. feat: add and use jsxDecorator

    - adds the main bulk of the addon functionality; the jsxDecorator takes the story element, transforms it according to our needs and passes the element to react-element-to-jsx-string to output a jsx string
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e9f26e3 View commit details
    Browse the repository at this point in the history
  4. fix: prevent fewer hooks called error on euiTheme

    - calling useEuiTheme only on the initial decorator call and not every recursive check
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    91bafcd View commit details
    Browse the repository at this point in the history
  5. docs(storybook): updates stories to ensure code-snippet generation

    - ensure naming convention for stateful wrapper to start with Stateful... for filters to work
    
    - ensure args are passed along when using decorators
    
    - ensure no anonymous render functions are used as they would otherwise be skipped
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    447c190 View commit details
    Browse the repository at this point in the history
  6. docs(storybook): various story adjustments

    - EuiCombobox: setup onChange handler and use it in the stateful wrapper; fix static value for options
    
    - EuiheaderAlert: adds a storybook only prop to ensure the full code is used for the snippet generation and not the close state one as the snippet is only generated on arg change and not triggered by preview changes
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    4965850 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3070b31 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0d9d48b View commit details
    Browse the repository at this point in the history
  9. chore: update yarn lock

    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    2ffcd37 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ffdcd72 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2efe00e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8e11cc2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    037759b View commit details
    Browse the repository at this point in the history
  14. docs(storybook): revert custom opening handling for EuiheaderAlert fl…

    …yout story in favor of initially setting it to open
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    14d57a4 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c00c0ab View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f651e69 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    774f9a7 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4a6bdcd View commit details
    Browse the repository at this point in the history
  19. docs: add addon README

    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    6e326f8 View commit details
    Browse the repository at this point in the history
  20. docs: update addon readme

    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e978fb3 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5b45e0c View commit details
    Browse the repository at this point in the history
  22. chore(code-snippet): remove unused skip code

    -add additional comments
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    6205f79 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    dc4f27f View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    cf1b4f6 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    5c1ac61 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    ab09e89 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    4d5ce6e View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    3cc7ab0 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    64a583a View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    7aba7aa View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    29fab28 View commit details
    Browse the repository at this point in the history
  32. feat(code-snippet): add support for snippet value overrides

    -adds example for EuiDatePicker story
    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    6c767b6 View commit details
    Browse the repository at this point in the history
  33. chore: cleanup log

    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    1385035 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    61a38d7 View commit details
    Browse the repository at this point in the history
  35. chore: cleanup

    mgadewoll committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    fe269e7 View commit details
    Browse the repository at this point in the history