From 7e15556f6bbf8e5690009f55ac50a8bbebdd8ba2 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 3 Apr 2026 10:41:08 -0400 Subject: [PATCH 1/2] v0.10.20 --- packages/docusaurus-theme/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-theme/package.json b/packages/docusaurus-theme/package.json index d96c0df9..88b83fc0 100644 --- a/packages/docusaurus-theme/package.json +++ b/packages/docusaurus-theme/package.json @@ -1,6 +1,6 @@ { "name": "@netfoundry/docusaurus-theme", - "version": "0.10.19", + "version": "0.10.20", "description": "NetFoundry Docusaurus theme with shared layout, footer, and styling", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", From cff7d3fc9807bd538adc80dd1b8861d9e95f2d89 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 3 Apr 2026 10:45:28 -0400 Subject: [PATCH 2/2] fix zrok version dropdown --- .../docusaurus-theme/css/product-picker.css | 28 +++++- .../DropdownNavbarItem/Desktop/index.tsx | 7 +- unified-doc/build-docs.ps1 | 23 +++-- unified-doc/build-docs.sh | 85 ++++++------------- unified-doc/package.json | 2 +- unified-doc/yarn.lock | 8 +- 6 files changed, 74 insertions(+), 79 deletions(-) diff --git a/packages/docusaurus-theme/css/product-picker.css b/packages/docusaurus-theme/css/product-picker.css index 03aaeebd..b884b6ac 100644 --- a/packages/docusaurus-theme/css/product-picker.css +++ b/packages/docusaurus-theme/css/product-picker.css @@ -134,12 +134,34 @@ .nf-picker-panel--narrow { max-width: 430px; padding: 0.85rem 1.25rem; } -/* Ensure visibility when open */ -.dropdown--show > .dropdown__menu, -.dropdown:hover > .dropdown__menu { +/* + * Click-only dropdowns — how this works: + * + * Infima (Docusaurus's base CSS) shows .dropdown__menu on :hover by default. + * Our swizzled DropdownNavbarItem/Desktop uses JS click to toggle the + * `dropdown--show` class instead. We need CSS to respect that. + * + * The trick: both rules below have the same specificity (0,3,0). The hide + * rule kills Infima's hover behaviour; the show rule comes *later* in the + * file, so it wins the cascade when `dropdown--show` is present — even while + * the user is hovering. + * + * To verify: hover over any navbar dropdown → menu stays closed. + * Click the trigger → menu opens and stays open while hovering. + * Click a menu item or anywhere outside → menu closes. + */ +.navbar__item.dropdown:hover .dropdown__menu, +.navbar__item.dropdown:hover > .dropdown__menu { + display: none; + visibility: hidden; + opacity: 0; + pointer-events: none; +} +.navbar__item.dropdown.dropdown--show .dropdown__menu { display: block; visibility: visible; opacity: 1; + pointer-events: auto; } /* ── Grid layout ────────────────────────────────────────────────────────── */ diff --git a/packages/docusaurus-theme/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx b/packages/docusaurus-theme/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx index 23c05f9e..5ded2473 100644 --- a/packages/docusaurus-theme/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx +++ b/packages/docusaurus-theme/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx @@ -54,10 +54,11 @@ export default function DropdownNavbarItemDesktop({ aria-haspopup="true" aria-expanded={showDropdown} role="button" - href={props.to ? undefined : '#'} + href="#" className={clsx('navbar__link', className)} {...props} - onClick={props.to ? undefined : handleClick} + to={undefined} + onClick={handleClick} onKeyDown={(e: React.KeyboardEvent) => { if (e.key === 'Enter') { e.preventDefault(); @@ -66,7 +67,7 @@ export default function DropdownNavbarItemDesktop({ }}> {props.children ?? props.label} -