From f31ee88fe8dad09ca10dbc031af1dc442883f97d Mon Sep 17 00:00:00 2001 From: Paul Rastoin <45004772+prastoin@users.noreply.github.com> Date: Wed, 5 Feb 2025 16:20:57 +0100 Subject: [PATCH] [NITPICK] Avoid duplicated action position index in `DefaultActionsConfigV2` (#10031) # Introduction Nitpick Action's record has two entries with `position: 0` Unless I'm mistaken I could not find any place where the `position` property is consumed So this is just for sake of the +1 suite --- .../constants/DefaultActionsConfigV2.ts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultActionsConfigV2.ts b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultActionsConfigV2.ts index 33467717e..9da6c8c27 100644 --- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultActionsConfigV2.ts +++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultActionsConfigV2.ts @@ -56,7 +56,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: SingleRecordActionKeys.EXPORT_NOTE_TO_PDF, label: msg`Export to PDF`, shortLabel: msg`Export`, - position: 0, + position: 1, isPinned: false, Icon: IconFileExport, availableOn: [ActionViewType.SHOW_PAGE], @@ -68,7 +68,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: SingleRecordActionKeys.ADD_TO_FAVORITES, label: msg`Add to favorites`, shortLabel: msg`Add to favorites`, - position: 1, + position: 2, isPinned: true, Icon: IconHeart, availableOn: [ @@ -84,7 +84,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< label: msg`Remove from favorites`, shortLabel: msg`Remove from favorites`, isPinned: true, - position: 2, + position: 3, Icon: IconHeartOff, availableOn: [ ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION, @@ -98,7 +98,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: SingleRecordActionKeys.DELETE, label: msg`Delete record`, shortLabel: msg`Delete`, - position: 3, + position: 4, Icon: IconTrash, accent: 'danger', isPinned: true, @@ -114,7 +114,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: MultipleRecordsActionKeys.DELETE, label: msg`Delete records`, shortLabel: msg`Delete`, - position: 4, + position: 5, Icon: IconTrash, accent: 'danger', isPinned: true, @@ -127,7 +127,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: MultipleRecordsActionKeys.EXPORT, label: msg`Export records`, shortLabel: msg`Export`, - position: 5, + position: 6, Icon: IconDatabaseExport, accent: 'default', isPinned: false, @@ -140,7 +140,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: NoSelectionRecordActionKeys.EXPORT_VIEW, label: msg`Export view`, shortLabel: msg`Export`, - position: 6, + position: 7, Icon: IconDatabaseExport, accent: 'default', isPinned: false, @@ -153,7 +153,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: SingleRecordActionKeys.DESTROY, label: msg`Permanently destroy record`, shortLabel: msg`Destroy`, - position: 7, + position: 8, Icon: IconTrashX, accent: 'danger', isPinned: true, @@ -168,7 +168,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< scope: ActionMenuEntryScope.RecordSelection, key: SingleRecordActionKeys.NAVIGATE_TO_PREVIOUS_RECORD, label: msg`Navigate to previous record`, - position: 8, + position: 9, isPinned: true, Icon: IconChevronUp, availableOn: [ActionViewType.SHOW_PAGE], @@ -179,7 +179,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< scope: ActionMenuEntryScope.RecordSelection, key: SingleRecordActionKeys.NAVIGATE_TO_NEXT_RECORD, label: msg`Navigate to next record`, - position: 9, + position: 10, isPinned: true, Icon: IconChevronDown, availableOn: [ActionViewType.SHOW_PAGE], @@ -191,7 +191,7 @@ export const DEFAULT_ACTIONS_CONFIG_V2: Record< key: MultipleRecordsActionKeys.DESTROY, label: msg`Permanently destroy records`, shortLabel: msg`Destroy`, - position: 10, + position: 11, Icon: IconTrashX, accent: 'danger', isPinned: true,