Deprecate share email thread (#9319)

## Context

Following this https://github.com/twentyhq/twenty/issues/4199
This has not been fully implemented, after 5months of dead code I'm
removing the feature for the time being until we re-prioritise the
feature (unlikely during these next 6 months) to keep the codebase a bit
cleaner (no need to maintain dead features)

Feel free to reopen / revert this PR once feature is ready

## Test
locally after importing emails
This commit is contained in:
Weiko
2025-01-02 16:22:29 +01:00
committed by GitHub
parent 0dff20775b
commit 866c29e9ee
14 changed files with 54 additions and 220 deletions

View File

@ -9,7 +9,6 @@ import { isNewViewableRecordLoadingState } from '@/object-record/record-right-dr
import { viewableRecordIdState } from '@/object-record/record-right-drawer/states/viewableRecordIdState';
import { viewableRecordNameSingularState } from '@/object-record/record-right-drawer/states/viewableRecordNameSingularState';
import { RightDrawerTopBarCloseButton } from '@/ui/layout/right-drawer/components/RightDrawerTopBarCloseButton';
import { RightDrawerTopBarDropdownButton } from '@/ui/layout/right-drawer/components/RightDrawerTopBarDropdownButton';
import { RightDrawerTopBarExpandButton } from '@/ui/layout/right-drawer/components/RightDrawerTopBarExpandButton';
import { RightDrawerTopBarMinimizeButton } from '@/ui/layout/right-drawer/components/RightDrawerTopBarMinimizeButton';
import { StyledRightDrawerTopBar } from '@/ui/layout/right-drawer/components/StyledRightDrawerTopBar';
@ -118,7 +117,6 @@ export const RightDrawerTopBar = () => {
</StyledMinimizeTopBarTitleContainer>
)}
<StyledTopBarWrapper>
<RightDrawerTopBarDropdownButton />
{!isMobile && !isRightDrawerMinimized && (
<RightDrawerTopBarMinimizeButton />
)}

View File

@ -1,27 +0,0 @@
import { MessageThreadSubscribersTopBar } from '@/activities/right-drawer/components/MessageThreadSubscribersTopBar';
import { isRightDrawerMinimizedState } from '@/ui/layout/right-drawer/states/isRightDrawerMinimizedState';
import { rightDrawerPageState } from '@/ui/layout/right-drawer/states/rightDrawerPageState';
import { ComponentByRightDrawerPage } from '@/ui/layout/right-drawer/types/ComponentByRightDrawerPage';
import { RightDrawerPages } from '@/ui/layout/right-drawer/types/RightDrawerPages';
import { useRecoilState } from 'recoil';
import { isDefined } from 'twenty-ui';
const RIGHT_DRAWER_TOP_BAR_DROPDOWN_BUTTON_CONFIG: ComponentByRightDrawerPage =
{
[RightDrawerPages.ViewEmailThread]: <MessageThreadSubscribersTopBar />,
};
export const RightDrawerTopBarDropdownButton = () => {
const [isRightDrawerMinimized] = useRecoilState(isRightDrawerMinimizedState);
const [rightDrawerPage] = useRecoilState(rightDrawerPageState);
if (isRightDrawerMinimized || !isDefined(rightDrawerPage)) {
return null;
}
const dropdownButtonComponent =
RIGHT_DRAWER_TOP_BAR_DROPDOWN_BUTTON_CONFIG[rightDrawerPage];
return dropdownButtonComponent ?? <></>;
};