Docs: Adds table of contents documentation#23439
Conversation
shilman
left a comment
There was a problem hiding this comment.
Looking good @jonniebigodes !!! A few comments
| ```ts | ||
| // MyComponent.stories.ts | ||
|
|
||
| import type { Meta } from '@storybook/angular'; |
There was a problem hiding this comment.
why does angular need its own snippet?
There was a problem hiding this comment.
We ran into some issues in the past, with some users reporting that the examples weren't being depicted accurately for Angular, and we've adopted this strategy to avoid further confusion. I'm aware that it introduces a maintenance burden, but we're managing it and hopefully in the future this will no longer be required.
| export default { | ||
| parameters: { | ||
| docs: { | ||
| toc: true, // 👈 Enables the table of contents |
There was a problem hiding this comment.
Was able to get it running without any issues based on this TS reproduction and JS reproduction, and I was surprised that there weren't any typecheck issues.
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### The table of contents doesn't render as expected |
There was a problem hiding this comment.
Should this be under a Known limitations section?
There was a problem hiding this comment.
I went with this approach to surface the issues that we're aware of and clearly mention them to the users without having them buried in that section of the documentation.
With this pull request, the Autodocs documentation was updated to feature in the table of contents, which will be available as part of the 7.1 release.
What was done:
@shilman, as you're the primary stakeholder on this feature. When you have a chance, could you take a pass at this pull request and let me know of any feedback? Appreciate it 🙏