refactor(command-menu-item): rename Actions to CommandMenuItem (#18489)

actions are being renamed to command menu item, they will be migrated to
server and will be served as headless front components

---------

Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
This commit is contained in:
nitin
2026-03-09 19:33:12 +05:30
committed by GitHub
parent 06bdb5ad6a
commit 36bcc71f3d
275 changed files with 4544 additions and 4436 deletions
@@ -15,7 +15,7 @@ import { mapViewFilterGroupLogicalOperatorToRecordFilterGroupLogicalOperator } f
import { act } from 'react';
import { isDefined } from 'twenty-shared/utils';
import { type CoreViewFilterGroup } from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksAndActionMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndActionMenuWrapper';
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
import { mockedCoreViews } from '~/testing/mock-data/generated/metadata/views/mock-views-data';
import { generatedMockObjectMetadataItems } from '~/testing/utils/generatedMockObjectMetadataItems';
@@ -87,7 +87,7 @@ describe('useApplyCurrentViewFilterGroupsToCurrentRecordFilterGroups', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentViewId: mockView.id,
@@ -139,7 +139,7 @@ describe('useApplyCurrentViewFilterGroupsToCurrentRecordFilterGroups', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -180,7 +180,7 @@ describe('useApplyCurrentViewFilterGroupsToCurrentRecordFilterGroups', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -16,7 +16,7 @@ import {
type CoreViewFilter,
ViewFilterOperand as CoreViewFilterOperand,
} from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksAndActionMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndActionMenuWrapper';
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
import { mockedCoreViews } from '~/testing/mock-data/generated/metadata/views/mock-views-data';
import { generatedMockObjectMetadataItems } from '~/testing/utils/generatedMockObjectMetadataItems';
import { useApplyCurrentViewFiltersToCurrentRecordFilters } from '@/views/hooks/useApplyCurrentViewFiltersToCurrentRecordFilters';
@@ -98,7 +98,7 @@ describe('useApplyCurrentViewFiltersToCurrentRecordFilters', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -148,7 +148,7 @@ describe('useApplyCurrentViewFiltersToCurrentRecordFilters', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -189,7 +189,7 @@ describe('useApplyCurrentViewFiltersToCurrentRecordFilters', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -12,7 +12,7 @@ import { type CoreViewWithRelations } from '@/views/types/CoreViewWithRelations'
import { type View } from '@/views/types/View';
import { isDefined } from 'twenty-shared/utils';
import { ViewSortDirection } from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksAndActionMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndActionMenuWrapper';
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
import { mockedCoreViews } from '~/testing/mock-data/generated/metadata/views/mock-views-data';
import { generatedMockObjectMetadataItems } from '~/testing/utils/generatedMockObjectMetadataItems';
import { useApplyCurrentViewSortsToCurrentRecordSorts } from '@/views/hooks/useApplyCurrentViewSortsToCurrentRecordSorts';
@@ -86,7 +86,7 @@ describe('useApplyCurrentViewSortsToCurrentRecordSorts', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -130,7 +130,7 @@ describe('useApplyCurrentViewSortsToCurrentRecordSorts', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -176,7 +176,7 @@ describe('useApplyCurrentViewSortsToCurrentRecordSorts', () => {
};
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -8,7 +8,7 @@ import { generatedMockObjectMetadataItems } from '~/testing/utils/generatedMockO
import { type CoreViewSortEssential } from '@/views/types/CoreViewSortEssential';
import { isDefined } from 'twenty-shared/utils';
import { ViewSortDirection } from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksAndActionMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndActionMenuWrapper';
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
import { useApplyViewSortsToCurrentRecordSorts } from '@/views/hooks/useApplyViewSortsToCurrentRecordSorts';
const mockObjectMetadataItemNameSingular = 'company';
@@ -52,7 +52,7 @@ describe('useApplyViewSortsToCurrentRecordSorts', () => {
return { applyViewSortsToCurrentRecordSorts, currentRecordSorts };
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular:
@@ -87,7 +87,7 @@ describe('useApplyViewSortsToCurrentRecordSorts', () => {
return { applyViewSortsToCurrentRecordSorts, currentRecordSorts };
},
{
wrapper: getJestMetadataAndApolloMocksAndActionMenuWrapper({
wrapper: getJestMetadataAndApolloMocksAndCommandMenuWrapper({
apolloMocks: [],
componentInstanceId: 'instanceId',
contextStoreCurrentObjectMetadataNameSingular: