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.
67 lines
2.2 KiB
TypeScript
67 lines
2.2 KiB
TypeScript
import { isFeatureEnabled } from 'common/enabled-features'
|
|
|
|
import type { NavMenuConstant } from '@/components/Navigation/Navigation.types'
|
|
|
|
const { docsProductionChecklist: productionChecklistEnabled } = isFeatureEnabled([
|
|
'docs:production_checklist',
|
|
])
|
|
|
|
export const deployment: NavMenuConstant = {
|
|
title: 'Deploy to production',
|
|
icon: 'git-branch',
|
|
url: '/guides/deployment',
|
|
items: [
|
|
{
|
|
name: 'Production checklist',
|
|
url: '/guides/deployment/going-into-prod',
|
|
enabled: productionChecklistEnabled,
|
|
},
|
|
{ name: 'Maturity model', url: '/guides/deployment/maturity-model' },
|
|
{
|
|
name: 'Environments',
|
|
items: [
|
|
{ name: 'Managing environments', url: '/guides/deployment/managing-environments' },
|
|
{ name: 'Database migrations', url: '/guides/deployment/database-migrations' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Branching',
|
|
items: [
|
|
{ name: 'Overview', url: '/guides/deployment/branching' },
|
|
{ name: 'Branching via GitHub', url: '/guides/deployment/branching/github-integration' },
|
|
{ name: 'Branching in the Dashboard', url: '/guides/deployment/branching/dashboard' },
|
|
{
|
|
name: 'Working with branches',
|
|
url: '/guides/deployment/branching/working-with-branches',
|
|
},
|
|
{ name: 'Branching configuration', url: '/guides/deployment/branching/configuration' },
|
|
{ name: 'Branching integrations', url: '/guides/deployment/branching/integrations' },
|
|
{
|
|
name: 'Branching troubleshooting',
|
|
url: '/guides/deployment/branching/troubleshooting',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'CI/CD',
|
|
items: [
|
|
{
|
|
name: 'Generate database types',
|
|
url: '/guides/deployment/ci/generating-types',
|
|
},
|
|
{ name: 'Automated testing', url: '/guides/deployment/ci/testing' },
|
|
{ name: 'Back up your database', url: '/guides/deployment/ci/backups' },
|
|
],
|
|
},
|
|
{
|
|
name: 'Terraform',
|
|
id: 'terraform',
|
|
items: [
|
|
{ name: 'Overview', url: '/guides/deployment/terraform' },
|
|
{ name: 'Terraform tutorial', url: '/guides/deployment/terraform/tutorial' },
|
|
{ name: 'Terraform reference', url: '/guides/deployment/terraform/reference' },
|
|
],
|
|
},
|
|
],
|
|
}
|