From 37d9a3db9ca99f4e125bff1bcd52f04f3f74e600 Mon Sep 17 00:00:00 2001 From: americano98 Date: Sun, 14 Jun 2026 17:26:22 +0300 Subject: [PATCH 1/2] chore: revert product pages --- src/components/theme/mobile-nav.tsx | 65 ++++++++++++++----- src/components/theme/nav.tsx | 5 +- src/lib/header-navigation.ts | 3 +- src/pages/index.tsx | 2 +- .../{_agent-bricks.tsx => agent-bricks.tsx} | 0 ..._data-lakehouse.tsx => data-lakehouse.tsx} | 0 ...atabricks-apps.tsx => databricks-apps.tsx} | 0 tests/e2e/navigation.spec.ts | 10 ++- tests/e2e/pages.spec.ts | 7 +- 9 files changed, 59 insertions(+), 33 deletions(-) rename src/pages/product/{_agent-bricks.tsx => agent-bricks.tsx} (100%) rename src/pages/product/{_data-lakehouse.tsx => data-lakehouse.tsx} (100%) rename src/pages/product/{_databricks-apps.tsx => databricks-apps.tsx} (100%) diff --git a/src/components/theme/mobile-nav.tsx b/src/components/theme/mobile-nav.tsx index 79658429..859559c2 100644 --- a/src/components/theme/mobile-nav.tsx +++ b/src/components/theme/mobile-nav.tsx @@ -5,7 +5,9 @@ import { useLocation } from "@docusaurus/router"; import { DocsSidebarSearch } from "@/components/docs/sidebar-search"; import { + getActiveProductHref, isHeaderNavItemActive, + PRODUCT_LINKS, type HeaderNavItem, } from "@/lib/header-navigation"; import { cn } from "@/lib/utils"; @@ -126,7 +128,10 @@ function MobileTreeText({ export function MobileNav({ items, open, onOpenChange }: MobileNavProps) { const menuId = useId(); const { pathname } = useLocation(); + const activeProductHref = getActiveProductHref(pathname); const isHomeActive = pathname === "/"; + const productItem = items.find(({ label }) => label === "Product"); + const sectionItems = items.filter(({ label }) => label !== "Product"); useEffect(() => { onOpenChange(false); @@ -218,7 +223,7 @@ export function MobileNav({ items, open, onOpenChange }: MobileNavProps) { }; }, [onOpenChange, open]); - if (items.length === 0) { + if (!productItem || items.length === 0) { return null; } @@ -245,17 +250,15 @@ export function MobileNav({ items, open, onOpenChange }: MobileNavProps) { className="relative w-full h-full flex justify-between font-mono text-[20px] leading-none font-normal tracking-[-0.4px]" aria-label="Main navigation" > - {/* - Product nav section temporarily removed while product pages are - unpublished. This menu was reflowed (tree-line positions retuned) - for the shorter HOME + Solutions/Templates/Docs list. To restore - Product, revert this file to its pre-PR-114 version and uncomment - the Product entry in header-navigation.ts. - */} - - - - + + + + + + + + + - {items.map((item, index) => { + + {productItem.label.toLowerCase()} + + + {PRODUCT_LINKS.map((product, index) => { + const isActive = product.href === activeProductHref; + + return ( + + {product.label.toLowerCase()} + + ); + })} + + {sectionItems.map((item, index) => { const isActive = isHeaderNavItemActive(item, pathname); return ( @@ -278,9 +311,9 @@ export function MobileNav({ items, open, onOpenChange }: MobileNavProps) { aria-current={isActive ? "page" : undefined} className={cn( "left-[61px] right-5 md:left-[63px] md:right-[22px]", - index === 0 && "top-[58px]", - index === 1 && "top-[92px]", - index === 2 && "top-[126px]", + index === 0 && "top-[180px]", + index === 1 && "top-[214px]", + index === 2 && "top-[248px]", )} data-mobile-menu-section-link="true" key={item.href} diff --git a/src/components/theme/nav.tsx b/src/components/theme/nav.tsx index 96bff856..98ffe239 100644 --- a/src/components/theme/nav.tsx +++ b/src/components/theme/nav.tsx @@ -268,10 +268,7 @@ function Nav({ className, items }: HeaderNavProps) { {items.map((item) => { const { href, label } = item; - // The "Product" entry is temporarily commented out of HEADER_LINKS, - // so this branch never renders. Kept (with a widened comparison) so - // re-enabling Product is a one-line revert in header-navigation.ts. - if ((label as string) === "Product") { + if (label === "Product") { const isActive = Boolean(activeProductHref); return ( diff --git a/src/lib/header-navigation.ts b/src/lib/header-navigation.ts index 62dd1f98..49b85873 100644 --- a/src/lib/header-navigation.ts +++ b/src/lib/header-navigation.ts @@ -1,6 +1,5 @@ export const HEADER_LINKS = [ - // Temporarily hidden while product pages are unpublished. - // { label: "Product", href: "/product/data-lakehouse" }, + { label: "Product", href: "/product/data-lakehouse" }, { label: "Solutions", href: "/solutions" }, { label: "Templates", href: "/templates" }, { label: "Docs", href: "/docs/start-here", activePath: "/docs" }, diff --git a/src/pages/index.tsx b/src/pages/index.tsx index ec40363c..27440a74 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -56,7 +56,7 @@ export default function Home(): ReactNode {
- {/* */} +
{ }); } - // Skipped while the Product nav dropdown is hidden. - test.skip("product dropdown hover state is visible in production CSS", async ({ + test("product dropdown hover state is visible in production CSS", async ({ page, }) => { await page.setViewportSize({ width: 1440, height: 900 }); @@ -538,8 +537,7 @@ test.describe("home page link navigation", () => { expect(finalCopiedText).toContain("llms.txt"); }); - // Skipped while the home Features pillar cards and product pages are hidden. - test.skip("pillar card Lakebase navigates to /product/data-lakehouse", async ({ + test("pillar card Lakebase navigates to /product/data-lakehouse", async ({ page, }) => { await page.goto("/"); @@ -550,7 +548,7 @@ test.describe("home page link navigation", () => { expect(new URL(page.url()).pathname).toBe("/product/data-lakehouse"); }); - test.skip("pillar card Agent Bricks navigates to /product/agent-bricks", async ({ + test("pillar card Agent Bricks navigates to /product/agent-bricks", async ({ page, }) => { await page.goto("/"); @@ -559,7 +557,7 @@ test.describe("home page link navigation", () => { expect(new URL(page.url()).pathname).toBe("/product/agent-bricks"); }); - test.skip("pillar card Databricks Apps navigates to /product/databricks-apps", async ({ + test("pillar card Databricks Apps navigates to /product/databricks-apps", async ({ page, }) => { await page.goto("/"); diff --git a/tests/e2e/pages.spec.ts b/tests/e2e/pages.spec.ts index f83a4fb3..d58da7ac 100644 --- a/tests/e2e/pages.spec.ts +++ b/tests/e2e/pages.spec.ts @@ -2,10 +2,9 @@ import { test, expect } from "@playwright/test"; const PAGES = [ { path: "/", title: "Databricks Developer" }, - // Product pages temporarily unpublished (hidden via `_` prefix). - // { path: "/product/data-lakehouse", title: "Lakebase" }, - // { path: "/product/agent-bricks", title: "Agent Bricks" }, - // { path: "/product/databricks-apps", title: "Databricks Apps" }, + { path: "/product/data-lakehouse", title: "Lakebase" }, + { path: "/product/agent-bricks", title: "Agent Bricks" }, + { path: "/product/databricks-apps", title: "Databricks Apps" }, { path: "/solutions", title: "Solutions" }, { path: "/solutions/devhub-launch", From 01795b032ae7700a349b43600123b52d8173c37e Mon Sep 17 00:00:00 2001 From: americano98 Date: Sun, 14 Jun 2026 21:27:19 +0300 Subject: [PATCH 2/2] chore: update lakebase path --- src/components/home/features/index.tsx | 2 +- src/lib/header-navigation.ts | 4 +- src/lib/products/lakebase.ts | 2 +- src/pages/product/data-lakehouse.tsx | 58 +++++--------------------- src/pages/product/lakebase.tsx | 57 +++++++++++++++++++++++++ tests/e2e/navigation.spec.ts | 12 +++--- tests/e2e/pages.spec.ts | 13 +++++- 7 files changed, 89 insertions(+), 59 deletions(-) create mode 100644 src/pages/product/lakebase.tsx diff --git a/src/components/home/features/index.tsx b/src/components/home/features/index.tsx index ae75c357..b3afaf34 100644 --- a/src/components/home/features/index.tsx +++ b/src/components/home/features/index.tsx @@ -20,7 +20,7 @@ const FEATURES = [ title: "Managed Postgres, colocated with your Lakehouse.", description: "Provision with the CLI, connect like any Postgres. Instant branching, scales to zero, and change data feed to Unity Catalog.", - href: "/product/data-lakehouse", + href: "/product/lakebase", visual: "lakebase", }, { diff --git a/src/lib/header-navigation.ts b/src/lib/header-navigation.ts index 49b85873..1bbf0856 100644 --- a/src/lib/header-navigation.ts +++ b/src/lib/header-navigation.ts @@ -1,5 +1,5 @@ export const HEADER_LINKS = [ - { label: "Product", href: "/product/data-lakehouse" }, + { label: "Product", href: "/product/lakebase" }, { label: "Solutions", href: "/solutions" }, { label: "Templates", href: "/templates" }, { label: "Docs", href: "/docs/start-here", activePath: "/docs" }, @@ -8,7 +8,7 @@ export const HEADER_LINKS = [ export type HeaderNavItem = (typeof HEADER_LINKS)[number]; export const PRODUCT_LINKS = [ - { label: "Lakebase", href: "/product/data-lakehouse" }, + { label: "Lakebase", href: "/product/lakebase" }, { label: "Agent Bricks", href: "/product/agent-bricks" }, { label: "Databricks Apps", href: "/product/databricks-apps" }, ] as const; diff --git a/src/lib/products/lakebase.ts b/src/lib/products/lakebase.ts index 58062c76..7f9017b4 100644 --- a/src/lib/products/lakebase.ts +++ b/src/lib/products/lakebase.ts @@ -5,7 +5,7 @@ export const lakebaseProduct: ProductPageContent = { title: "Lakebase", description: "Managed Postgres with branching, autoscaling, and Lakehouse sync for modern operational workloads.", - canonicalPath: "/product/data-lakehouse", + canonicalPath: "/product/lakebase", hero: { eyebrow: "Lakebase", title: "Managed Postgres, built for modern operational workloads.", diff --git a/src/pages/product/data-lakehouse.tsx b/src/pages/product/data-lakehouse.tsx index b1fb2616..4f1eb76f 100644 --- a/src/pages/product/data-lakehouse.tsx +++ b/src/pages/product/data-lakehouse.tsx @@ -1,57 +1,19 @@ import Head from "@docusaurus/Head"; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -import Layout from "@theme/Layout"; +import { Redirect } from "@docusaurus/router"; +import useBaseUrl from "@docusaurus/useBaseUrl"; import type { ReactNode } from "react"; -import CTA from "@/components/home/cta"; -import { Features } from "@/components/products/features"; -import { Hero } from "@/components/products/hero"; -import { TestimonialsSlider } from "@/components/products/testimonials-slider"; -import { UseCases } from "@/components/products/use-cases"; -import NewFooter from "@/components/theme/footer"; -import { lakebaseProduct } from "@/lib/products/lakebase"; -import { siteUrlFromConfig } from "@/lib/site-url"; - -export default function LakebaseProductPage(): ReactNode { - const { siteConfig } = useDocusaurusContext(); - const siteUrl = siteUrlFromConfig(siteConfig.url, siteConfig.baseUrl); - const pageUrl = `${siteUrl}${lakebaseProduct.canonicalPath}`; +export default function LakebaseLegacyProductPage(): ReactNode { + const target = useBaseUrl("/product/lakebase"); return ( - + <> - - + + + -
- -
-
+ + ); } diff --git a/src/pages/product/lakebase.tsx b/src/pages/product/lakebase.tsx new file mode 100644 index 00000000..b1fb2616 --- /dev/null +++ b/src/pages/product/lakebase.tsx @@ -0,0 +1,57 @@ +import Head from "@docusaurus/Head"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import type { ReactNode } from "react"; + +import CTA from "@/components/home/cta"; +import { Features } from "@/components/products/features"; +import { Hero } from "@/components/products/hero"; +import { TestimonialsSlider } from "@/components/products/testimonials-slider"; +import { UseCases } from "@/components/products/use-cases"; +import NewFooter from "@/components/theme/footer"; +import { lakebaseProduct } from "@/lib/products/lakebase"; +import { siteUrlFromConfig } from "@/lib/site-url"; + +export default function LakebaseProductPage(): ReactNode { + const { siteConfig } = useDocusaurusContext(); + const siteUrl = siteUrlFromConfig(siteConfig.url, siteConfig.baseUrl); + const pageUrl = `${siteUrl}${lakebaseProduct.canonicalPath}`; + + return ( + + + + + +
+ +
+
+ ); +} diff --git a/tests/e2e/navigation.spec.ts b/tests/e2e/navigation.spec.ts index fb05e4d3..f31bbf4b 100644 --- a/tests/e2e/navigation.spec.ts +++ b/tests/e2e/navigation.spec.ts @@ -69,7 +69,7 @@ test.describe("navbar navigation", () => { page, }) => { await page.setViewportSize({ width: 1440, height: 900 }); - await page.goto("/product/data-lakehouse"); + await page.goto("/product/lakebase"); await page.getByRole("button", { name: "[Product]" }).hover(); const productMenu = page.locator('[data-slot="navigation-menu-content"]'); @@ -183,7 +183,7 @@ test.describe.skip("mobile navigation", () => { width: viewport.width, height: viewport.height, }); - await page.goto("/product/data-lakehouse"); + await page.goto("/product/lakebase"); await page.getByRole("button", { name: "Open menu" }).click(); @@ -537,15 +537,15 @@ test.describe("home page link navigation", () => { expect(finalCopiedText).toContain("llms.txt"); }); - test("pillar card Lakebase navigates to /product/data-lakehouse", async ({ + test("pillar card Lakebase navigates to /product/lakebase", async ({ page, }) => { await page.goto("/"); - const link = page.locator('a[href="/product/data-lakehouse"]').first(); + const link = page.locator('a[href="/product/lakebase"]').first(); await link.waitFor({ state: "visible" }); await link.click(); - await page.waitForURL("**/product/data-lakehouse"); - expect(new URL(page.url()).pathname).toBe("/product/data-lakehouse"); + await page.waitForURL("**/product/lakebase"); + expect(new URL(page.url()).pathname).toBe("/product/lakebase"); }); test("pillar card Agent Bricks navigates to /product/agent-bricks", async ({ diff --git a/tests/e2e/pages.spec.ts b/tests/e2e/pages.spec.ts index d58da7ac..a1fb7642 100644 --- a/tests/e2e/pages.spec.ts +++ b/tests/e2e/pages.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from "@playwright/test"; const PAGES = [ { path: "/", title: "Databricks Developer" }, - { path: "/product/data-lakehouse", title: "Lakebase" }, + { path: "/product/lakebase", title: "Lakebase" }, { path: "/product/agent-bricks", title: "Agent Bricks" }, { path: "/product/databricks-apps", title: "Databricks Apps" }, { path: "/solutions", title: "Solutions" }, @@ -120,6 +120,17 @@ test.describe("static assets load correctly", () => { }); }); +test.describe("legacy redirects", () => { + test("/product/data-lakehouse redirects to /product/lakebase", async ({ + page, + }) => { + await page.goto("/product/data-lakehouse"); + await page.waitForURL("**/product/lakebase"); + expect(new URL(page.url()).pathname).toBe("/product/lakebase"); + await expect(page).toHaveTitle(/Lakebase/); + }); +}); + test.describe("solutions RSS", () => { test("RSS action links to the generated feed", async ({ page }) => { await page.goto("/solutions");