mirror of
https://github.com/supabase/supabase.git
synced 2026-06-10 13:01:16 +08:00
## Problem The `ui-patterns/CommandMenu` exposes internal components that have the same names as the base shadcn components they wrap. This create confusion about which one to use and forces us to expose the base ones with the `_Shadcn_` suffix. ## Solution Rename those internal components to have `CommandMenu` in their names to make it clearer they are meant to be used with `CommandMenu`. We will then rename the shadcn base ones to remove the suffix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Refactor * Standardized Command Menu component naming across the design system for improved consistency and clarity. Updated component names: `CommandInput` → `CommandMenuInput`, `CommandList` → `CommandMenuList`, `CommandItem` → `CommandMenuItem`, `CommandEmpty` → `CommandMenuEmpty`, and `CommandGroup` → `CommandMenuGroup`. Updated public API exports, internal subpath references, all examples within the registry, and implementations across documentation, studio, and application interfaces. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45996) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import {
|
|
CommandHeader,
|
|
CommandMenu,
|
|
CommandMenuInput,
|
|
CommandMenuList,
|
|
} from 'ui-patterns/CommandMenu'
|
|
import { useChangelogCommand } from 'ui-patterns/CommandMenu/prepackaged/Changelog'
|
|
import { useDocsAiCommands } from 'ui-patterns/CommandMenu/prepackaged/DocsAi'
|
|
import { useDocsSearchCommands } from 'ui-patterns/CommandMenu/prepackaged/DocsSearch'
|
|
import { useSupportCommands } from 'ui-patterns/CommandMenu/prepackaged/Support'
|
|
import { useThemeSwitcherCommands } from 'ui-patterns/CommandMenu/prepackaged/ThemeSwitcher'
|
|
|
|
import { useDocsNavCommands } from '../../components/Navigation/Navigation.commands'
|
|
import { useQuickstartCommands } from './Quickstarts'
|
|
|
|
const DocsCommandMenu = () => {
|
|
useDocsSearchCommands({
|
|
modify: (command) => ({ ...command, forceMount: true }),
|
|
options: { forceMountSection: true },
|
|
})
|
|
useDocsAiCommands({ modify: (command) => ({ ...command, forceMount: true }) })
|
|
useDocsNavCommands()
|
|
useQuickstartCommands()
|
|
useSupportCommands()
|
|
useChangelogCommand()
|
|
useThemeSwitcherCommands()
|
|
|
|
return (
|
|
<CommandMenu>
|
|
<CommandHeader>
|
|
<CommandMenuInput />
|
|
</CommandHeader>
|
|
<CommandMenuList />
|
|
</CommandMenu>
|
|
)
|
|
}
|
|
|
|
export { DocsCommandMenu as default }
|