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

vue addon-docs display prop values in prop table. #9851

Open
travis-w opened this issue Feb 13, 2020 · 6 comments
Open

vue addon-docs display prop values in prop table. #9851

travis-w opened this issue Feb 13, 2020 · 6 comments

Comments

@travis-w
Copy link

Is your feature request related to a problem? Please describe.
I'm not sure if this is already possible, but I have looked around and tried a bunch of different options, but I would like the possible values for a component prop to show up in the prop table in docs.

This may already be possible, but it seems that all of my jsdoc comments are being pulled except for the @values field. Please point me in the right direction if so.

Describe the solution you'd like
Grab @values from jsdoc on component and display in addon-docs prop table. Displaying under the description would be nice, or another column all together.

Describe alternatives you've considered
It looks like this may be possible by describing the props with PropTypes in your story, but since I am using, Vue, that would be an extra dependency that only gets used for this feature. JSDoc has @values so it would be nice to have that pulled in as well.

Are you able to assist bring the feature to reality?
Possibly. If someone could point me in the right direction

Additional context
Here is the image that shows what I would like:
Example
It shows the possible values in the description. This is from the docs documentation so it looks like it may be possible, but just not working for me.

@shilman
Copy link
Member

shilman commented Feb 14, 2020

Hi @travis-w! I'm currently setting up a proper test framework for props table in #9838 and that should be ready this week. Once that's in place, it should be pretty straightforward to add this and I'd love to work with you on that. I'll post back here once it's merged, and if you want to pair on it, feel free to hop on our discord https://discord.gg/UUt2PJb

@travis-w
Copy link
Author

@shilman That sounds great! I've joined the discord and look forward to working on this.

@shilman
Copy link
Member

shilman commented Feb 14, 2020

@travis-w Awesome!! I just went through all the 40-something open props issues and created repros for most of them. The new setup makes it pretty efficient. Unfortunately, Vue is the only major framework I haven't gotten working yet.

Attempted test setup here: #9841

Hoping @Aaron-Pool can get me unblocked here! 🙏🙏🙏

@stale stale bot added the inactive label Mar 6, 2020
@storybookjs storybookjs deleted a comment from stale bot Mar 7, 2020
@stale stale bot removed the inactive label Mar 7, 2020
@stale
Copy link

stale bot commented Mar 28, 2020

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!

@stale stale bot added the inactive label Mar 28, 2020
@stale stale bot removed the inactive label Mar 28, 2020
@mathijsblokland
Copy link

mathijsblokland commented Oct 14, 2020

I've also been looking for this as i'm setting up storybook for our Vue app and wanted to show the options (values) for a specific property. In my case i'd like to have the values defined in JSDoc to be populated as options into a controls dropdown. This would make it easier to switch between classes on an element, but listing those values in a separate column would also be of great help 😄. @shilman or @Aaron-Pool is there any progress on this issue?

@fallemand
Copy link

fallemand commented Nov 29, 2020

Has it been any update on this? Could be super useful.
This is also not working in vue:

size: {
  default: 'medium',
  type: String as PropType<'button' | 'submit' | 'reset'>,
},

It just renders string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants