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

Remove title property and "Title prop is optional" comment from docs snippets #22626

Closed
kylegach opened this issue May 18, 2023 · 3 comments · Fixed by #22820
Closed

Remove title property and "Title prop is optional" comment from docs snippets #22626

kylegach opened this issue May 18, 2023 · 3 comments · Fixed by #22820

Comments

@kylegach
Copy link
Contributor

kylegach commented May 18, 2023

This one:

/* 👇 The title prop is optional.
 * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
 * to learn how to generate automatic titles
 */
title: 'Components/Button',

See here (and many, many other places), for example: https://storybook.js.org/docs/react/writing-stories/introduction#default-export

@shilman
Copy link
Member

shilman commented May 18, 2023

What's the thinking here? Removing the title entirely from these snippets? Or just the fact that it's optional?

@kylegach
Copy link
Contributor Author

@shilman — Oh, good question. I'd like to remove both this comment and the title property.

The default behavior (no title) is to automatically infer the title from the filesystem location. I don't think our snippets need to be documenting something that isn't the default and isn't directly relevant to whatever that snippet is teaching.

If you agree, I'll update this issue to be more clear.

@shilman
Copy link
Member

shilman commented May 19, 2023

Makes sense. Thanks for the clarification!

@kylegach kylegach changed the title Remove "Title prop is optional" comment from docs snippets Remove title property and "Title prop is optional" comment from docs snippets May 19, 2023
@jonniebigodes jonniebigodes moved this to In Progress in Learning Team May 25, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Learning Team May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants