The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Remove export action from the view options menu (#10517)
Raphaël Bosi24aca790f781
diff --git a/packages/twenty-e2e-testing/lib/pom/mainPage.ts b/packages/twenty-e2e-testing/lib/pom/mainPage.tsindex a28e133b575..23b4f478fd6 100644--- a/packages/twenty-e2e-testing/lib/pom/mainPage.ts+++ b/packages/twenty-e2e-testing/lib/pom/mainPage.ts@@ -23,7 +23,6 @@ export class MainPage {private readonly hiddenFieldsButton: Locator;private readonly editFieldsButton: Locator;private readonly importButton: Locator;- private readonly exportButton: Locator;private readonly deletedRecordsButton: Locator;private readonly createNewRecordButton: Locator;private readonly addToFavoritesButton: Locator;@@ -67,16 +66,12 @@ export class MainPage {this.importButton = page.getByTestId('tooltip').filter({ hasText: /^Import$/ });- this.exportButton = page- .getByTestId('tooltip')- .filter({ hasText: /^Export$/ });this.deletedRecordsButton = page.getByTestId('tooltip').filter({ hasText: /^Deleted */ });this.createNewRecordButton = page.getByTestId('add-button');this.addToFavoritesButton = page.getByText('Add to favorites');this.deleteFromFavoritesButton = page.getByText('Delete from favorites');- this.exportBottomBarButton = page.getByText('Export');this.deleteRecordsButton = page.getByText('Delete');}@@ -166,10 +161,6 @@ export class MainPage {await this.importButton.click();}- async clickExportButton() {- await this.exportButton.click();- }-async clickDeletedRecordsButton() {await this.deletedRecordsButton.click();}diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsxindex 6aa3a4ed54e..4185ca3f71c 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx@@ -1,7 +1,6 @@import { Key } from 'ts-key-enum';import {AppTooltip,- IconFileExport,IconFileImport,IconLayout,IconLayoutList,@@ -19,10 +18,6 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSiimport { useObjectOptionsForBoard } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsForBoard';import { useOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useOptionsDropdown';import { recordGroupFieldMetadataComponentState } from '@/object-record/record-group/states/recordGroupFieldMetadataComponentState';-import {- displayedExportProgress,- useExportRecords,-} from '@/object-record/record-index/export/hooks/useExportRecords';import { TableOptionsHotkeyScope } from '@/object-record/record-table/types/TableOptionsHotkeyScope';import { useOpenObjectRecordsSpreadsheetImportDialog } from '@/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreadsheetImportDialog';import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuHeader';@@ -33,9 +28,9 @@ import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/import { useGetCurrentView } from '@/views/hooks/useGetCurrentView';import { ViewType } from '@/views/types/ViewType';import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';+import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared';import { FeatureFlagKey } from '~/generated-metadata/graphql';-import { useLingui } from '@lingui/react/macro';export const ObjectOptionsDropdownMenuContent = () => {const { t } = useLingui();@@ -90,14 +85,6 @@ export const ObjectOptionsDropdownMenuContent = () => {objectMetadataItem.nameSingular,);- const { progress, download } = useExportRecords({- delayMs: 100,- filename: `${objectMetadataItem.nameSingular}.csv`,- objectMetadataItem,- recordIndexId,- viewType,- });-// TODO: Remove this once we have implemented Rich Text v2 and removed the old rich textconst canImportOrExport =objectMetadataItem.nameSingular !== CoreObjectNameSingular.Note &&@@ -167,21 +154,14 @@ export const ObjectOptionsDropdownMenuContent = () => {<DropdownMenuSeparator /><DropdownMenuItemsContainer>{canImportOrExport && (- <>- <MenuItem- onClick={download}- LeftIcon={IconFileExport}- text={displayedExportProgress(progress)}- />- <MenuItem- onClick={() => {- closeDropdown();- openObjectRecordsSpreasheetImportDialog();- }}- LeftIcon={IconFileImport}- text={t`Import`}- />- </>+ <MenuItem+ onClick={() => {+ closeDropdown();+ openObjectRecordsSpreasheetImportDialog();+ }}+ LeftIcon={IconFileImport}+ text={t`Import`}+ />)}<MenuItemonClick={() => {