mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
Closes DOCS-1469 ## Problem Option 1 in the navigation proposal groups the docs into Start, Build, Develop and deploy, Run and manage, Self-Hosting, Reference, and Resources. The `docs-ia-mvp-v1` flag from #52049 switches to an Option 1 config. That config is still a copy of today's navigation. ## Solution - **Top nav:** reads Start, Build, Develop and deploy, Run and manage, Self-Hosting, Reference, and Resources. Menus still open sidebars by URL prefix, as they do today. - **Run and manage:** pages under `/guides/platform`, `/guides/security`, and `/guides/observability` share one sidebar with the outline's seven groups. - **Other sidebars:** follow the outline. REST, GraphQL and Realtime share one sidebar, and Cron and Queues share one sidebar. - **Seven new topics:** keep their outline labels and link to the section on their source page, for example `getting-started/api-keys#leaked-key`. - **No flash of today's nav:** flags load in the browser, so the nav stays invisible until the query param or the flags resolve, with a 1-second fallback. The links stay in the HTML for agents. - **Tests:** each page appears once across the sidebars, and every link goes to a page in today's navigation. With the flag off, `useNavItems` returns today's navigation. **Not changed:** no URLs move. Breadcrumbs still show today's trail, which DOCS-1470 covers. ## Manual testing 1. Open [Database Backups with the flag on](https://docs-git-docs-ia-nav-option-1-supabase.vercel.app/docs/guides/platform/backups?docs-ia-mvp-v1=option-1). The top nav reads Start, Build, Develop and deploy, Run and manage, Self-Hosting, Reference, and Resources. The sidebar shows the seven Run and manage groups. 2. Open [the same page with the flag off](https://docs-git-docs-ia-nav-option-1-supabase.vercel.app/docs/guides/platform/backups?docs-ia-mvp-v1=control). Today's navigation shows. 3. Open [Database with the flag on](https://docs-git-docs-ia-nav-option-1-supabase.vercel.app/docs/guides/database/overview?docs-ia-mvp-v1=option-1). The sidebar starts with Connect to your database. 4. In the sidebar, open Row Level Security, roles and Vault, and select Test RLS policies with pgTAP. The testing overview opens at Database unit testing with pgTAP.
26 lines
923 B
TypeScript
26 lines
923 B
TypeScript
import { isFeatureEnabled } from 'common/enabled-features'
|
|
|
|
import type { NavMenuConstant } from '@/components/Navigation/Navigation.types'
|
|
|
|
const {
|
|
docsAgentPlugin: agentPluginEnabled,
|
|
docsAgentSkills: agentSkillsEnabled,
|
|
docsPrompts: promptsEnabled,
|
|
} = isFeatureEnabled(['docs:agent_plugin', 'docs:agent_skills', 'docs:prompts'])
|
|
|
|
export const aiTools: NavMenuConstant = {
|
|
icon: 'ai-tools',
|
|
title: 'AI tools',
|
|
url: '/guides/ai-tools',
|
|
items: [
|
|
{ name: 'Agent Plugin', url: '/guides/ai-tools/plugins', enabled: agentPluginEnabled },
|
|
{ name: 'MCP server', url: '/guides/ai-tools/mcp' },
|
|
{ name: 'Agent Skills', url: '/guides/ai-tools/ai-skills', enabled: agentSkillsEnabled },
|
|
{ name: 'Prompts', url: '/guides/ai-tools/ai-prompts', enabled: promptsEnabled },
|
|
{
|
|
name: 'Build AI features',
|
|
items: [{ name: 'Deploy MCP servers', url: '/guides/ai-tools/byo-mcp' }],
|
|
},
|
|
],
|
|
}
|