Skip to content

Match Mintlify accordion styling - #338

Open
Blargian wants to merge 20 commits into
mainfrom
codex/accordion-styling
Open

Match Mintlify accordion styling#338
Blargian wants to merge 20 commits into
mainfrom
codex/accordion-styling

Conversation

@Blargian

@Blargian Blargian commented Sep 8, 2026

Copy link
Copy Markdown
Member

This matches the accordion and code-block styling, spacing, and grouped disclosure behavior used by the existing Mintlify documentation, reduces the height of the sidebar language selector, removes delayed external icon requests from cards and tabs, and enables Vercel Speed Insights across the site.

Card and tab icons are resolved from local assets at build time, and tab triggers are rendered in the initial HTML so their icons and labels appear with the rest of the page. Remote-slice previews include the shared ClickHouse logo and resolve build assets from the project root, which keeps the same icon pipeline working after Astro bundles its prerender code. Public image trees are copied from their real source directories rather than through repository symlinks so Vercel checkouts produce the same assets as local builds.

The generated sidebar now preserves page-level icon metadata and renders named icons inline from bundled Iconify sets. Local SVG and image icons are also embedded into the initial HTML as data URLs, avoiding delayed sidebar icon requests. Repository-owned icons resolve directly from their source tree so scoped remote previews do not need to copy the complete public image tree. Pages marked hidden: true remain available as route-selection metadata but are omitted from rendered navigation, preserving the correct sidebar context on their published URLs.

The homepage MCP link now uses the same embedded SVG and 14px dimensions as the “Set up docs MCP” page action instead of recoloring the asset as a CSS mask.

Homepage links to index.mdx pages now use Nimbus's canonical directory routes instead of Mintlify's additional /index aliases, preventing 404s on Vercel for Core concepts and the other affected cards.

The shared Astro layout now renders the @vercel/speed-insights Astro component, covering documentation pages, the homepage, and generated error pages.

Code blocks now use Mintlify's compact type size, line height, padding, border radius, dark surface, and always-visible copy control. Runnable SQL blocks share that chrome and attach their action bar directly to the code block without a gap.

Accordions inside an AccordionGroup now behave as a mutually exclusive set: opening one closes the previously open item, while selecting the open item can close the entire group. Standalone accordions remain independent.

Sidebar disclosure state is initialized once from the first rendered page. From then on, navigation restores the exact user-controlled open/closed state; selecting a page never opens or closes any group.

Validated with:

  • pnpm exec astro check (0 errors)
  • A production build scoped to the clickhouse-private remote-preview path (365 pages)
  • A full Vercel-equivalent preview build (3,836 pages)
  • Explicit verification that the generated public tree contains the ClickHouse logo
  • A scoped production build confirming the Speed Insights element and client script are emitted
  • Local Astro visual comparison of ordinary and runnable SQL blocks against the Mintlify page
  • Local interaction testing confirming grouped accordions are exclusive and standalone accordions remain independent
  • Local route-transition testing across Source & CI builds, Debian/Ubuntu, and RedHat/CentOS confirming no group changes state unless its disclosure control is clicked
  • Local comparison of the ClickPipes rail confirming Monitoring has its inline chart icon, hidden DynamoDB navigation is omitted while its route retains ClickPipes context, and all 12 image-based icons are embedded as data URLs
  • Local homepage comparison confirming the MCP link and page action use the identical embedded SVG at 14px
  • A scoped production build confirming the homepage links to /docs/concepts/core-concepts and the canonical Core concepts route is generated
  • git diff --check

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Match Mintlify accordion styling and grouped disclosure behavior, preserve sidebar disclosure state across navigation, match code-block styling, render documentation and sidebar icons from local build assets, and enable Vercel Speed Insights.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/layouts/BaseLayout.astro

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/lib/build-icon.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/layouts/BaseLayout.astro

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/components/ui/sidebar/sidebar.client.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread bin/gen-sidebar.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 736724b. Configure here.

Comment thread src/components/ui/sidebar/SidebarGroup.astro
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

🕵

Preview Deployment Components Updated (UTC)
Docs preview 🟢 Ready English only 2026-09-09 18:00 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant