-
Notifications
You must be signed in to change notification settings - Fork 982
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
add global version callout component #6673
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,8 @@ | |||
|
|||
:::info Model versions, dbt_project.yml versions, and .yml versions |
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.
changed this callout from 'version-callout' to the more appropriate 'model-version-callout'.
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.
This looks great! 🚢 it!
Asana request for web team review: https://app.asana.com/0/1200099998847559/1209022948285146/f |
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.
Great work @mirnawong1, this lgtm! Added one comment with a small area of improvement within the component if you'd like to add it, but all functionality looks to work as expected here!
const VersionCallout = ({ version }) => ( | ||
<div> | ||
<Admonition type="tip" icon="💡" title="Did you know..."> | ||
<span> | ||
Available from dbt v{version} or with the{' '} | ||
<a href="/docs/dbt-versions/cloud-release-tracks"> | ||
dbt Cloud "Latest" release track | ||
</a>{' '}. | ||
</span> | ||
</Admonition> | ||
</div> | ||
); |
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.
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.
Oh damn that's such a good flag! Thank you @JKarlavige !
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 again @JKarlavige ! added a
if (!version) {
return null;
}
to the const VersionCallout statement and it worked! nothing is displayed if i forget to add the version
. thank you again for that awesome tip!
this pr adds a global
VersionCallout
componnent allowing the docs team to use a component to make it easier to standardize using version callouts on the docs site.for example, we can use
<VersionCallout version="2.5" />
(in this example, version 2.5 is fictional) and that will dispaly a tip callout saying:docs project
🚀 Deployment available! Here are the direct links to the updated files: