Compare commits

...
Author SHA1 Message Date
Abdul Rahman e5782ab95c Refactor SidePanelEdit components to streamline props and imports
- Moved `SidePanelGroup` and `SidePanelList` imports to the correct location in `SidePanelEditLinkItemView.tsx`.
- Removed the `moveToFolderHasSubMenu` prop from `SidePanelEditOrganizeActions` and adjusted its usage accordingly.
- Simplified the handling of the `hasSubMenu` property in the `SelectableListItem` component.
2026-03-24 05:13:12 +05:30
2 changed files with 3 additions and 6 deletions
@@ -5,14 +5,14 @@ import { ensureAbsoluteUrl } from 'twenty-shared/utils';
import { type NavigationMenuItem } from '~/generated-metadata/graphql';
import { extractDomainFromUrl } from '@/navigation-menu-item/display/link/utils/extractDomainFromUrl';
import { SidePanelGroup } from '@/side-panel/components/SidePanelGroup';
import { SidePanelList } from '@/side-panel/components/SidePanelList';
import {
type OrganizeActionsProps,
SidePanelEditOrganizeActions,
} from '@/navigation-menu-item/edit/side-panel/components/SidePanelEditOrganizeActions';
import { SidePanelEditOwnerSection } from '@/navigation-menu-item/edit/side-panel/components/SidePanelEditOwnerSection';
import { getOrganizeActionsSelectableItemIds } from '@/navigation-menu-item/edit/side-panel/utils/getOrganizeActionsSelectableItemIds';
import { SidePanelGroup } from '@/side-panel/components/SidePanelGroup';
import { SidePanelList } from '@/side-panel/components/SidePanelList';
import { TextInput } from '@/ui/input/components/TextInput';
type SidePanelEditLinkItemViewProps = OrganizeActionsProps & {
@@ -93,7 +93,6 @@ export const SidePanelEditLinkItemView = ({
onAddAfter={onAddAfter}
showMoveToFolder
onMoveToFolder={onOpenFolderPicker}
moveToFolderHasSubMenu
/>
<SidePanelEditOwnerSection applicationId={selectedItem.applicationId} />
</SidePanelList>
@@ -26,7 +26,6 @@ export type OrganizeActionsProps = {
type SidePanelEditOrganizeActionsProps = OrganizeActionsProps & {
showMoveToFolder?: boolean;
onMoveToFolder?: () => void;
moveToFolderHasSubMenu?: boolean;
};
export const SidePanelEditOrganizeActions = ({
@@ -39,7 +38,6 @@ export const SidePanelEditOrganizeActions = ({
onAddAfter,
showMoveToFolder = false,
onMoveToFolder,
moveToFolderHasSubMenu = false,
}: SidePanelEditOrganizeActionsProps) => {
const { t } = useLingui();
@@ -78,7 +76,7 @@ export const SidePanelEditOrganizeActions = ({
Icon={IconFolderSymlink}
label={t`Move to folder`}
id={SidePanelNavigationItemActions.MOVE_TO_FOLDER}
hasSubMenu={moveToFolderHasSubMenu}
hasSubMenu
onClick={onMoveToFolder}
/>
</SelectableListItem>