From 6789599b944cb077d8842df92b1ee9dde9bcbf65 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 11:51:31 -0400 Subject: [PATCH 1/4] GRO-951-2 updates copyright year on load client-side (for pages that are rarely rebuilt) --- script/_linter/bin/links.js | 1 - src/components/chrome/StaticFooter.astro | 251 +++++++++++++++++++- src/components/chrome/fragments/footer.html | 126 ---------- 3 files changed, 243 insertions(+), 135 deletions(-) delete mode 100644 src/components/chrome/fragments/footer.html diff --git a/script/_linter/bin/links.js b/script/_linter/bin/links.js index 52db3f3f16..a5b965a793 100644 --- a/script/_linter/bin/links.js +++ b/script/_linter/bin/links.js @@ -103,7 +103,6 @@ const allFiles = glob // TODO: Shared chrome removal generated a lot of ignorable errors. // We plan on redoing the docs header/footer, re-enable when that's done. - `${folderPath}/src/components/chrome/fragments/footer.html`, `${folderPath}/src/components/chrome/fragments/header.html`, ], }); diff --git a/src/components/chrome/StaticFooter.astro b/src/components/chrome/StaticFooter.astro index 563675a4f7..e4899ef2d2 100644 --- a/src/components/chrome/StaticFooter.astro +++ b/src/components/chrome/StaticFooter.astro @@ -1,12 +1,247 @@ ---- -import footerTemplate from "./fragments/footer.html?raw"; +
+ +
+ + + +{/* Keep copyright year up-to-date for pages that are rarely rebuilt (e.g. v0.44) */} + diff --git a/src/components/chrome/fragments/footer.html b/src/components/chrome/fragments/footer.html deleted file mode 100644 index 1ec46e5425..0000000000 --- a/src/components/chrome/fragments/footer.html +++ /dev/null @@ -1,126 +0,0 @@ -
- -
- - From d4c10a0475a09fa8a7ce6a8d62405c00d06e6e6d Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 13:33:01 -0400 Subject: [PATCH 2/4] GRO-951-2 updates header so github stars is only included on /docs/latest pages, not on pages for specific versions since it'd get out of date when we stop building them --- script/_linter/bin/links.js | 4 - src/components/chrome/StaticHeader.astro | 3214 ++++++++++++++++++- src/components/chrome/fragments/header.html | 1655 ---------- src/layouts/DefaultNewLayout.astro | 2 +- 4 files changed, 3211 insertions(+), 1664 deletions(-) delete mode 100644 src/components/chrome/fragments/header.html diff --git a/script/_linter/bin/links.js b/script/_linter/bin/links.js index a5b965a793..c3d3e87dbd 100644 --- a/script/_linter/bin/links.js +++ b/script/_linter/bin/links.js @@ -100,10 +100,6 @@ const allFiles = glob `${folderPath}/spec/**/*`, `${folderPath}/tmp/**/*`, `${folderPath}/vendor/**/*`, - - // TODO: Shared chrome removal generated a lot of ignorable errors. - // We plan on redoing the docs header/footer, re-enable when that's done. - `${folderPath}/src/components/chrome/fragments/header.html`, ], }); diff --git a/src/components/chrome/StaticHeader.astro b/src/components/chrome/StaticHeader.astro index 7b2bc6e96e..f6fc20b2ea 100644 --- a/src/components/chrome/StaticHeader.astro +++ b/src/components/chrome/StaticHeader.astro @@ -1,12 +1,3218 @@ --- import { formatGithubStars, getGithubStars } from "@/lib/github/getGithubStars"; -import headerHtml from "./fragments/header.html?raw"; -const githubStars = formatGithubStars(await getGithubStars()); -const renderedHeaderHtml = headerHtml.replace("%%GITHUB_STARS%%", githubStars); +type Props = { + includeGithubStars?: boolean; +}; + +const { includeGithubStars } = Astro.props; + +const githubStars = + includeGithubStars && formatGithubStars(await getGithubStars()); --- - +
+ +
+ diff --git a/src/components/chrome/fragments/header.html b/src/components/chrome/fragments/header.html deleted file mode 100644 index 3996482c4b..0000000000 --- a/src/components/chrome/fragments/header.html +++ /dev/null @@ -1,1655 +0,0 @@ -
- -
diff --git a/src/layouts/DefaultNewLayout.astro b/src/layouts/DefaultNewLayout.astro index dcf4716c8b..ed50d1548e 100644 --- a/src/layouts/DefaultNewLayout.astro +++ b/src/layouts/DefaultNewLayout.astro @@ -20,7 +20,7 @@ const lq = getLiquidRenderer({ page, dirname }); - +
From 29a980fafcf819f806710266bba222203a0b552e Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 15:00:42 -0400 Subject: [PATCH 3/4] GRO-951-2 minor cleanup: include gh stars on error page and /all + just use getUTCFullYear client-side too for consistency --- src/components/chrome/StaticFooter.astro | 2 +- src/layouts/DefaultNewLayout.astro | 2 +- src/layouts/ErrorLayout.astro | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/chrome/StaticFooter.astro b/src/components/chrome/StaticFooter.astro index e4899ef2d2..64b29dfd3d 100644 --- a/src/components/chrome/StaticFooter.astro +++ b/src/components/chrome/StaticFooter.astro @@ -242,6 +242,6 @@ document .querySelectorAll('[data-component="mb-copyright-year"]') .forEach((el) => { - el.innerHTML = `${new Date().getFullYear()}`; + el.innerHTML = `${new Date().getUTCFullYear()}`; }); diff --git a/src/layouts/DefaultNewLayout.astro b/src/layouts/DefaultNewLayout.astro index ed50d1548e..f4559a7282 100644 --- a/src/layouts/DefaultNewLayout.astro +++ b/src/layouts/DefaultNewLayout.astro @@ -20,7 +20,7 @@ const lq = getLiquidRenderer({ page, dirname }); - +
diff --git a/src/layouts/ErrorLayout.astro b/src/layouts/ErrorLayout.astro index 76816695e7..a949dcb12a 100644 --- a/src/layouts/ErrorLayout.astro +++ b/src/layouts/ErrorLayout.astro @@ -19,7 +19,7 @@ const lq = getLiquidRenderer({ page, dirname }); - +
From e3f996d2134ba77eb8d92ef079dac74d1f6a81ce Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 15:48:38 -0400 Subject: [PATCH 4/4] GRO-951-2 fix minor inconsistency between this branch and prod --- src/components/chrome/StaticHeader.astro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/chrome/StaticHeader.astro b/src/components/chrome/StaticHeader.astro index f6fc20b2ea..c319c3e707 100644 --- a/src/components/chrome/StaticHeader.astro +++ b/src/components/chrome/StaticHeader.astro @@ -421,8 +421,7 @@ const githubStars =
- Data Studio - + Data Studio{" "} New