From 39792f5d98ea6b82c799a07f27acf24015c9daac Mon Sep 17 00:00:00 2001 From: pedrobonamin Date: Fri, 6 Sep 2024 14:10:22 +0200 Subject: [PATCH] wip --- .../timeline/expandableTimelineItemMenu.tsx | 35 ++++--------------- .../panes/document/timeline/timelineItem.tsx | 19 +++++++--- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/packages/sanity/src/structure/panes/document/timeline/expandableTimelineItemMenu.tsx b/packages/sanity/src/structure/panes/document/timeline/expandableTimelineItemMenu.tsx index 45139114fde5..14e2d6524732 100644 --- a/packages/sanity/src/structure/panes/document/timeline/expandableTimelineItemMenu.tsx +++ b/packages/sanity/src/structure/panes/document/timeline/expandableTimelineItemMenu.tsx @@ -2,10 +2,11 @@ import {Menu, usePortal} from '@sanity/ui' import {type MouseEvent, useCallback} from 'react' import {ContextMenuButton, useTranslation} from 'sanity' -import {MenuButton, MenuItem} from '../../../../ui-components' +import {Button, MenuButton, MenuItem} from '../../../../ui-components' import {structureLocaleNamespace} from '../../../i18n' import {TIMELINE_LIST_WRAPPER_ID} from './timeline' import {TIMELINE_MENU_PORTAL} from './timelineMenu' +import {ChevronDownIcon, LaunchIcon, LinkIcon} from '@sanity/icons' /** * This is a hack to force the scrollbar to not appear when the list is expanding, @@ -56,33 +57,9 @@ export function ExpandableTimelineItemMenu({ ) return ( - - } - menu={ - - - - } - popover={{ - // when used inside the timeline menu we want to keep the element inside the popover, to avoid closing the popover when clicking expand. - portal: portalContext.elements?.[TIMELINE_MENU_PORTAL] ? TIMELINE_MENU_PORTAL : true, - placement: 'bottom-end', - fallbackPlacements: ['left', 'left-end', 'left-start'], - }} - /> + <> +