Replace hotkey scopes by focus stack (Part 6 - Remove Hotkey scopes 🫳🎤) (#13127)
# Replace hotkey scopes by focus stack (Part 6 - Remove Hotkey scopes) This PR is the last part of a refactoring aiming to deprecate the hotkey scopes api in favor of the new focus stack api which is more robust. Part 1: https://github.com/twentyhq/twenty/pull/12673 Part 2: https://github.com/twentyhq/twenty/pull/12798 Part 3: https://github.com/twentyhq/twenty/pull/12910 Part 4: https://github.com/twentyhq/twenty/pull/12933 Part 5: https://github.com/twentyhq/twenty/pull/13106 In this part, we completely remove the hotkey scopes.
This commit is contained in:
@ -159,7 +159,6 @@ export const CurrentWorkspaceMemberFavorites = ({
|
||||
onSubmit={handleSubmitRename}
|
||||
onCancel={handleCancelRename}
|
||||
onClickOutside={handleClickOutside}
|
||||
hotkeyScope="favorites-folder-input"
|
||||
/>
|
||||
) : (
|
||||
<FavoritesDroppable droppableId={`folder-header-${folder.folderId}`}>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { CurrentWorkspaceMemberFavorites } from '@/favorites/components/CurrentWorkspaceMemberFavorites';
|
||||
import { FavoriteFolderHotkeyScope } from '@/favorites/constants/FavoriteFolderRightIconDropdownHotkeyScope';
|
||||
import { useCreateFavoriteFolder } from '@/favorites/hooks/useCreateFavoriteFolder';
|
||||
import { useFavoritesByFolder } from '@/favorites/hooks/useFavoritesByFolder';
|
||||
import { isFavoriteFolderCreatingState } from '@/favorites/states/isFavoriteFolderCreatingState';
|
||||
@ -71,9 +70,6 @@ export const FavoriteFolders = ({
|
||||
onSubmit={handleSubmitFavoriteFolderCreation}
|
||||
onCancel={handleCancelFavoriteFolderCreation}
|
||||
onClickOutside={handleClickOutside}
|
||||
hotkeyScope={
|
||||
FavoriteFolderHotkeyScope.FavoriteFolderNavigationInput
|
||||
}
|
||||
/>
|
||||
</NavigationDrawerAnimatedCollapseWrapper>
|
||||
)}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
export enum FavoriteFolderHotkeyScope {
|
||||
FavoriteFolderRightIconDropdown = 'favorite-folder-right-icon-dropdown',
|
||||
FavoriteFolderNavigationInput = 'favorite-folder-navigation-input',
|
||||
}
|
||||
@ -9,7 +9,6 @@ import { ObjectRecord } from '@/object-record/types/ObjectRecord';
|
||||
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
|
||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||
import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';
|
||||
import { DropdownHotkeyScope } from '@/ui/layout/dropdown/constants/DropdownHotkeyScope';
|
||||
import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
|
||||
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
|
||||
import { useRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentStateV2';
|
||||
@ -68,7 +67,6 @@ export const FavoriteFolderPicker = ({
|
||||
onSubmit?.();
|
||||
},
|
||||
focusId: dropdownId,
|
||||
scope: DropdownHotkeyScope.Dropdown,
|
||||
dependencies: [onSubmit, isFavoriteFolderCreating],
|
||||
});
|
||||
|
||||
@ -88,7 +86,6 @@ export const FavoriteFolderPicker = ({
|
||||
}
|
||||
},
|
||||
focusId: instanceId,
|
||||
scope: DropdownHotkeyScope.Dropdown,
|
||||
dependencies: [
|
||||
filteredFolders,
|
||||
showNoFolderOption,
|
||||
|
||||
Reference in New Issue
Block a user