question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prop descriptions from a Flow codebase does not show up in prop table

See original GitHub issue

Describe the bug I expect that the comments above the props from a code base using Flow would show up in the prop table in Storybook.

To Reproduce Steps to reproduce the behavior:

  1. Install code from https://github.com/lifeofmle/storybook-flow
  2. Run yarn install
  3. Run yarn storybook
  4. Open Docs panel of Button component

Expected behavior I expect that the comments above the props would show up in the prop table in Storybook

Screenshots Here is a screenshot of the Docs generated without the description from Flow props image

Code snippets I expect that the comments above the props would show up in the prop table in Storybook

type PropsType = {
  /**
   * Content of the button
   */
  children: ?Element<*>;
  /**
   * Specifies the width of the button. Default 100%
   */
  width: string;
  /**
   * What happens when you click on the button
   */
  onClick: () => void;
}

System: Code available https://github.com/lifeofmle/storybook-flow

Assumption Storybook book would read the props similar to how Styleguidist therefore the comments would be read and displayed

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Jan 3, 2020

@patricklafrance Nope, that upgrade is still sitting in a PR. I’m guessing it was a node_modules issue in @lifeofmle 's repo?

1reaction
lifeofmlecommented, Jan 2, 2020

@patricklafrance @shilman With 5.3.0-rc.7 the props started working for my internal library that is using flow.

It still doesn’t work with this demo project. I have no clue why.

I think it is safe to close this issue because it is working on my real code

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prop table doesn't show all the props in 5.3 #9764 - GitHub
Describe the bug While using v5.3.12, preset-create-react-app & TypeScript, I have a problem with the props table.
Read more >
General question about prop.table function in R - Stack Overflow
No, there's no way to edit the prop.table function to give you your desired result. If you want the sum of your percentages...
Read more >
JSDoc Reference - TypeScript: Documentation
JSDoc Reference. The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >
Google TypeScript Style Guide
Editors display the description on constructor calls and property accesses. /** This class demonstrates how parameter properties are documented. */ class ...
Read more >
Getting Started - Mithril
This function initializes the vm object with three members: list , which is simply an array, description , which is an m.prop getter-setter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found