mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
Part of DOCS-1737 ## Problem People who tried the Option 1 navigation reported labels that wrap onto two lines, such as "Architecture, limits and pricing". The old 35-character limit let that label through at 32 characters. They also reported labels that aren't in sentence case, such as "Framework Quickstarts" and "ORM Quickstarts". The docs style guide asks for sentence case. ## Solution - **28-character limit, enforced.** A new test in `option1.test.ts` fails on any Option 1 sidebar label over 28 characters. 97 labels were over the limit. They're shortened. - **Sentence case.** About 120 more labels are recased. Proper nouns and product feature names keep their capitals, such as Edge Functions, Row Level Security and Auth Hooks. "Self-Hosting" becomes "Self-hosting" in the top nav and the sidebar title. - **Parallel Start labels.** "Web app demos" becomes "Web app tutorials", to match "Mobile tutorials". - **Build becomes Products.** The tree test ran each candidate label against the shipped Option 1 tree, with 93 tasks and 3 runs each. Products raised direct success from 51% to 59%, and first clicks on the right section from 78% to 88%. - **Test fixtures.** `DocsSidebarNav.test.tsx` and the level-size allowlist reference labels by name, so they change too. ## Manual testing 1. Open [Getting started with Option 1 on the preview](https://docs-git-docs-nav-label-casing-supabase.vercel.app/docs/guides/getting-started?docs-ia-mvp-v1=option-1). The sidebar shows "Framework quickstarts" and "Web app tutorials". 2. Run `pnpm run -F docs test:local:unwatch features/IaNav components/Navigation`. Expect all tests to pass.
170 lines
6.4 KiB
TypeScript
170 lines
6.4 KiB
TypeScript
import { isFeatureEnabled } from 'common/enabled-features'
|
|
|
|
import type { NavMenuConstant } from '@/components/Navigation/Navigation.types'
|
|
|
|
const { billingAll: billingEnabled } = isFeatureEnabled(['billing:all'])
|
|
|
|
export const functions: NavMenuConstant = {
|
|
icon: 'edge-functions',
|
|
title: 'Edge Functions',
|
|
url: '/guides/functions',
|
|
items: [
|
|
{
|
|
name: 'Getting started',
|
|
items: [
|
|
{ name: 'Quickstart (Dashboard)', url: '/guides/functions/quickstart-dashboard' },
|
|
{ name: 'Quickstart (CLI)', url: '/guides/functions/quickstart' },
|
|
{ name: 'Development environment', url: '/guides/functions/development-environment' },
|
|
{ name: 'Architecture', url: '/guides/functions/architecture' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Develop and configure',
|
|
items: [
|
|
{ name: 'Environment variables', url: '/guides/functions/secrets' },
|
|
{ name: 'Managing dependencies', url: '/guides/functions/dependencies' },
|
|
{ name: 'Function configuration', url: '/guides/functions/function-configuration' },
|
|
{ name: 'Routing', url: '/guides/functions/routing' },
|
|
{ name: 'Error handling', url: '/guides/functions/error-handling' },
|
|
{ name: 'CORS for browser calls', url: '/guides/functions/cors' },
|
|
{ name: 'Deploy to production', url: '/guides/functions/deploy' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Runtime features',
|
|
items: [
|
|
{ name: 'Background tasks', url: '/guides/functions/background-tasks' },
|
|
{ name: 'File storage (ephemeral)', url: '/guides/functions/ephemeral-storage' },
|
|
{ name: 'WebSockets', url: '/guides/functions/websockets' },
|
|
{ name: 'Wasm modules', url: '/guides/functions/wasm' },
|
|
{ name: 'AI models', url: '/guides/functions/ai-models' },
|
|
{ name: 'Recursive function calls', url: '/guides/functions/recursive-functions' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Debugging',
|
|
items: [
|
|
{ name: 'Debug locally with DevTools', url: '/guides/functions/debugging-tools' },
|
|
{ name: 'Testing your functions', url: '/guides/functions/unit-test' },
|
|
{ name: 'Logging', url: '/guides/functions/logging' },
|
|
{ name: 'Error codes', url: '/guides/functions/error-codes' },
|
|
{ name: 'Status codes', url: '/guides/functions/status-codes' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Limits, regions and pricing',
|
|
items: [
|
|
{ name: 'Regional invocations', url: '/guides/functions/regional-invocation' },
|
|
{ name: 'Limits', url: '/guides/functions/limits', enabled: billingEnabled },
|
|
{ name: 'Pricing', url: '/guides/functions/pricing', enabled: billingEnabled },
|
|
],
|
|
},
|
|
{
|
|
name: 'Auth, Database and Storage',
|
|
items: [
|
|
{
|
|
name: 'Supabase Auth',
|
|
items: [
|
|
{ name: 'Securing your functions', url: '/guides/functions/auth' },
|
|
{ name: 'Authorization headers', url: '/guides/functions/auth-headers' },
|
|
{ name: 'Legacy JWT secret', url: '/guides/functions/auth-legacy-jwt' },
|
|
],
|
|
},
|
|
{ name: 'Supabase Database (Postgres)', url: '/guides/functions/connect-to-postgres' },
|
|
{ name: 'Supabase Storage', url: '/guides/functions/storage-caching' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Examples and tools',
|
|
items: [
|
|
{
|
|
name: 'AI and MCP',
|
|
items: [
|
|
{
|
|
name: 'MCP server with mcp-lite',
|
|
url: '/guides/functions/examples/mcp-server-mcp-lite',
|
|
},
|
|
{
|
|
name: 'Generating AI images',
|
|
url: '/guides/functions/examples/amazon-bedrock-image-generator',
|
|
},
|
|
{ name: 'Semantic AI search', url: '/guides/functions/examples/semantic-search' },
|
|
{
|
|
name: 'ElevenLabs text to speech',
|
|
url: '/guides/functions/examples/elevenlabs-generate-speech-stream',
|
|
},
|
|
{
|
|
name: 'ElevenLabs speech to text',
|
|
url: '/guides/functions/examples/elevenlabs-transcribe-speech',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'Bots, email, notifications',
|
|
items: [
|
|
{ name: 'Building a Discord bot', url: '/guides/functions/examples/discord-bot' },
|
|
{ name: 'Building a Telegram bot', url: '/guides/functions/examples/telegram-bot' },
|
|
{
|
|
name: 'Slack bot for mentions',
|
|
url: '/guides/functions/examples/slack-bot-mention',
|
|
},
|
|
{
|
|
name: 'Sending push notifications',
|
|
url: '/guides/functions/examples/push-notifications',
|
|
},
|
|
{
|
|
name: 'React Email auth hook',
|
|
url: '/guides/functions/examples/auth-send-email-hook-react-email-resend',
|
|
},
|
|
{ name: 'Sending emails with Resend', url: '/guides/functions/examples/send-emails' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Images and screenshots',
|
|
items: [
|
|
{ name: 'Generating OG images', url: '/guides/functions/examples/og-image' },
|
|
{
|
|
name: 'Optimize images',
|
|
url: '/guides/functions/examples/image-manipulation',
|
|
},
|
|
{
|
|
name: 'Puppeteer screenshots',
|
|
url: '/guides/functions/examples/screenshots',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'Payments, CAPTCHA, limits',
|
|
items: [
|
|
{
|
|
name: 'Handling Stripe webhooks',
|
|
url: '/guides/functions/examples/stripe-webhooks',
|
|
},
|
|
{
|
|
name: 'Cloudflare Turnstile CAPTCHA',
|
|
url: '/guides/functions/examples/cloudflare-turnstile',
|
|
},
|
|
{ name: 'Rate-limiting with Redis', url: '/guides/functions/examples/rate-limiting' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Libraries and tools',
|
|
items: [
|
|
{ name: 'Dart Edge on Supabase', url: '/guides/functions/dart-edge' },
|
|
{ name: 'Type-safe SQL with Kysely', url: '/guides/functions/kysely-postgres' },
|
|
{ name: 'Upstash Redis', url: '/guides/functions/examples/upstash-redis' },
|
|
{
|
|
name: 'Monitoring with Sentry',
|
|
url: '/guides/functions/examples/sentry-monitoring',
|
|
},
|
|
{
|
|
name: 'Resumable WebSockets',
|
|
url: '/guides/functions/examples/resumable-websockets',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|