Files
supabase/apps/studio/components/interfaces/App/CommandMenu/CommandMenu.tsx
T
Francesco Sansalvadore 156f904018 feat: floating mobile toolbar (#43444)
- move navigation components to `apps/studio/components/layouts/Navigation`
- add [FloatingMobileToolbar](https://github.com/supabase/supabase/pull/43444/changes#diff-3dffe47fd51ca851d612d8728e03b2dc344ec213d4f3a46a824d3fa32a7cc851) as quick access to tools such as search, assistant, inline editor, etc - behind feature flag and feature preview (true by default as it's a bit
annoying to have to enable it all the time as previews are stored in
local-storage)
- fix sidebar panels closing on viewport resizing (regression from previous pr)

https://github.com/user-attachments/assets/d6881e3b-5128-4306-bb82-3ca39c755dba

<img width="986" height="697" alt="Screenshot 2026-03-12 at 12 40 11"
src="https://github.com/user-attachments/assets/da8511e2-7d01-4237-b814-596031c747c5"
/>
2026-03-13 12:13:07 +00:00

64 lines
2.3 KiB
TypeScript

import { IS_PLATFORM } from 'common'
import { useBranchCommands } from 'components/interfaces/BranchManagement/Branch.Commands'
import {
useQueryTableCommands,
useSnippetCommands,
} from 'components/layouts/SQLEditorLayout/SqlEditor.Commands'
import { useProjectLevelTableEditorCommands } from 'components/layouts/TableEditorLayout/TableEditor.Commands'
import { useLayoutNavCommands } from 'components/layouts/useLayoutNavCommands'
import { CommandHeader, CommandInput, CommandList, CommandMenu } 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 { useThemeSwitcherCommands } from 'ui-patterns/CommandMenu/prepackaged/ThemeSwitcher'
import { useApiKeysCommands } from './ApiKeys'
import { useApiUrlCommand } from './ApiUrl'
import { useContextSearchCommands } from './ContextSearchCommands'
import { useCreateCommands } from './CreateCommands'
import { orderCommandSectionsByPriority } from './ordering'
import { useConfigureOrganizationCommand, useProjectSwitchCommand } from './OrgProjectSwitcher'
import { useSupportCommands } from './Support'
import { useConnectCommands } from '@/components/interfaces/ConnectButton/Connect.Commands'
export function CommandMenuInnerContent() {
return (
<>
<CommandHeader>
<CommandInput />
</CommandHeader>
<CommandList />
</>
)
}
export default function StudioCommandMenu() {
useCreateCommands()
useApiKeysCommands()
useApiUrlCommand()
useConnectCommands()
useProjectLevelTableEditorCommands()
useProjectSwitchCommand()
useConfigureOrganizationCommand()
useQueryTableCommands()
useBranchCommands()
useSnippetCommands()
useLayoutNavCommands()
useDocsSearchCommands({
options: { orderSection: orderCommandSectionsByPriority, sectionMeta: { priority: 3 } },
})
useDocsAiCommands({
options: { orderSection: orderCommandSectionsByPriority, sectionMeta: { priority: 3 } },
})
useSupportCommands()
useChangelogCommand({ enabled: IS_PLATFORM })
useThemeSwitcherCommands()
useContextSearchCommands()
return (
<CommandMenu>
<CommandMenuInnerContent />
</CommandMenu>
)
}