[COMMAND MENU ITEMS] Remove deprecated code (#19199)

This PR is the first one of a cleanup after upgrading command menu items
to V2.
This commit is contained in:
Raphaël Bosi
2026-04-01 17:56:52 +02:00
committed by GitHub
parent e6fe48b66d
commit 9f95c4763c
137 changed files with 2216 additions and 6613 deletions
@@ -11,12 +11,10 @@ import { PageHeaderToggleSidePanelButton } from '@/ui/layout/page-header/compone
import { PageHeader } from '@/ui/layout/page/components/PageHeader';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { FeatureFlagKey } from '~/generated-metadata/graphql';
const StyledTitleWithSelectedRecords = styled.div`
display: flex;
@@ -69,9 +67,6 @@ export const RecordIndexPageHeader = () => {
const isLayoutCustomizationModeEnabled = useAtomStateValue(
isLayoutCustomizationModeEnabledState,
);
const isCommandMenuItemEnabled = useIsFeatureEnabled(
FeatureFlagKey.IS_COMMAND_MENU_ITEM_ENABLED,
);
return (
<PageHeader
@@ -83,10 +78,8 @@ export const RecordIndexPageHeader = () => {
{isDefined(contextStoreCurrentViewId) && (
<>
<RecordIndexCommandMenu />
{isCommandMenuItemEnabled ? (
!isLayoutCustomizationModeEnabled && (
<CommandMenuItemMoreActionsButton />
)
{!isLayoutCustomizationModeEnabled ? (
<CommandMenuItemMoreActionsButton />
) : (
<PageHeaderToggleSidePanelButton />
)}