From cf56288447ce46757934bdd301a41e485f5a6469 Mon Sep 17 00:00:00 2001 From: Basit <1305718+mabaasit@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:08:37 +0200 Subject: [PATCH] chore: remove hackolade COMPASS-7974 (#5860) * disable hackolade * remove hackolade completely --- .../src/preferences-schema.ts | 13 --- .../src/components/compass-schema.tsx | 4 +- .../src/components/promo-banner.tsx | 90 ------------------- packages/compass-web/src/entrypoint.tsx | 1 - 4 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 packages/compass-schema/src/components/promo-banner.tsx diff --git a/packages/compass-preferences-model/src/preferences-schema.ts b/packages/compass-preferences-model/src/preferences-schema.ts index d12e2a1b5d9..09fd42c75c8 100644 --- a/packages/compass-preferences-model/src/preferences-schema.ts +++ b/packages/compass-preferences-model/src/preferences-schema.ts @@ -55,7 +55,6 @@ export type UserConfigurablePreferences = PermanentFeatureFlags & enableAggregationBuilderRunPipeline: boolean; enableAggregationBuilderExtraOptions: boolean; enableGenAISampleDocumentPassing: boolean; - enableHackoladeBanner: boolean; enablePerformanceAdvisorBanner: boolean; maximumNumberOfActiveConnections?: number; }; @@ -720,18 +719,6 @@ export const storedUserPreferencesProps: Required<{ type: 'boolean', }, - enableHackoladeBanner: { - ui: true, - cli: true, - global: true, - description: { - short: - 'Show Hackolade banner to users for data modeling and schema design', - }, - validator: z.boolean().default(true), - type: 'boolean', - }, - enablePerformanceAdvisorBanner: { ui: true, cli: true, diff --git a/packages/compass-schema/src/components/compass-schema.tsx b/packages/compass-schema/src/components/compass-schema.tsx index e2b3c4d8e81..a25fcd50e89 100644 --- a/packages/compass-schema/src/components/compass-schema.tsx +++ b/packages/compass-schema/src/components/compass-schema.tsx @@ -29,7 +29,6 @@ import { Badge, Icon, } from '@mongodb-js/compass-components'; -import { HackoladePromoBanner } from './promo-banner'; import type { configureActions } from '../actions'; import { usePreference } from 'compass-preferences-model/provider'; import { useConnectionInfo } from '@mongodb-js/compass-connections/provider'; @@ -65,6 +64,7 @@ const contentStyles = css({ display: 'flex', flexDirection: 'column', gap: spacing[3], + height: '100%', }); const insightsBadgeStyles = css({ @@ -386,7 +386,6 @@ const Schema: React.FunctionComponent<{ const outdated = useIsLastAppliedQueryOutdated('schema'); - const enableHackoladeBanner = usePreference('enableHackoladeBanner'); const enablePerformanceAdvisorBanner = usePreference( 'enablePerformanceAdvisorBanner' ); @@ -408,7 +407,6 @@ const Schema: React.FunctionComponent<{ >
{enablePerformanceAdvisorBanner && } - {enableHackoladeBanner && } {analysisState === ANALYSIS_STATE_INITIAL && ( )} diff --git a/packages/compass-schema/src/components/promo-banner.tsx b/packages/compass-schema/src/components/promo-banner.tsx deleted file mode 100644 index 5ca252d4b74..00000000000 --- a/packages/compass-schema/src/components/promo-banner.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import { - css, - cx, - Link, - palette, - spacing, - useDarkMode, - Body, -} from '@mongodb-js/compass-components'; -import { useLoggerAndTelemetry } from '@mongodb-js/compass-logging/provider'; - -const iconSize = spacing[5]; - -const bannerBodyStyles = css({ - display: 'flex', - alignItems: 'center', - gap: spacing[3], - paddingTop: spacing[2], - paddingBottom: spacing[2], - paddingLeft: spacing[3], - paddingRight: spacing[3], - borderRadius: '12px', -}); - -const bannerBodyLightModeStyles = css({ - backgroundColor: palette.gray.light3, - boxShadow: `inset 0 0 0 1px ${palette.gray.light2}`, -}); - -const bannerBodyDarkModeStyles = css({ - backgroundColor: palette.gray.dark3, - boxShadow: `inset 0 0 0 1px ${palette.gray.dark2}`, -}); - -const bannerIconStyles = css({ - width: iconSize, - height: iconSize, - flex: 'none', -}); - -const bannerTextStyles = css({ - flex: 'none', -}); - -const bannerLinkStyles = css({ - flex: 'none', - marginLeft: 'auto', -}); - -export const HackoladePromoBanner: React.FunctionComponent = () => { - const { track } = useLoggerAndTelemetry('COMPASS-SCHEMA-UI'); - const darkMode = useDarkMode(); - return ( - - - - - - - - - - Looking for data modeling tools? - - { - track('Hackolade Link Clicked'); - }} - > - Check out Hackolade Studio. - - - ); -}; diff --git a/packages/compass-web/src/entrypoint.tsx b/packages/compass-web/src/entrypoint.tsx index 358f2ff4214..e0781827973 100644 --- a/packages/compass-web/src/entrypoint.tsx +++ b/packages/compass-web/src/entrypoint.tsx @@ -269,7 +269,6 @@ const CompassWeb = ({ enableImportExport: false, enableGenAIFeatures: false, enableNewMultipleConnectionSystem: false, - enableHackoladeBanner: false, enablePerformanceAdvisorBanner: true, cloudFeatureRolloutAccess: { GEN_AI_COMPASS: false,