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(examples): Updated Chakra UI examples #36333

Merged
merged 15 commits into from Apr 28, 2022
Merged

docs(examples): Updated Chakra UI examples #36333

merged 15 commits into from Apr 28, 2022

Conversation

nikolovlazar
Copy link
Contributor

Overview

This PR updates both Chakra UI examples by updating the Chakra UI packages to the latest versions, and added better examples for Semantic Tokens (new feature in Chakra UI), and pseudo props.

Documentation / Examples

  • Make sure the linting passes by running yarn lint

@ijjk ijjk added the examples Issue/PR related to examples label Apr 21, 2022
Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

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

Thanks! I added a few comments.

I wonder if we should remove with-chakra-ui-typescript (only leave the README with a link) and rewrite with-chakra-ui in TypeScript, so it's less to maintain.

We recommend TS for examples, as it helps eliminate a class of bugs, while also providing better DX, even for newcomers.

examples/with-chakra-ui-typescript/package.json Outdated Show resolved Hide resolved
examples/with-chakra-ui-typescript/package.json Outdated Show resolved Hide resolved
@nikolovlazar
Copy link
Contributor Author

nikolovlazar commented Apr 22, 2022

@balazsorban44 sounds good! We can remove one of the examples. Question though, since we're going to leave the typescript one with just a README, how can we prevent users from using it through the CLI, or provide some kind of a fallback mechanism?

Also, what do you think we should write in the README file?

@balazsorban44
Copy link
Member

See an example here: https://github.com/vercel/next.js/tree/canary/examples/custom-server

For the CLI, I don't think we do anything special.

@nikolovlazar
Copy link
Contributor Author

@balazsorban44 done! Ready to be reviewed again.

Comment on lines 18 to 26
npx create-next-app --example with-chakra-ui with-chakra-ui-app
npx create-next-app --example with-chakra-ui-typescript with-chakra-ui-typescript-app
# or
yarn create next-app --example with-chakra-ui with-chakra-ui-app
yarn create next-app --example with-chakra-ui-typescript with-chakra-ui-typescript-app
# or
pnpm create next-app -- --example with-chakra-ui with-chakra-ui-app
pnpm create next-app -- --example with-chakra-ui-typescript with-chakra-ui-typescript-app
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary, at the least --example with-chakra-ui-typescript would fail as the other example was deprecated. It should be the same as the folder name, i.e: --example with-chakra-ui

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@balazsorban44 right! I've pushed the changes.

Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

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

Thank you!

examples/with-chakra-ui/README.md Outdated Show resolved Hide resolved
examples/with-chakra-ui/README.md Outdated Show resolved Hide resolved
@kodiakhq kodiakhq bot merged commit cc35859 into vercel:canary Apr 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants