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

Fix Introduction MDX for Next.js and Typescript #20798

Merged
merged 1 commit into from Feb 7, 2023

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Jan 26, 2023

Resolve #20465

What I did

Changed the name of the Introduction.stories.mdx template to Introduction.mdx in Next.js Typescript projects to properly overwrite the default Introduction.mdx file.

Renamed: code/frameworks/nextjs/template/cli/ts-legacy/Introduction.stories.mdx to code/frameworks/nextjs/template/cli/ts-legacy/Introduction.mdx

How to test

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
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

LGTM!

@valentinpalkovic valentinpalkovic force-pushed the fix-introduction-mdx-for-next-js-typescript branch from 3691442 to 45f1af6 Compare February 1, 2023 11:35
@yannbf
Copy link
Member

yannbf commented Feb 1, 2023

Let's wait for #20870 to be merged and then rebase again?

@valentinpalkovic valentinpalkovic force-pushed the fix-introduction-mdx-for-next-js-typescript branch 3 times, most recently from 53a763d to b71949a Compare February 6, 2023 10:26
@yannbf
Copy link
Member

yannbf commented Feb 6, 2023

@valentinpalkovic I figured out what's causing the issue.

We have a test for our event-logger (telemetry) which checks for the amount of generated stories in the sandboxes. It expects that the sandbox should contain 8 "CLI generated" stories, and 3 docs. Here's something to visualize this better:
image

However the resulting Storybook for nextjs/default-ts is this, which is missing the basic stories and their docs, only includes 1 docs entry which is "Introduction":
image

@valentinpalkovic valentinpalkovic force-pushed the fix-introduction-mdx-for-next-js-typescript branch 3 times, most recently from f12cd6a to 1750379 Compare February 6, 2023 16:16
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.

[Bug]: [7.0.0-beta.17]: Storybook doesn't display SVG icons
2 participants