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: Add Next.js framework doc #25534

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Docs: Add Next.js framework doc #25534

merged 6 commits into from
Jan 24, 2024

Conversation

kylegach
Copy link
Contributor

@kylegach kylegach commented Jan 9, 2024

What I did

Documents Storybook for Next.js framework

Based on

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. Follow the steps in the contributing instructions for this branch, framework-doc-nextjs

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@kylegach kylegach added documentation ci:docs Run the CI jobs for documentation checks only. labels Jan 9, 2024
@kylegach kylegach self-assigned this Jan 9, 2024
@kylegach kylegach force-pushed the framework-doc-nextjs branch from d494c85 to a5700b6 Compare January 10, 2024 18:38
@kylegach kylegach force-pushed the framework-doc-nextjs branch 2 times, most recently from 6a78a46 to 7e3f611 Compare January 18, 2024 16:43
Copy link

@chantastic chantastic left a comment

Choose a reason for hiding this comment

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

Love seeing this. That's a lot to cover, nicely done.

Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

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

I took a preliminary pass at this and there's some work that needs to done for now so that we can get this into a good shape before we can take another pass at it and polish it up in terms of structure.


[Local images](https://nextjs.org/docs/pages/building-your-application/optimizing/images#local-images) are supported.

```jsx
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment mentioning the file name so that when rendered in the documentation, the snippet component can be interpreted without a blank title? Also, while we're at it convert this to a snippet file and introduce a JSX and a TSX variant, and also ensure this is capitalized properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is demonstrating usage of a Next.js feature, not a Storybook one. This is not something folks will be copy/pasting, and if they do, it'll be the <Image> portion, which will be identical for JS & TS. I don't think the overhead of multiple snippets is worth the small benefit.

docs/snippets/react/rsc-feature-flag.js.mdx Show resolved Hide resolved
docs/get-started/nextjs.md Outdated Show resolved Hide resolved
docs/get-started/nextjs.md Outdated Show resolved Hide resolved
docs/get-started/nextjs.md Outdated Show resolved Hide resolved
@kylegach
Copy link
Contributor Author

@jonniebigodes — Ready for your re-review!

- Remove references to `useSWC`
- Per #25591
- `features.experimentalNextRSC` -> `features.experimentalRSC`
- `parameters.nextjs.rsc` -> `parameters.react.rsc`
- Add missing filenames or titles to snippets
- Proper capitalization of terms like Webpack, Babel, PostCSS, etc.
- Fix some typos
- Split up complex snippets
- Document default parameter values
- Move acknowledgements back to README
- Simplify navigation/router fn override guidance
- Fix incorrect snippet
- Consistently format headings
@kylegach kylegach force-pushed the framework-doc-nextjs branch from 2b2e70d to 7bdefcb Compare January 24, 2024 22:22
@kylegach kylegach merged commit 1010f2f into next Jan 24, 2024
18 checks passed
@kylegach kylegach deleted the framework-doc-nextjs branch January 24, 2024 22:36
@github-actions github-actions bot mentioned this pull request Jan 24, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:docs Run the CI jobs for documentation checks only. documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants