Storybook: addon-docs inserts TypeScript JSDoc as HTML markup/string.

Created on 5 Feb 2020  路  2Comments  路  Source: storybookjs/storybook

Describe the bug
JSDoc is from .tsx files is imported as pure HTML markup text with no formatting.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://gist.github.com/shilman/bc9cbedb2a7efb5ec6710337cbd20c0c
  2. Follow the guide through Step 5.
  3. Add some JSDoc to the The world's most _basic_ button section
  4. Open Storybook

Expected behavior
A better representation of the JSDoc markup, with better visual presentation of the JSDoc tags and their contents.
Show the @example tag as code snippet rather than making a HTML element out of it.

Possibility to ignore certain JSDoc tags, like the @example tag.

Screenshots
image

Code snippets
````
/**

  • The world's most _basic_ button


    • @param {string} name - This should be a string.



    • @param {ExtraProps} extraProps



    • @example


  • */
    ````

System:
````
Environment Info:

System:
OS: macOS Mojave 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 11.15.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Browsers:
Chrome: 79.0.3945.130
Firefox: 72.0.2
Safari: 12.1.1
npmPackages:
@storybook/addon-actions: ^6.0.0-alpha.6 => 6.0.0-alpha.6
@storybook/addon-docs: ^6.0.0-alpha.6 => 6.0.0-alpha.6
@storybook/addon-links: ^6.0.0-alpha.6 => 6.0.0-alpha.6
@storybook/addons: ^6.0.0-alpha.6 => 6.0.0-alpha.6
@storybook/preset-create-react-app: ^1.5.2 => 1.5.2
@storybook/react: ^6.0.0-alpha.6 => 6.0.0-alpha.6
````
Additional context
Repository with problem - https://github.com/ivoiv/cra-ts

docs other bug todo

Most helpful comment

Bumping this as it's still relevant.

All 2 comments

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Bumping this as it's still relevant.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aericson picture aericson  路  97Comments

p3k picture p3k  路  61Comments

EdenTurgeman picture EdenTurgeman  路  81Comments

43081j picture 43081j  路  61Comments

bpeab picture bpeab  路  70Comments