685 Move all navigation actions inside the actions configs (#11303)

Move all navigation actions inside the actions configs
This commit is contained in:
Raphaël Bosi
2025-04-01 11:23:28 +02:00
committed by GitHub
parent f6e4cd45ed
commit a24e96ae0e
75 changed files with 2717 additions and 149 deletions

View File

@ -3,7 +3,6 @@ import {
ActionMenuEntryScope,
ActionMenuEntryType,
} from '@/action-menu/types/ActionMenuEntry';
import { COMMAND_MENU_NAVIGATE_COMMANDS } from '@/command-menu/constants/CommandMenuNavigateCommands';
import {
Command,
CommandScope,
@ -32,14 +31,6 @@ export const useCommandMenuCommands = () => {
hotKeys: actionMenuEntry.hotKeys,
})) as Command[];
// TODO: refactor this to use the config
const navigateCommandsFromConstants = Object.values(
COMMAND_MENU_NAVIGATE_COMMANDS,
);
const allNavigateCommands = navigateCommands.concat(
navigateCommandsFromConstants,
);
const actionRecordSelectionCommands: Command[] = actionMenuEntries
?.filter(
(actionMenuEntry) =>
@ -136,7 +127,7 @@ export const useCommandMenuCommands = () => {
}));
return {
navigateCommands: allNavigateCommands,
navigateCommands,
actionRecordSelectionCommands,
actionGlobalCommands,
actionObjectCommands,