feat: CommandMenuItem entity and FrontComponent support in command menu (#17555)

https://github.com/user-attachments/assets/6f172ffc-d43d-42fd-a26b-94f591fb767e
This commit is contained in:
Abdul Rahman
2026-01-30 22:05:06 +05:30
committed by GitHub
parent 6462ff6c5f
commit 51a2a90b0a
45 changed files with 899 additions and 34 deletions
@@ -0,0 +1,16 @@
import { viewableFrontComponentIdComponentState } from '@/command-menu/pages/front-component/states/viewableFrontComponentIdComponentState';
import { FrontComponentRenderer } from '@/front-components/components/FrontComponentRenderer';
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
import { isDefined } from 'twenty-shared/utils';
export const CommandMenuFrontComponentPage = () => {
const viewableFrontComponentId = useRecoilComponentValue(
viewableFrontComponentIdComponentState,
);
if (!isDefined(viewableFrontComponentId)) {
return null;
}
return <FrontComponentRenderer frontComponentId={viewableFrontComponentId} />;
};
@@ -0,0 +1,10 @@
import { CommandMenuPageComponentInstanceContext } from '@/command-menu/states/contexts/CommandMenuPageComponentInstanceContext';
import { createComponentState } from '@/ui/utilities/state/component-state/utils/createComponentState';
export const viewableFrontComponentIdComponentState = createComponentState<
string | null
>({
key: 'command-menu/viewable-front-component-id',
defaultValue: null,
componentInstanceContext: CommandMenuPageComponentInstanceContext,
});