Reorder Action Menu Items for Better UX (#12408)

## Quick Overview
This PR addresses the issue of reordering the action menu items to
improve user experience. The changes ensure that the "Import records"
and "Export view" actions are placed next to each other, with "Import
records" appearing before "Export view". This sequence is more intuitive
and aligns with common user expectations.

## Changes Made:
Adjusted the position of "Import records" to be before "Export view".
Ensured the sequence is now: 1. Import, 2. Export, 3. Delete.

## Impact:
Improved user experience by providing a more logical order of actions.
Aligned with user expectations for common data operations.


**Before:**

![image](https://github.com/user-attachments/assets/59c8a586-9dbf-4774-a9f3-492e1577a5f5)

**After:**
<img width="438" alt="Screenshot 2025-06-02 at 2 03 01 PM"
src="https://github.com/user-attachments/assets/d38d95f0-1ae4-4b78-976b-837ee5df0c9e"
/>
Ensured no regressions in existing functionality.
This commit is contained in:
jaspass04
2025-06-02 14:54:29 +03:00
committed by GitHub
parent f0d85ea868
commit 2bf11d425a

View File

@ -156,13 +156,27 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
availableOn: [ActionViewType.INDEX_PAGE_BULK_SELECTION],
component: <ExportMultipleRecordsAction />,
},
[NoSelectionRecordActionKeys.IMPORT_RECORDS]: {
type: ActionType.Standard,
scope: ActionScope.Object,
key: NoSelectionRecordActionKeys.IMPORT_RECORDS,
label: msg`Import records`,
shortLabel: msg`Import`,
position: 6,
Icon: IconFileImport,
accent: 'default',
isPinned: false,
shouldBeRegistered: () => true,
availableOn: [ActionViewType.INDEX_PAGE_NO_SELECTION],
component: <ImportRecordsNoSelectionRecordAction />,
},
[NoSelectionRecordActionKeys.EXPORT_VIEW]: {
type: ActionType.Standard,
scope: ActionScope.Object,
key: NoSelectionRecordActionKeys.EXPORT_VIEW,
label: msg`Export view`,
shortLabel: msg`Export`,
position: 6,
position: 7,
Icon: IconFileExport,
accent: 'default',
isPinned: false,
@ -176,7 +190,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
key: SingleRecordActionKeys.DELETE,
label: msg`Delete`,
shortLabel: msg`Delete`,
position: 7,
position: 8,
Icon: IconTrash,
accent: 'default',
isPinned: true,
@ -196,7 +210,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
key: MultipleRecordsActionKeys.DELETE,
label: msg`Delete records`,
shortLabel: msg`Delete`,
position: 8,
position: 9,
Icon: IconTrash,
accent: 'default',
isPinned: true,
@ -220,7 +234,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
key: NoSelectionRecordActionKeys.SEE_DELETED_RECORDS,
label: msg`See deleted records`,
shortLabel: msg`Deleted records`,
position: 9,
position: 10,
Icon: IconRotate2,
accent: 'default',
isPinned: false,
@ -235,7 +249,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
key: NoSelectionRecordActionKeys.HIDE_DELETED_RECORDS,
label: msg`Hide deleted records`,
shortLabel: msg`Hide deleted`,
position: 10,
position: 11,
Icon: IconEyeOff,
accent: 'default',
isPinned: false,
@ -244,20 +258,6 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
availableOn: [ActionViewType.INDEX_PAGE_NO_SELECTION],
component: <HideDeletedRecordsNoSelectionRecordAction />,
},
[NoSelectionRecordActionKeys.IMPORT_RECORDS]: {
type: ActionType.Standard,
scope: ActionScope.Object,
key: NoSelectionRecordActionKeys.IMPORT_RECORDS,
label: msg`Import records`,
shortLabel: msg`Import`,
position: 11,
Icon: IconFileImport,
accent: 'default',
isPinned: false,
shouldBeRegistered: () => true,
availableOn: [ActionViewType.INDEX_PAGE_NO_SELECTION],
component: <ImportRecordsNoSelectionRecordAction />,
},
[SingleRecordActionKeys.DESTROY]: {
type: ActionType.Standard,
scope: ActionScope.RecordSelection,