Skip to content

Docs: Adds table of contents documentation#23439

Merged
shilman merged 2 commits into
nextfrom
chore_docs_autodocs_toc
Jul 13, 2023
Merged

Docs: Adds table of contents documentation#23439
shilman merged 2 commits into
nextfrom
chore_docs_autodocs_toc

Conversation

@jonniebigodes

Copy link
Copy Markdown
Contributor

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:

  • Updated the relevant documentation.
  • Set up the required snippets

@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 🙏

@github-actions

github-actions Bot commented Jul 13, 2023

Copy link
Copy Markdown
Contributor
Fails
🚫

PR is not labeled with one of: ["ci:normal","ci:merged","ci:daily"]

Generated by 🚫 dangerJS against 2035c5f

@shilman shilman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good @jonniebigodes !!! A few comments

```ts
// MyComponent.stories.ts

import type { Meta } from '@storybook/angular';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does angular need its own snippet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this typechecks?

@jonniebigodes jonniebigodes Jul 13, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/writing-docs/autodocs.md Outdated

## Troubleshooting

### The table of contents doesn't render as expected

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be under a Known limitations section?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@shilman shilman merged commit 6c733aa into next Jul 13, 2023
@shilman shilman deleted the chore_docs_autodocs_toc branch July 13, 2023 23:16
@github-actions github-actions Bot mentioned this pull request Jul 17, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants