-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
chore(www): Make components used in MDX globally available #20685
Conversation
@@ -212,6 +202,14 @@ items={[ | |||
slug={props.slug} | |||
/> | |||
|
|||
--- | |||
|
|||
## Other available components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should get rid of this section entirely. The remaining components here (Breadcrumb and TableOfContents) aren't really things that you'd import -- they're automatically added to pages in the site layout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah they may not make the most sense in this file compared to other components, but I think someone had pointed out it being good to document what those 2 components were doing since edits to the doc-links.yaml
and frontmatter that contributors often touch has a tableOfContentsDepth
and a breadcrumbTitle
. Recording it here was probably just the best place I found 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍 these components all seem pretty small and aiding translation efforts seems like a worthwhile reason to make them globally available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! - Note this doesn't change (much) in regards to bundle sizes, because mdx imports end up in app
chunk anyway, and this PR doesn't change that. There are slight changes in produced bundles - https://www.diffchecker.com/IP8oskzq but that's more of a reordering things happening because of imports happening in different places
Description
Make (most) website components used in MDX files globally available. This allows them to be easily referenced in translated docs pulled in from other repos.
The only ones not made available are
<APIReference>
and<GraphqlApiQuery>
, which we'll do as part of #18704.Related Issues
Fixes: #19036