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

Docs: Turn on autodocs for CSF with attached meta. #20867

Merged
merged 7 commits into from
Feb 1, 2023

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Feb 1, 2023

Fixes #20863

Warning
This is a breaking change to Docs 2's naming

What I did

Use the name of the MDX file as the name of the docs entry if not specified. Fall back to docsOptions.defaultName (the autodocs name) only if the file is named the same as the CSF file (e.g. Button.mdx).

How to test

See tests + stories in sandboxes:

image

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

LGTM! I think the failing tests are legit though.

@tmeasday tmeasday merged commit 9c1a1d1 into next Feb 1, 2023
@tmeasday tmeasday deleted the 20864-20863-change-attached-mdx-naming branch February 1, 2023 23:20
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.

Take the default name for MDX files from the filename, rather than the docsOptions.defaultName
2 participants