@@ -41,6 +41,8 @@ import { useFeatures } from "~/hooks/useFeatures";
4141import { type MatchedOrganization } from "~/hooks/useOrganizations" ;
4242import { type MatchedProject } from "~/hooks/useProject" ;
4343import { useHasAdminAccess } from "~/hooks/useUser" ;
44+ import { useShortcutKeys } from "~/hooks/useShortcutKeys" ;
45+ import { ShortcutKey } from "../primitives/ShortcutKey" ;
4446import { type User } from "~/models/user.server" ;
4547import { useCurrentPlan } from "~/routes/_app.orgs.$organizationSlug/route" ;
4648import { type FeedbackType } from "~/routes/resources.feedback" ;
@@ -137,6 +139,11 @@ export function SideMenu({
137139 const { isManagedCloud } = useFeatures ( ) ;
138140 const featureFlags = useFeatureFlags ( ) ;
139141
142+ useShortcutKeys ( {
143+ shortcut : { modifiers : [ "mod" ] , key : "b" } ,
144+ action : ( ) => setIsCollapsed ( ( prev ) => ! prev ) ,
145+ } ) ;
146+
140147 useEffect ( ( ) => {
141148 const handleScroll = ( ) => {
142149 if ( borderRef . current ) {
@@ -897,8 +904,12 @@ function CollapseToggle({
897904 < AnimatedChevron isHovering = { isHovering } isCollapsed = { isCollapsed } />
898905 </ button >
899906 </ TooltipTrigger >
900- < TooltipContent side = "right" className = "text-xs" >
907+ < TooltipContent side = "right" className = "flex items-center gap-2 text-xs" >
901908 { isCollapsed ? "Expand" : "Collapse" }
909+ < span className = "flex items-center" >
910+ < ShortcutKey shortcut = { { modifiers : [ "mod" ] } } variant = "small" />
911+ < ShortcutKey shortcut = { { key : "b" } } variant = "small" />
912+ </ span >
902913 </ TooltipContent >
903914 </ Tooltip >
904915 </ TooltipProvider >
0 commit comments