-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Tabs: Auto-generate README #68209
base: trunk
Are you sure you want to change the base?
Tabs: Auto-generate README #68209
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
* for more info. | ||
* | ||
* @default true | ||
* | ||
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid @see
tags as they are suppressed in Storybook props tables, and don't make sense when displayed unformatted in the auto-generated README.
- `both`: all arrow keys work. | ||
- `horizontal`: only left and right arrow keys work. | ||
- `vertical`: only up and down arrow keys work. | ||
|
||
- Required: No | ||
- Default: `horizontal` | ||
- Type: `"horizontal" | "vertical" | "both"` | ||
- Required: No | ||
- Default: `"horizontal"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTML rendering behavior of these "run-on" Markdown lists is not clearly defined, and depending on the renderer can result in a single merged list 😅
@ciampo Any ideas how to address systematically? (I usually just tweak the prop description so it doesn't end in a list item 🙈)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I fully understand the scenario that you're describing 🙉 Could you explain it again? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry.
Let's say we have a prop description like this:
/**
* This is my prop description. It has a list:
*
* - Foo
* - Bar
* - Baz
*/
myProp?: string;
That is going to end up in the README like this:
### `myProp`
This is my prop description. It does three things:
- Foo
- Bar
- Baz
- Type: `string`
- Required: No
Paste that into a Markdown to HTML converter, and it's going to generate random weird HTML for that ambiguously separated list, depending on the converter implementation. There needs to be some content between those two lists for it to render reliably.
Flaky tests detected in 4ddf771. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12438403211
|
Stacked on #68208
What?
Convert the Tabs README to an auto-generated one.
Supplementary information that was in the existing README is moved to other appropriate locations (JSDocs, Storybook "Best Practices" page).
Why?
To decrease maintenance cost and consolidate the canonical docs for our audience.
Testing Instructions
Tabs.Tab
for example, and see that the JSDoc includes the subcomponent description.npm run docs:components
to regenerate READMEs.