mirror of
https://github.com/supabase/supabase.git
synced 2026-10-19 08:09:11 +03:00
fix(studio): add a keyboard shortcut for the Compute sidebar item (#50361)
The Compute entry in the project sidebar was the only product route without a `shortcutId`, so it had neither a `G`-chord nor the hover keybind tooltip every sibling gets. Bound it to `G` then `C` (previously unused) and added a test asserting every product route carries a shortcut. Fixes FE-4389 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a keyboard shortcut for quick navigation to Compute: press **G**, then **C**. - Compute navigation now includes a discoverable shortcut for consistent access from the navigation interface. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
bd95407a9c
commit
2cd9b42e80
3 files changed
+15
No files matched your search
@@ -90,6 +90,11 @@ describe('generateProductRoutes', () => {
|
||||
expect(keys(generateProductRoutes(REF, activeProject, { compute: true }))).toContain('compute')
|
||||
})
|
||||
|
||||
it('gives every product route a navigation shortcut', () => {
|
||||
const routes = generateProductRoutes(REF, activeProject, { compute: true })
|
||||
expect(routes.filter((r) => !r.shortcutId)).toEqual([])
|
||||
})
|
||||
|
||||
it('excludes auth when auth feature is disabled', () => {
|
||||
const routes = generateProductRoutes(REF, activeProject, { auth: false })
|
||||
expect(keys(routes)).not.toContain('auth')
|
||||
|
||||
@@ -178,6 +178,7 @@ export const generateProductRoutes = (
|
||||
icon: <Compute size={ICON_SIZE} strokeWidth={ICON_STROKE_WIDTH} />,
|
||||
link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/compute`),
|
||||
isNew: true,
|
||||
shortcutId: SHORTCUT_IDS.NAV_COMPUTE,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
||||
Reference in new issue
Block a user