mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
## Problem - docs top bar holds the global nav menus, so it repeats what the new sidebar shows - redesign needs a top bar with a breadcrumb for the current page and room for the page actions ## Solution - replaces the top bar with a logo cell, a breadcrumb, the page actions and an account cell - adds a sections menu under the logo, so a reader moves between docs, reference and the knowledge base - adds a breadcrumb slot for the current heading, which the right rail fills in #PR5, and a reference version dropdown - replaces the search field with an icon button, and shows ⌘K and ⌘I in the search and ask ai tooltips - adds a legacy copy of the current top bar, so the flag can show it merge the stack together, because the new top bar shows for every reader until #PR5 adds the flag switch <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open [/docs/guides/database/overview](https://docs-git-antlio-docs-v2-4-top-bar-supabase.vercel.app/docs/guides/database/overview) 2. make sure that the breadcrumb shows Database and the page 3. open [/docs/reference/javascript/introduction](https://docs-git-antlio-docs-v2-4-top-bar-supabase.vercel.app/docs/reference/javascript/introduction), and make sure that the breadcrumb has a version dropdown after JavaScript ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
12 lines
404 B
TypeScript
12 lines
404 B
TypeScript
import { BASE_PATH } from '@/lib/constants'
|
|
|
|
// fetch doesn't add Next's basePath, so the route is called with it
|
|
export const SEARCH_V2_ENDPOINT = `${BASE_PATH}/api/search_v2`
|
|
|
|
// a query has to be longer than this to be searched, so nothing is submitted until the third character
|
|
export const SEARCH_V2_MIN_CHARACTERS = 2
|
|
|
|
export const SEARCH_SHORTCUT_KEY = 'k'
|
|
|
|
export const ASK_AI_SHORTCUT_KEY = 'i'
|