9426 migrate workflow pages to command menu (#9515)
Closes twentyhq/core-team-issues#53 - Removes command menu top bar text input when the user is not on root page - Fixes bug when resetting command menu context - Added animations on command menu open and close - Refactored workflow visualizer code to remove unnecessary rerenders and props drilling https://github.com/user-attachments/assets/1da3adb8-220b-407b-9279-30354d3100d3
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
import { THEME_COMMON } from 'twenty-ui';
|
||||
|
||||
export const COMMAND_MENU_ANIMATION_VARIANTS = {
|
||||
fullScreen: {
|
||||
x: '0%',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
bottom: '0',
|
||||
top: '0',
|
||||
},
|
||||
normal: {
|
||||
x: '0%',
|
||||
width: THEME_COMMON.rightDrawerWidth,
|
||||
height: '100%',
|
||||
bottom: '0',
|
||||
top: '0',
|
||||
},
|
||||
closed: {
|
||||
x: '100%',
|
||||
width: THEME_COMMON.rightDrawerWidth,
|
||||
height: '100%',
|
||||
bottom: '0',
|
||||
top: 'auto',
|
||||
},
|
||||
};
|
||||
@ -3,6 +3,10 @@ import { RightDrawerEmailThread } from '@/activities/emails/right-drawer/compone
|
||||
import { CommandMenu } from '@/command-menu/components/CommandMenu';
|
||||
import { CommandMenuPages } from '@/command-menu/components/CommandMenuPages';
|
||||
import { RightDrawerRecord } from '@/object-record/record-right-drawer/components/RightDrawerRecord';
|
||||
import { RightDrawerWorkflowEditStep } from '@/workflow/workflow-steps/components/RightDrawerWorkflowEditStep';
|
||||
import { RightDrawerWorkflowViewStep } from '@/workflow/workflow-steps/components/RightDrawerWorkflowViewStep';
|
||||
import { RightDrawerWorkflowSelectAction } from '@/workflow/workflow-steps/workflow-actions/components/RightDrawerWorkflowSelectAction';
|
||||
import { RightDrawerWorkflowSelectTriggerType } from '@/workflow/workflow-trigger/components/RightDrawerWorkflowSelectTriggerType';
|
||||
|
||||
export const COMMAND_MENU_PAGES_CONFIG = new Map<
|
||||
CommandMenuPages,
|
||||
@ -12,4 +16,14 @@ export const COMMAND_MENU_PAGES_CONFIG = new Map<
|
||||
[CommandMenuPages.ViewRecord, <RightDrawerRecord />],
|
||||
[CommandMenuPages.ViewEmailThread, <RightDrawerEmailThread />],
|
||||
[CommandMenuPages.ViewCalendarEvent, <RightDrawerCalendarEvent />],
|
||||
[
|
||||
CommandMenuPages.WorkflowStepSelectTriggerType,
|
||||
<RightDrawerWorkflowSelectTriggerType />,
|
||||
],
|
||||
[
|
||||
CommandMenuPages.WorkflowStepSelectAction,
|
||||
<RightDrawerWorkflowSelectAction />,
|
||||
],
|
||||
[CommandMenuPages.WorkflowStepEdit, <RightDrawerWorkflowEditStep />],
|
||||
[CommandMenuPages.WorkflowStepView, <RightDrawerWorkflowViewStep />],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user