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
@@ -1,8 +1,8 @@
import { type Decorator } from '@storybook/react-vite';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { ActionMenuComponentInstanceContext } from '@/action-menu/states/contexts/ActionMenuComponentInstanceContext';
import { getActionMenuIdFromRecordIndexId } from '@/action-menu/utils/getActionMenuIdFromRecordIndexId';
import { CommandMenuComponentInstanceContext } from '@/command-menu/states/contexts/CommandMenuComponentInstanceContext';
import { getCommandMenuIdFromRecordIndexId } from '@/command-menu-item/utils/getCommandMenuIdFromRecordIndexId';
import { MAIN_CONTEXT_STORE_INSTANCE_ID } from '@/context-store/constants/MainContextStoreInstanceId';
import { contextStoreCurrentViewIdComponentState } from '@/context-store/states/contextStoreCurrentViewIdComponentState';
import { labelIdentifierFieldMetadataItemSelector } from '@/object-metadata/states/labelIdentifierFieldMetadataItemSelector';
@@ -191,7 +191,7 @@ const InternalTableContextProviders = ({
value={{
onCloseTableCell: () => {},
onOpenTableCell: () => {},
onActionMenuDropdownOpened: () => {},
onCommandMenuDropdownOpened: () => {},
onMoveFocus: () => {},
onMoveHoverToCurrentCell: () => {},
}}
@@ -235,9 +235,9 @@ export const RecordTableDecorator: Decorator = (Story, context) => {
<RecordComponentInstanceContextsWrapper
componentInstanceId={recordIndexId}
>
<ActionMenuComponentInstanceContext.Provider
<CommandMenuComponentInstanceContext.Provider
value={{
instanceId: getActionMenuIdFromRecordIndexId(recordIndexId),
instanceId: getCommandMenuIdFromRecordIndexId(recordIndexId),
}}
>
<InternalTableContextProviders
@@ -248,7 +248,7 @@ export const RecordTableDecorator: Decorator = (Story, context) => {
/>
<Story />
</InternalTableContextProviders>
</ActionMenuComponentInstanceContext.Provider>
</CommandMenuComponentInstanceContext.Provider>
</RecordComponentInstanceContextsWrapper>
</ViewComponentInstanceContext.Provider>
</RecordTableComponentInstanceContext.Provider>
@@ -1,4 +1,4 @@
import { ActionMenuComponentInstanceContext } from '@/action-menu/states/contexts/ActionMenuComponentInstanceContext';
import { CommandMenuComponentInstanceContext } from '@/command-menu/states/contexts/CommandMenuComponentInstanceContext';
import { ContextStoreComponentInstanceContext } from '@/context-store/states/contexts/ContextStoreComponentInstanceContext';
import { type MockedResponse } from '@apollo/client/testing';
import { type ReactNode } from 'react';
@@ -12,7 +12,7 @@ import { JestRecordIndexContextProviderWrapper } from '~/testing/jest/JestRecord
import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
import { getMockObjectMetadataItemOrThrow } from '~/testing/utils/getMockObjectMetadataItemOrThrow';
export type GetJestMetadataAndApolloMocksAndActionMenuWrapperProps = {
export type GetJestMetadataAndApolloMocksAndCommandMenuWrapperProps = {
apolloMocks:
| readonly MockedResponse<Record<string, any>, Record<string, any>>[]
| undefined;
@@ -20,7 +20,7 @@ export type GetJestMetadataAndApolloMocksAndActionMenuWrapperProps = {
componentInstanceId: string;
} & JestContextStoreSetterMocks;
export const getJestMetadataAndApolloMocksAndActionMenuWrapper = ({
export const getJestMetadataAndApolloMocksAndCommandMenuWrapper = ({
apolloMocks,
onInitializeJotaiStore,
contextStoreTargetedRecordsRule,
@@ -30,7 +30,7 @@ export const getJestMetadataAndApolloMocksAndActionMenuWrapper = ({
contextStoreCurrentObjectMetadataNameSingular,
contextStoreFilters,
componentInstanceId,
}: GetJestMetadataAndApolloMocksAndActionMenuWrapperProps) => {
}: GetJestMetadataAndApolloMocksAndCommandMenuWrapperProps) => {
const Wrapper = getJestMetadataAndApolloMocksWrapper({
apolloMocks,
onInitializeJotaiStore,
@@ -51,7 +51,7 @@ export const getJestMetadataAndApolloMocksAndActionMenuWrapper = ({
<ContextStoreComponentInstanceContext.Provider
value={{ instanceId: componentInstanceId }}
>
<ActionMenuComponentInstanceContext.Provider
<CommandMenuComponentInstanceContext.Provider
value={{
instanceId: componentInstanceId,
}}
@@ -74,7 +74,7 @@ export const getJestMetadataAndApolloMocksAndActionMenuWrapper = ({
{children}
</JestContextStoreSetter>
</JestRecordIndexContextProviderWrapper>
</ActionMenuComponentInstanceContext.Provider>
</CommandMenuComponentInstanceContext.Provider>
</ContextStoreComponentInstanceContext.Provider>
</Wrapper>
);