From f2667cfcb06521d4b9b3c6e6be9f9d98d801f012 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 5 Dec 2024 16:46:24 +0000 Subject: [PATCH 1/7] update version snippet file name --- website/docs/docs/collaborate/govern/model-versions.md | 2 +- website/docs/reference/project-configs/version.md | 2 +- website/docs/reference/resource-properties/versions.md | 2 +- .../snippets/{_version-callout.md => _model-version-callout.md} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename website/snippets/{_version-callout.md => _model-version-callout.md} (100%) diff --git a/website/docs/docs/collaborate/govern/model-versions.md b/website/docs/docs/collaborate/govern/model-versions.md index eefcf76e824..5b50ab7faab 100644 --- a/website/docs/docs/collaborate/govern/model-versions.md +++ b/website/docs/docs/collaborate/govern/model-versions.md @@ -14,7 +14,7 @@ This functionality is new in v1.5 — if you have thoughts, participate in [the -import VersionsCallout from '/snippets/_version-callout.md'; +import VersionsCallout from '/snippets/_model-version-callout.md'; diff --git a/website/docs/reference/project-configs/version.md b/website/docs/reference/project-configs/version.md index 890ad8542a7..54df6bfcb31 100644 --- a/website/docs/reference/project-configs/version.md +++ b/website/docs/reference/project-configs/version.md @@ -4,7 +4,7 @@ required: True keyword: project version, project versioning, dbt project versioning --- -import VersionsCallout from '/snippets/_version-callout.md'; +import VersionsCallout from '/snippets/_model-version-callout.md'; diff --git a/website/docs/reference/resource-properties/versions.md b/website/docs/reference/resource-properties/versions.md index 748aa477a4f..d2cb4a1f116 100644 --- a/website/docs/reference/resource-properties/versions.md +++ b/website/docs/reference/resource-properties/versions.md @@ -5,7 +5,7 @@ required: no keyword: governance, model version, model versioning, dbt model versioning --- -import VersionsCallout from '/snippets/_version-callout.md'; +import VersionsCallout from '/snippets/_model-version-callout.md'; diff --git a/website/snippets/_version-callout.md b/website/snippets/_model-version-callout.md similarity index 100% rename from website/snippets/_version-callout.md rename to website/snippets/_model-version-callout.md From 39c9cd42c0b510aa1cfb3b972f8fd476317d302f Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 5 Dec 2024 16:53:14 +0000 Subject: [PATCH 2/7] create snippet and prop --- .../docs/reference/resource-configs/dbt_valid_to_current.md | 4 +++- website/snippets/_version-callout.md | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 website/snippets/_version-callout.md diff --git a/website/docs/reference/resource-configs/dbt_valid_to_current.md b/website/docs/reference/resource-configs/dbt_valid_to_current.md index 2a6cf3abe6d..2a2c79fa53a 100644 --- a/website/docs/reference/resource-configs/dbt_valid_to_current.md +++ b/website/docs/reference/resource-configs/dbt_valid_to_current.md @@ -6,7 +6,9 @@ default_value: {NULL} id: "dbt_valid_to_current" --- -Available from dbt v1.9 or with [the dbt Cloud "Latest" release track](/docs/dbt-versions/cloud-release-tracks) dbt Cloud. +import VersionCallout from '/snippets/_version-callout.md'; + + diff --git a/website/snippets/_version-callout.md b/website/snippets/_version-callout.md new file mode 100644 index 00000000000..49e980e1ccf --- /dev/null +++ b/website/snippets/_version-callout.md @@ -0,0 +1,5 @@ +:::tip + +Available from dbt v{props.version} or with [the dbt Cloud "Latest" release track](/docs/dbt-versions/cloud-release-tracks) dbt Cloud. + +::: From b39fe720cce49516ef320044cd82c9a5c1de50c0 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 16 Dec 2024 11:52:19 +0000 Subject: [PATCH 3/7] add global version callout --- website/docs/docs/introduction.md | 3 +++ website/src/components/versionCallout/index.js | 17 +++++++++++++++++ website/src/theme/MDXComponents/index.js | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 website/src/components/versionCallout/index.js diff --git a/website/docs/docs/introduction.md b/website/docs/docs/introduction.md index 5301dae396d..1bafd23f09f 100644 --- a/website/docs/docs/introduction.md +++ b/website/docs/docs/introduction.md @@ -5,6 +5,9 @@ pagination_next: null pagination_prev: null --- + + + dbt compiles and runs your analytics code against your data platform, enabling you and your team to collaborate on a single source of truth for metrics, insights, and business definitions. This single source of truth, combined with the ability to define tests for your data, reduces errors when logic changes, and alerts you when issues arise. diff --git a/website/src/components/versionCallout/index.js b/website/src/components/versionCallout/index.js new file mode 100644 index 00000000000..abbef1e3188 --- /dev/null +++ b/website/src/components/versionCallout/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Admonition from '@theme/Admonition'; + +const VersionCallout = ({ version }) => ( +
+ + + Available from dbt v{version} or with the{' '} + + dbt Cloud "Latest" release track + {' '}. + + +
+); + +export default VersionCallout; diff --git a/website/src/theme/MDXComponents/index.js b/website/src/theme/MDXComponents/index.js index 422d6c99fab..c0a15e6c5b6 100644 --- a/website/src/theme/MDXComponents/index.js +++ b/website/src/theme/MDXComponents/index.js @@ -45,6 +45,7 @@ import Lifecycle from '@site/src/components/lifeCycle'; import DetailsToggle from '@site/src/components/detailsToggle'; import Expandable from '@site/src/components/expandable'; import ConfettiTrigger from '@site/src/components/confetti/'; +import VersionCallout from '@site/src/components/versionCallout'; const MDXComponents = { Head, @@ -97,5 +98,6 @@ const MDXComponents = { Expandable: Expandable, ConfettiTrigger: ConfettiTrigger, SortableTable: SortableTable, + VersionCallout: VersionCallout, }; export default MDXComponents; From b91ee757c94dde592e99c0df85752a8c1396a361 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 16 Dec 2024 12:00:38 +0000 Subject: [PATCH 4/7] remove snippet --- .../docs/reference/resource-configs/dbt_valid_to_current.md | 2 -- website/snippets/_version-callout.md | 5 ----- 2 files changed, 7 deletions(-) delete mode 100644 website/snippets/_version-callout.md diff --git a/website/docs/reference/resource-configs/dbt_valid_to_current.md b/website/docs/reference/resource-configs/dbt_valid_to_current.md index 2a2c79fa53a..9cf2ca0860e 100644 --- a/website/docs/reference/resource-configs/dbt_valid_to_current.md +++ b/website/docs/reference/resource-configs/dbt_valid_to_current.md @@ -6,8 +6,6 @@ default_value: {NULL} id: "dbt_valid_to_current" --- -import VersionCallout from '/snippets/_version-callout.md'; - diff --git a/website/snippets/_version-callout.md b/website/snippets/_version-callout.md deleted file mode 100644 index 49e980e1ccf..00000000000 --- a/website/snippets/_version-callout.md +++ /dev/null @@ -1,5 +0,0 @@ -:::tip - -Available from dbt v{props.version} or with [the dbt Cloud "Latest" release track](/docs/dbt-versions/cloud-release-tracks) dbt Cloud. - -::: From 0043afe1b2dea4632c69037a5b5d480dea6ab483 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 16 Dec 2024 12:13:00 +0000 Subject: [PATCH 5/7] remove from intro --- website/docs/docs/introduction.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/website/docs/docs/introduction.md b/website/docs/docs/introduction.md index 1bafd23f09f..5301dae396d 100644 --- a/website/docs/docs/introduction.md +++ b/website/docs/docs/introduction.md @@ -5,9 +5,6 @@ pagination_next: null pagination_prev: null --- - - - dbt compiles and runs your analytics code against your data platform, enabling you and your team to collaborate on a single source of truth for metrics, insights, and business definitions. This single source of truth, combined with the ability to define tests for your data, reduces errors when logic changes, and alerts you when issues arise. From 22521cc02e43fffe75f8343fb1af4a270b5e0806 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 20 Dec 2024 20:00:05 +0000 Subject: [PATCH 6/7] Update index.js --- website/src/components/versionCallout/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/website/src/components/versionCallout/index.js b/website/src/components/versionCallout/index.js index abbef1e3188..79cf07d9ed9 100644 --- a/website/src/components/versionCallout/index.js +++ b/website/src/components/versionCallout/index.js @@ -1,7 +1,13 @@ import React from 'react'; import Admonition from '@theme/Admonition'; -const VersionCallout = ({ version }) => ( +const VersionCallout = ({ version }) => { + if (!version) { + // If no version is passed, render nothing or a default fallback message + return null; + } + + return (
@@ -13,5 +19,6 @@ const VersionCallout = ({ version }) => (
); +}; export default VersionCallout; From e8fc174fd87c9b27cbc6eb9581b3ba19c50219fb Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 20 Dec 2024 20:00:39 +0000 Subject: [PATCH 7/7] Update index.js --- website/src/components/versionCallout/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/website/src/components/versionCallout/index.js b/website/src/components/versionCallout/index.js index 79cf07d9ed9..598182c851f 100644 --- a/website/src/components/versionCallout/index.js +++ b/website/src/components/versionCallout/index.js @@ -3,7 +3,6 @@ import Admonition from '@theme/Admonition'; const VersionCallout = ({ version }) => { if (!version) { - // If no version is passed, render nothing or a default fallback message return null; }