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

feat(callout): Move Callout component to nextra/components #1864

Merged
merged 12 commits into from May 22, 2023

Conversation

tristandubbeld
Copy link
Contributor

@tristandubbeld tristandubbeld commented May 15, 2023

To enable usage of the Callout component in docs, blog and custom themes, we extract it to the nextra package components folder and export it from there.

In this PR

  • Moved Callout component from nextra-theme-docs to nextra/components.
  • Updated the blog and docs examples.
  • Updated the Nextra documentation.
  • Decide on clsx package usage in nextra components.

@changeset-bot
Copy link

changeset-bot bot commented May 15, 2023

🦋 Changeset detected

Latest commit: 818aa97

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
nextra-theme-docs Major
nextra Major
nextra-theme-blog Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2023 11:52am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview May 22, 2023 11:52am

@vercel
Copy link

vercel bot commented May 15, 2023

@tristandubbeld is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@@ -111,6 +111,7 @@
"@mdx-js/mdx": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@napi-rs/simple-git": "^0.1.8",
"clsx": "^1.2.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of using clsx we can use something like TypeToClassName like we do with emojis, what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think is totally fine to use clsx in nextra, because I want to move other components from nextra-theme-docs to nextra too - Tabs, Steps, FileTree

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if you need help with those 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good! You can work on it, thank you!

Comment on lines +34 to +36
.nx-prose .nextra-callout p {
@apply nx-m-0;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Preferring this css rule over using .not-prose to enable callout content to have markup. Not sure if we want paragraphs inside callouts to have more space around them though. Multiple lines do now look like this:
image

@tristandubbeld
Copy link
Contributor Author

@B2o5T I can move the Callout docs to the general Nextra pages, what do you think would be a good path / navigation flow? I can do /docs/guide/built-ins/callout for example. Not sure if people start looking there when they need specific built in components if there is just one for the time being. Also unaware of any decisions that were already made on this.

@dimaMachina
Copy link
Collaborator

I can move the Callout docs to the general Nextra pages, what do you think would be a good path / navigation flow?

I think is reasonable to move these docs to Nextra pages since nextra-theme-docs now just reexport them

@tristandubbeld
Copy link
Contributor Author

Should we add a redirect from docs/docs-theme/built-ins/callout to docs/guide/built-ins/callout to the next config? And if I add a changeset, should it be a minor version or a patch?

@dimaMachina
Copy link
Collaborator

Should we add a redirect from docs/docs-theme/built-ins/callout to docs/guide/built-ins/callout to the next config? And if I add a changeset, should it be a minor version or a patch?

about redirect - nice catch, you can add it

and about changeset - minor since it's a new feature and not a fix of a bug 🙂

@dimaMachina
Copy link
Collaborator

@tristandubbeld Sorry I was OOO last week, I'll release it today

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

i fixed info callout colors
image

@dimaMachina dimaMachina merged commit 1c6256b into shuding:main May 22, 2023
6 of 8 checks passed
filiphuhta pushed a commit to filiphuhta/nextra that referenced this pull request May 24, 2023
)

Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru>
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
tatukoivisto pushed a commit to tatukoivisto/nextra that referenced this pull request Aug 20, 2023
)

Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru>
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants