From 24e56f6c3cf75d59d6ad15fb422dffcc8afd5765 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 9 Sep 2026 17:16:51 -0400 Subject: [PATCH 1/9] GRO-951 migrate top bar and its includes from liquid to astro --- _includes/docs_breadcrumb.html | 55 ------------ _includes/docs_version.html | 35 -------- _includes/learn/breadcrumbs.html | 40 --------- _includes/learn/search-input.html | 8 -- _includes/learn/top-bar.html | 27 ------ _includes/svg-icons/stars.html | 1 - src/components/chrome/Breadcrumb.astro | 96 +++++++++++++++++++++ src/components/chrome/SearchInput.astro | 3 + src/components/chrome/TopBar.astro | 42 +++++++++ src/components/chrome/VersionSelector.astro | 47 ++++++++++ src/icons/stars.svg | 15 ++++ src/layouts/NewDocsLayout.astro | 11 +-- 12 files changed, 207 insertions(+), 173 deletions(-) delete mode 100644 _includes/docs_breadcrumb.html delete mode 100644 _includes/docs_version.html delete mode 100644 _includes/learn/breadcrumbs.html delete mode 100644 _includes/learn/search-input.html delete mode 100644 _includes/learn/top-bar.html delete mode 100644 _includes/svg-icons/stars.html create mode 100644 src/components/chrome/Breadcrumb.astro create mode 100644 src/components/chrome/SearchInput.astro create mode 100644 src/components/chrome/TopBar.astro create mode 100644 src/components/chrome/VersionSelector.astro create mode 100644 src/icons/stars.svg diff --git a/_includes/docs_breadcrumb.html b/_includes/docs_breadcrumb.html deleted file mode 100644 index 66d33238e2..0000000000 --- a/_includes/docs_breadcrumb.html +++ /dev/null @@ -1,55 +0,0 @@ -{% comment %} - -{% endcomment %} - -{% capture version %} -{% if page.version == "latest" %}{{site.docs_version}}{% else %}{{page.version}}{% endif %} -{% endcapture %} - -{% capture latest_or_explicit_version %}{% if site.docs_version == page.version and page.url contains "/docs/latest/" %}latest{% else %}{{page.version}}{% endif %}{% endcapture %} -{% capture category_slug %}{{ page.category | slugify }}{% endcapture %} -{% capture category_slug_part %}{% if category_slug == "troubleshooting-guide"%}/{% elsif category_slug == "api" %}{{ "api-documentation" | strip}}{% else %}/start{% endif %}{% endcapture %} - -
- {% if page.has_magic_breadcrumbs %} - - {% else %} - - {% endif %} -
diff --git a/_includes/docs_version.html b/_includes/docs_version.html deleted file mode 100644 index ad878be1e7..0000000000 --- a/_includes/docs_version.html +++ /dev/null @@ -1,35 +0,0 @@ -{% assign versions = site.available_versions | reverse %} - -
- - {% if page.version == "latest" %} - {{site.docs_version}} - {% else %} - {{page.version}} - {% endif %} - - {% include svg-icons/chevron.html %} - - -
diff --git a/_includes/learn/breadcrumbs.html b/_includes/learn/breadcrumbs.html deleted file mode 100644 index c6c1353074..0000000000 --- a/_includes/learn/breadcrumbs.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/_includes/learn/search-input.html b/_includes/learn/search-input.html deleted file mode 100644 index cb2f87c8b9..0000000000 --- a/_includes/learn/search-input.html +++ /dev/null @@ -1,8 +0,0 @@ -{% if include.domain == "docs" %} -{% assign action = "/docs-search" %} -{% else %} -{% assign action = "/search" %} -{% endif %} -
- - diff --git a/_includes/learn/top-bar.html b/_includes/learn/top-bar.html deleted file mode 100644 index 8b39688ff4..0000000000 --- a/_includes/learn/top-bar.html +++ /dev/null @@ -1,27 +0,0 @@ -
-
- {% if include.show_breadcrumb %} -
- {% if include.domain == "docs" %} - {% include docs_breadcrumb.html %} - {% else %} - {% include learn/breadcrumbs.html %} - {% endif %} -
- {% endif %} -
- -
- {% if include.domain == "docs" %} - {% include docs_version.html %} - - {% include svg-icons/stars.html %} - What’s new - - {% endif %} - - {% unless include.show_search == "false" %} - {% include learn/search-input.html domain=include.domain %} - {% endunless %} -
-
diff --git a/_includes/svg-icons/stars.html b/_includes/svg-icons/stars.html deleted file mode 100644 index e74caf56a1..0000000000 --- a/_includes/svg-icons/stars.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/components/chrome/Breadcrumb.astro b/src/components/chrome/Breadcrumb.astro new file mode 100644 index 0000000000..e93e569115 --- /dev/null +++ b/src/components/chrome/Breadcrumb.astro @@ -0,0 +1,96 @@ +--- +import { baseCtx } from "@/lib/liquid/liquidRenderer"; + +type Props = { + page: { + version?: string; + url: string; + title?: string; + category?: string; + has_magic_breadcrumbs?: boolean; + show_category_breadcrumb?: boolean; + }; +}; + +const { page } = Astro.props; +const { site } = baseCtx; + +const slugify = (str: string) => + str + .toLowerCase() + .trim() + .replace(/[^a-z0-9]+/g, "-") + .replace(/^-+|-+$/g, ""); + +const version = page.version === "latest" ? site.docs_version : page.version; +const latestOrExplicitVersion = + site.docs_version === page.version && page.url.includes("/docs/latest/") + ? "latest" + : (page.version ?? ""); +const categorySlug = slugify(page.category ?? ""); +const categorySlugPart = + categorySlug === "troubleshooting-guide" + ? "/" + : categorySlug === "api" + ? "api-documentation" + : "/start"; +const breadcrumbDividerStyle = `--bs-breadcrumb-divider: url('/images/chevron_blue_right.svg');`; +--- + +
+ { + page.has_magic_breadcrumbs ? ( + + ) : ( + + ) + } +
diff --git a/src/components/chrome/SearchInput.astro b/src/components/chrome/SearchInput.astro new file mode 100644 index 0000000000..28dafdcf05 --- /dev/null +++ b/src/components/chrome/SearchInput.astro @@ -0,0 +1,3 @@ +
+ + diff --git a/src/components/chrome/TopBar.astro b/src/components/chrome/TopBar.astro new file mode 100644 index 0000000000..88bcd483b8 --- /dev/null +++ b/src/components/chrome/TopBar.astro @@ -0,0 +1,42 @@ +--- +import Breadcrumb from "@/components/chrome/Breadcrumb.astro"; +import SearchInput from "@/components/chrome/SearchInput.astro"; +import VersionSelector from "@/components/chrome/VersionSelector.astro"; +import Stars from "@/icons/stars.svg"; + +type Props = { + page: { + version?: string; + url: string; + title?: string; + category?: string; + has_magic_breadcrumbs?: boolean; + show_category_breadcrumb?: boolean; + }; + showBreadcrumb?: boolean; +}; + +const { page, showBreadcrumb } = Astro.props; +--- + +
+
+ { + showBreadcrumb && ( +
+ +
+ ) + } +
+ +
+ + + + What’s new + + + +
+
diff --git a/src/components/chrome/VersionSelector.astro b/src/components/chrome/VersionSelector.astro new file mode 100644 index 0000000000..a894521c49 --- /dev/null +++ b/src/components/chrome/VersionSelector.astro @@ -0,0 +1,47 @@ +--- +import Chevron from "@/icons/chevron.svg"; +import { baseCtx } from "@/lib/liquid/liquidRenderer"; + +type Props = { + version?: string; +}; + +const { version } = Astro.props; +const { site } = baseCtx; + +const currentVersion = version === "latest" ? site.docs_version : version; +const versions = [...site.available_versions].reverse().slice(0, 10); +--- + +
+ + {currentVersion} + + + +
diff --git a/src/icons/stars.svg b/src/icons/stars.svg new file mode 100644 index 0000000000..84f3d9805e --- /dev/null +++ b/src/icons/stars.svg @@ -0,0 +1,15 @@ + + + diff --git a/src/layouts/NewDocsLayout.astro b/src/layouts/NewDocsLayout.astro index 4db6cedfb2..19564f0e6c 100644 --- a/src/layouts/NewDocsLayout.astro +++ b/src/layouts/NewDocsLayout.astro @@ -1,5 +1,7 @@ --- import LeftSidebar from "@/components/chrome/LeftSidebar.astro"; +import TopBar from "@/components/chrome/TopBar.astro"; +import VersionSelector from "@/components/chrome/VersionSelector.astro"; import LiquidInclude from "@/components/LiquidInclude.astro"; import { UNIFY_ENABLED_PAGES } from "@/constants"; import { getLiquidRenderer } from "@/lib/liquid/liquidRenderer"; @@ -36,15 +38,10 @@ const unify = UNIFY_ENABLED_PAGES.includes(page.url); />
- +
- {!showBreadcrumb && } + {!showBreadcrumb && } From 1101cb7ee04855d0bf79f9d1598d5f174b0a2d96 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 9 Sep 2026 17:48:15 -0400 Subject: [PATCH 2/9] GRO-951 creates "endpoint" so version selector can render client-side with up-to-date data --- src/pages/docs/versions.json.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/pages/docs/versions.json.ts diff --git a/src/pages/docs/versions.json.ts b/src/pages/docs/versions.json.ts new file mode 100644 index 0000000000..3ae01f4876 --- /dev/null +++ b/src/pages/docs/versions.json.ts @@ -0,0 +1,16 @@ +import { baseCtx } from "@/lib/liquid/liquidRenderer"; +import type { APIRoute } from "astro"; + +const { docs_version, available_versions } = baseCtx.site; +const { version_support } = baseCtx.site.data; + +export const GET: APIRoute = async () => { + const data = { + docs_version, + available_versions, + version_support, + }; + return new Response(JSON.stringify(data), { + headers: { "Content-Type": "application/json" }, + }); +}; From 9deff1c93b2b0dc4128e0f7fdef14a8c9ce8379d Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Thu, 10 Sep 2026 17:22:50 -0400 Subject: [PATCH 3/9] GRO-951 VersionSelector updates its list client-side on load so it won't get stale when we stop rebuilding old versions every deployment --- src/components/chrome/VersionSelector.astro | 75 ++++++++++++------- .../chrome/utils/versionDropdown.ts | 28 +++++++ src/layouts/NewDocsLayout.astro | 2 +- src/pages/docs/versions.json.ts | 9 ++- 4 files changed, 83 insertions(+), 31 deletions(-) create mode 100644 src/components/chrome/utils/versionDropdown.ts diff --git a/src/components/chrome/VersionSelector.astro b/src/components/chrome/VersionSelector.astro index a894521c49..5807252fa2 100644 --- a/src/components/chrome/VersionSelector.astro +++ b/src/components/chrome/VersionSelector.astro @@ -1,4 +1,5 @@ --- +import { renderVersionListItems } from "@/components/chrome/utils/versionDropdown"; import Chevron from "@/icons/chevron.svg"; import { baseCtx } from "@/lib/liquid/liquidRenderer"; @@ -9,39 +10,55 @@ type Props = { const { version } = Astro.props; const { site } = baseCtx; -const currentVersion = version === "latest" ? site.docs_version : version; -const versions = [...site.available_versions].reverse().slice(0, 10); +const latest = version === site.docs_version; + +const dropdownItemsHtml = renderVersionListItems( + site.available_versions, + version, + site.data.version_support, +); ---
- {currentVersion} + {version} - +
+ + diff --git a/src/components/chrome/utils/versionDropdown.ts b/src/components/chrome/utils/versionDropdown.ts new file mode 100644 index 0000000000..51df966792 --- /dev/null +++ b/src/components/chrome/utils/versionDropdown.ts @@ -0,0 +1,28 @@ +import type { VersionSupport } from "@/lib/docs/versionSupport"; + +// Renders the
  • items for the version dropdown as an HTML string, so the +// same markup can be produced server-side (initial render) and client-side +// (re-rendered after fetching /docs/versions.json). +export const renderVersionListItems = ( + availableVersions: string[], + excludeVersion: string | null | undefined, + versionSupport: Record, +): string => { + const items = [...availableVersions] + .reverse() + .slice(0, 10) + .filter((v) => v !== excludeVersion) + .map((v) => { + const support = versionSupport[v]; + const tag = + support?.status === "unsupported" + ? `unsupported` + : support?.lts + ? `lts` + : ""; + return `
  • ${v}${tag}
  • `; + }) + .join(""); + + return `${items}
  • See more
  • `; +}; diff --git a/src/layouts/NewDocsLayout.astro b/src/layouts/NewDocsLayout.astro index 19564f0e6c..dcd650bb9e 100644 --- a/src/layouts/NewDocsLayout.astro +++ b/src/layouts/NewDocsLayout.astro @@ -13,7 +13,7 @@ type Props = { url: string; category?: string; version?: string; - latest?: string; + latest?: boolean; }; dirname: string; }; diff --git a/src/pages/docs/versions.json.ts b/src/pages/docs/versions.json.ts index 3ae01f4876..488fd76e91 100644 --- a/src/pages/docs/versions.json.ts +++ b/src/pages/docs/versions.json.ts @@ -1,11 +1,18 @@ +import type { VersionSupport } from "@/lib/docs/versionSupport"; import { baseCtx } from "@/lib/liquid/liquidRenderer"; import type { APIRoute } from "astro"; const { docs_version, available_versions } = baseCtx.site; const { version_support } = baseCtx.site.data; +export interface VersionsInfo { + docs_version: string; + available_versions: string[]; + version_support: Record; +} + export const GET: APIRoute = async () => { - const data = { + const data: VersionsInfo = { docs_version, available_versions, version_support, From 2f1722749469555716959aa80b7b5e204bedfcc6 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 11:02:17 -0400 Subject: [PATCH 4/9] GRO-951 adds client-side-updating version notice and consolidates some of its logic with VersionSelector --- _includes/docs/blockquotes.html | 22 ----- src/components/chrome/Breadcrumb.astro | 98 +++++++++---------- src/components/chrome/TopBar.astro | 12 +-- src/components/chrome/VersionNotice.astro | 46 +++++++++ src/components/chrome/VersionSelector.astro | 52 ++++------ .../chrome/utils/versionDropdown.ts | 28 ------ src/components/chrome/utils/versionUtils.ts | 66 +++++++++++++ src/layouts/NewDocsLayout.astro | 3 +- src/layouts/OldDocsLayout.astro | 12 +-- 9 files changed, 190 insertions(+), 149 deletions(-) delete mode 100644 _includes/docs/blockquotes.html create mode 100644 src/components/chrome/VersionNotice.astro delete mode 100644 src/components/chrome/utils/versionDropdown.ts create mode 100644 src/components/chrome/utils/versionUtils.ts diff --git a/_includes/docs/blockquotes.html b/_includes/docs/blockquotes.html deleted file mode 100644 index 01c176d9bd..0000000000 --- a/_includes/docs/blockquotes.html +++ /dev/null @@ -1,22 +0,0 @@ -
    - {% if page.version and page.version != site.docs_version and page.version != "latest" %} - {% if page.version == "master" %} -
    - These are the docs for the Metabase master branch. Some features documented here may not yet be available in the current release. - Check out the docs for the current stable version, Metabase {{site.docs_version}}. -
    - {% else %} - {% assign support = site.data.version_support[page.version] %} - {% if support.status == "unsupported" %} -
    - Version {{ page.version }} of Metabase is no longer supported. Check out the docs for the current stable version, Metabase {{site.docs_version}}. -
    - {% else %} -
    - These are the docs for Metabase {{ page.version }}. - Check out the docs for the current stable version, Metabase {{site.docs_version}}. -
    - {% endif %} - {% endif %} - {% endif %} -
    diff --git a/src/components/chrome/Breadcrumb.astro b/src/components/chrome/Breadcrumb.astro index e93e569115..5070dedbdb 100644 --- a/src/components/chrome/Breadcrumb.astro +++ b/src/components/chrome/Breadcrumb.astro @@ -38,59 +38,57 @@ const breadcrumbDividerStyle = `--bs-breadcrumb-divider: url('/images/chevron_bl ---
    - { - page.has_magic_breadcrumbs ? ( - + )}
    diff --git a/src/components/chrome/TopBar.astro b/src/components/chrome/TopBar.astro index 88bcd483b8..89fdaaf1f8 100644 --- a/src/components/chrome/TopBar.astro +++ b/src/components/chrome/TopBar.astro @@ -21,13 +21,11 @@ const { page, showBreadcrumb } = Astro.props;
    - { - showBreadcrumb && ( -
    - -
    - ) - } + {showBreadcrumb && ( +
    + +
    + )}
    diff --git a/src/components/chrome/VersionNotice.astro b/src/components/chrome/VersionNotice.astro new file mode 100644 index 0000000000..196058f0e8 --- /dev/null +++ b/src/components/chrome/VersionNotice.astro @@ -0,0 +1,46 @@ +--- +import { baseCtx } from "@/lib/liquid/liquidRenderer"; +import { renderVersionNotice } from "./utils/versionUtils"; + +type Props = { + version?: string; +}; + +const { version } = Astro.props; +const { site } = baseCtx; +const latest = version === site.docs_version; +--- + +
    + +{/* +`latest` is excluded since updating it client-side would just be a no-op (we only warn users when +they're NOT on the latest version). This targets older pages (e.g. v0.44) that rarely get rebuilt +but should still show accurate version info. +*/} +{!latest && } diff --git a/src/components/chrome/VersionSelector.astro b/src/components/chrome/VersionSelector.astro index 5807252fa2..173283c8cd 100644 --- a/src/components/chrome/VersionSelector.astro +++ b/src/components/chrome/VersionSelector.astro @@ -1,7 +1,7 @@ --- -import { renderVersionListItems } from "@/components/chrome/utils/versionDropdown"; import Chevron from "@/icons/chevron.svg"; import { baseCtx } from "@/lib/liquid/liquidRenderer"; +import { renderVersionListItems } from "./utils/versionUtils"; type Props = { version?: string; @@ -9,14 +9,7 @@ type Props = { const { version } = Astro.props; const { site } = baseCtx; - const latest = version === site.docs_version; - -const dropdownItemsHtml = renderVersionListItems( - site.available_versions, - version, - site.data.version_support, -); ---
    @@ -28,37 +21,34 @@ const dropdownItemsHtml = renderVersionListItems( class="version__dropdown" data-component="versions-list" data-version={version ?? ""} - {...latest && { "data-latest": true }} - set:html={dropdownItemsHtml} + set:html={renderVersionListItems( + version, + site.data.version_support, + site.available_versions, + )} />
    - +} diff --git a/src/components/chrome/utils/versionDropdown.ts b/src/components/chrome/utils/versionDropdown.ts deleted file mode 100644 index 51df966792..0000000000 --- a/src/components/chrome/utils/versionDropdown.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { VersionSupport } from "@/lib/docs/versionSupport"; - -// Renders the
  • items for the version dropdown as an HTML string, so the -// same markup can be produced server-side (initial render) and client-side -// (re-rendered after fetching /docs/versions.json). -export const renderVersionListItems = ( - availableVersions: string[], - excludeVersion: string | null | undefined, - versionSupport: Record, -): string => { - const items = [...availableVersions] - .reverse() - .slice(0, 10) - .filter((v) => v !== excludeVersion) - .map((v) => { - const support = versionSupport[v]; - const tag = - support?.status === "unsupported" - ? `unsupported` - : support?.lts - ? `lts` - : ""; - return `
  • ${v}${tag}
  • `; - }) - .join(""); - - return `${items}
  • See more
  • `; -}; diff --git a/src/components/chrome/utils/versionUtils.ts b/src/components/chrome/utils/versionUtils.ts new file mode 100644 index 0000000000..d034982f96 --- /dev/null +++ b/src/components/chrome/utils/versionUtils.ts @@ -0,0 +1,66 @@ +import type { VersionSupport } from "@/lib/docs/versionSupport"; +import type { VersionsInfo } from "@/pages/docs/versions.json"; + +let versionsPromise: Promise; + +export const fetchVersions = () => { + versionsPromise ??= fetch("/docs/versions.json").then((res) => res.json()); + return versionsPromise; +}; + +export const renderVersionNotice = ( + pageVersion: string | null | undefined, + versionSupport: Record, + docsVersion: string, +): string => { + const latest = pageVersion === docsVersion; + if (!pageVersion || latest) { + return ""; + } + const support = versionSupport[pageVersion]; + if (support?.status == "unsupported") { + return `
    + Version ${pageVersion} of Metabase is + + + no longer supported + + . + Check out the + + docs for the current stable version, Metabase ${docsVersion}. + +
    `; + } else { + return `
    + These are the docs for Metabase ${pageVersion}. Check out the + + docs for the current stable version, Metabase ${docsVersion}. + +
    `; + } +}; + +export const renderVersionListItems = ( + pageVersion: string | null | undefined, + versionSupport: Record, + availableVersions: string[], +): string => { + const items = [...availableVersions] + .reverse() + .slice(0, 10) + .filter((v) => v !== pageVersion) + .map((v) => { + const support = versionSupport[v]; + const tag = + support?.status === "unsupported" + ? `unsupported` + : support?.lts + ? `lts` + : ""; + return `
  • ${v}${tag}
  • `; + }) + .join(""); + + return `${items}
  • See more
  • `; +}; diff --git a/src/layouts/NewDocsLayout.astro b/src/layouts/NewDocsLayout.astro index dcd650bb9e..a509b4742f 100644 --- a/src/layouts/NewDocsLayout.astro +++ b/src/layouts/NewDocsLayout.astro @@ -1,6 +1,7 @@ --- import LeftSidebar from "@/components/chrome/LeftSidebar.astro"; import TopBar from "@/components/chrome/TopBar.astro"; +import VersionNotice from "@/components/chrome/VersionNotice.astro"; import VersionSelector from "@/components/chrome/VersionSelector.astro"; import LiquidInclude from "@/components/LiquidInclude.astro"; import { UNIFY_ENABLED_PAGES } from "@/constants"; @@ -43,7 +44,7 @@ const unify = UNIFY_ENABLED_PAGES.includes(page.url);
    {!showBreadcrumb && } - + diff --git a/src/layouts/OldDocsLayout.astro b/src/layouts/OldDocsLayout.astro index e7db0ea7e4..b6164e80b3 100644 --- a/src/layouts/OldDocsLayout.astro +++ b/src/layouts/OldDocsLayout.astro @@ -1,4 +1,5 @@ --- +import VersionNotice from "@/components/chrome/VersionNotice.astro"; import LiquidInclude from "@/components/LiquidInclude.astro"; import { getVersionSupport } from "@/lib/docs/versionSupport"; import { getLiquidRenderer } from "@/lib/liquid/liquidRenderer"; @@ -58,16 +59,7 @@ const showChrome = page.category !== "ignore"; )} - {support?.status === "unsupported" && ( -
    - Version {page.version} of Metabase is no longer{" "} - supported. Check out the{" "} - - docs for the current stable version, Metabase{" "} - {currentDocsVersion}. - -
    - )} +
    From 2713247318cd6bb37bf22d18e958fd5af7aeeb62 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 13:56:38 -0400 Subject: [PATCH 5/9] GRO-951-1 removes redundant version notice on old layout --- src/layouts/DefaultLayout.astro | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/layouts/DefaultLayout.astro b/src/layouts/DefaultLayout.astro index 8fa7958fde..406788893f 100644 --- a/src/layouts/DefaultLayout.astro +++ b/src/layouts/DefaultLayout.astro @@ -26,17 +26,6 @@ const currentDocsVersion = await lq.render("{{ site.docs_version }}");
    - {page.version && page.version !== currentDocsVersion && ( -
    -
    - You are viewing the documentation for Metabase {page.version}. The{" "} - - most recent docs version is {currentDocsVersion}. - -
    -
    - )} -
    From 24ca14624f07748c062389f8f3850fb84f16e5c0 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 14:07:17 -0400 Subject: [PATCH 6/9] GRO-951-1 cleanup --- src/layouts/DefaultLayout.astro | 2 -- src/layouts/OldDocsLayout.astro | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/layouts/DefaultLayout.astro b/src/layouts/DefaultLayout.astro index 406788893f..f1f91d189a 100644 --- a/src/layouts/DefaultLayout.astro +++ b/src/layouts/DefaultLayout.astro @@ -14,8 +14,6 @@ type Props = { const { page, dirname } = Astro.props; const lq = getLiquidRenderer({ page, dirname }); - -const currentDocsVersion = await lq.render("{{ site.docs_version }}"); --- diff --git a/src/layouts/OldDocsLayout.astro b/src/layouts/OldDocsLayout.astro index b6164e80b3..ba6a98eb00 100644 --- a/src/layouts/OldDocsLayout.astro +++ b/src/layouts/OldDocsLayout.astro @@ -1,7 +1,6 @@ --- import VersionNotice from "@/components/chrome/VersionNotice.astro"; import LiquidInclude from "@/components/LiquidInclude.astro"; -import { getVersionSupport } from "@/lib/docs/versionSupport"; import { getLiquidRenderer } from "@/lib/liquid/liquidRenderer"; import DefaultLayout from "./DefaultLayout.astro"; @@ -26,8 +25,6 @@ const latestOrExplicitVersion = ? "latest" : page.version; -const support = getVersionSupport(page.version); - const showChrome = page.category !== "ignore"; --- From 3fd62232c5642dd6507e35624df4b163ecf3abb2 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 15:03:53 -0400 Subject: [PATCH 7/9] GRO-951-1 fix edge case issue: only omit client-side version info updates for /docs/latest (e.g. include for /docs/v0.63 when v0.63 is the latest version just in case a version goes straight from the most recent to unsupported (unlikely but technically possible)) --- src/components/chrome/TopBar.astro | 3 ++- src/components/chrome/VersionNotice.astro | 4 ++-- src/components/chrome/VersionSelector.astro | 4 ++-- src/layouts/NewDocsLayout.astro | 6 ++++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/chrome/TopBar.astro b/src/components/chrome/TopBar.astro index 89fdaaf1f8..8ef061e4ed 100644 --- a/src/components/chrome/TopBar.astro +++ b/src/components/chrome/TopBar.astro @@ -7,6 +7,7 @@ import Stars from "@/icons/stars.svg"; type Props = { page: { version?: string; + latest?: boolean; url: string; title?: string; category?: string; @@ -29,7 +30,7 @@ const { page, showBreadcrumb } = Astro.props;
    - + What’s new diff --git a/src/components/chrome/VersionNotice.astro b/src/components/chrome/VersionNotice.astro index 196058f0e8..85425d8308 100644 --- a/src/components/chrome/VersionNotice.astro +++ b/src/components/chrome/VersionNotice.astro @@ -4,11 +4,11 @@ import { renderVersionNotice } from "./utils/versionUtils"; type Props = { version?: string; + latest?: boolean; }; -const { version } = Astro.props; +const { version, latest } = Astro.props; const { site } = baseCtx; -const latest = version === site.docs_version; ---
    diff --git a/src/layouts/NewDocsLayout.astro b/src/layouts/NewDocsLayout.astro index a509b4742f..3578162431 100644 --- a/src/layouts/NewDocsLayout.astro +++ b/src/layouts/NewDocsLayout.astro @@ -42,9 +42,11 @@ const unify = UNIFY_ENABLED_PAGES.includes(page.url);
    - {!showBreadcrumb && } + {!showBreadcrumb && ( + + )} - + From 35baae5fcd2bc78b222d8cd77ba818b15af6c264 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 15:04:39 -0400 Subject: [PATCH 8/9] GRO-951-1 update tsconfig exclude --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 85eaf84be9..a01dc7921c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "astro/tsconfigs/strict", "include": [".astro/types.d.ts", "**/*"], - "exclude": ["dist", "_docs", "_site", "gdpr-cookie-notice", "lib", "js", "script"], + "exclude": ["dist", "_docs", "_site", "public/docs/gdpr-cookie-notice", "lib", "public/docs/js", "script"], "compilerOptions": { "paths": { "@/*": ["./src/*"] From 3f16ae1b983f81341043b57551d57b58904dc3dd Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 11 Sep 2026 15:45:55 -0400 Subject: [PATCH 9/9] GRO-951-1 fix inconsistencies between this branch and prod --- src/components/chrome/utils/versionUtils.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/chrome/utils/versionUtils.ts b/src/components/chrome/utils/versionUtils.ts index d034982f96..7aafa33fd4 100644 --- a/src/components/chrome/utils/versionUtils.ts +++ b/src/components/chrome/utils/versionUtils.ts @@ -21,20 +21,16 @@ export const renderVersionNotice = ( if (support?.status == "unsupported") { return `
    Version ${pageVersion} of Metabase is - - - no longer supported - - . + no longer supported. Check out the - + docs for the current stable version, Metabase ${docsVersion}.
    `; } else { return `
    These are the docs for Metabase ${pageVersion}. Check out the - + docs for the current stable version, Metabase ${docsVersion}.
    `;