Skip to content

Commit

Permalink
chore: remove old ingestion flow (#18667)
Browse files Browse the repository at this point in the history
* stop redirecting based on flag

* remove /ingestion

* fix import

* fix

* fix typo

* fix, make single-click work on products

* include initial billing limit info on subscribe success

* fix type
  • Loading branch information
raquelmsmith authored Nov 17, 2023
1 parent 271c01b commit 90651e9
Show file tree
Hide file tree
Showing 57 changed files with 59 additions and 2,956 deletions.
3 changes: 1 addition & 2 deletions frontend/src/layout/navigation-3000/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import './Navigation.scss'
import { themeLogic } from './themeLogic'
import { navigation3000Logic } from './navigationLogic'
import clsx from 'clsx'
import { Scene, SceneConfig } from 'scenes/sceneTypes'
import { SceneConfig } from 'scenes/sceneTypes'
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
import { FEATURE_FLAGS } from 'lib/constants'
import { SidePanel } from './sidepanel/SidePanel'
Expand All @@ -18,7 +18,6 @@ export function Navigation({
sceneConfig,
}: {
children: ReactNode
scene: Scene | null
sceneConfig: SceneConfig | null
}): JSX.Element {
useMountedLogic(themeLogic)
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/layout/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from 'clsx'
import { BillingAlertsV2 } from 'lib/components/BillingAlertsV2'
import { Scene, SceneConfig } from 'scenes/sceneTypes'
import { SceneConfig } from 'scenes/sceneTypes'
import { Breadcrumbs } from './Breadcrumbs/Breadcrumbs'
import { ProjectNotice } from './ProjectNotice'
import { SideBar } from './SideBar/SideBar'
Expand All @@ -9,16 +9,14 @@ import { ReactNode } from 'react'

export function Navigation({
children,
scene,
sceneConfig,
}: {
children: ReactNode
scene: Scene | null
sceneConfig: SceneConfig | null
}): JSX.Element {
return (
<div className="h-screen flex flex-col">
{scene !== Scene.Ingestion && <TopBar />}
<TopBar />
<SideBar>
<div
className={clsx(
Expand Down
14 changes: 9 additions & 5 deletions frontend/src/layout/navigation/ProjectNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { userLogic } from 'scenes/userLogic'
import { organizationLogic } from 'scenes/organizationLogic'
import { urls } from 'scenes/urls'
import { verifyEmailLogic } from 'scenes/authentication/signup/verify-email/verifyEmailLogic'
import { ProductKey } from '~/types'

interface ProjectNoticeBlueprint {
message: JSX.Element | string
Expand Down Expand Up @@ -44,11 +45,11 @@ export function ProjectNotice(): JSX.Element | null {
When you're ready, head on over to the{' '}
<Link
onClick={() => {
updateCurrentTeam(altTeamForIngestion?.id, urls.ingestion())
updateCurrentTeam(altTeamForIngestion?.id, urls.products())
}}
data-attr="demo-project-alt-team-ingestion_link"
>
ingestion wizard
onboarding wizard
</Link>{' '}
to get started with your own data.
</>
Expand All @@ -60,8 +61,11 @@ export function ProjectNotice(): JSX.Element | null {
message: (
<>
This project has no events yet. Go to the{' '}
<Link to="/ingestion" data-attr="real_project_with_no_events-ingestion_link">
ingestion wizard
<Link
to={urls.onboarding(ProductKey.PRODUCT_ANALYTICS)}
data-attr="real_project_with_no_events-ingestion_link"
>
onboarding wizard
</Link>{' '}
or grab your project API key/HTML snippet from{' '}
<Link to={urls.settings()} data-attr="real_project_with_no_events-settings">
Expand All @@ -71,7 +75,7 @@ export function ProjectNotice(): JSX.Element | null {
</>
),
action: {
to: '/ingestion',
to: urls.onboarding(ProductKey.PRODUCT_ANALYTICS),
'data-attr': 'demo-warning-cta',
icon: <IconSettings />,
children: 'Go to wizard',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('announcementLogic', () => {
})

it('hides announcements during the ingestion phase', async () => {
router.actions.push(urls.ingestion())
router.actions.push(urls.products())
await expectLogic(logic).toMatchValues({
cloudAnnouncement: DEFAULT_CLOUD_ANNOUNCEMENT,
shownAnnouncementType: null,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/layout/navigation/TopBar/announcementLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { router } from 'kea-router'
import { FEATURE_FLAGS, OrganizationMembershipLevel } from 'lib/constants'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { urls } from 'scenes/urls'
import { userLogic } from 'scenes/userLogic'
import { navigationLogic } from '../navigationLogic'
import posthog from 'posthog-js'
Expand Down Expand Up @@ -87,7 +86,8 @@ export const announcementLogic = kea<announcementLogicType>([
(closable &&
(closed ||
(relevantAnnouncementType && persistedClosedAnnouncements[relevantAnnouncementType]))) || // hide if already closed
pathname == urls.ingestion() // hide during the ingestion phase
pathname.includes('/onboarding') ||
pathname.includes('/products') // hide during the onboarding phase
) {
return null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { membersLogic } from 'scenes/organization/membersLogic'
import { pluginsLogic } from 'scenes/plugins/pluginsLogic'
import { teamLogic } from 'scenes/teamLogic'
import { navigationLogic } from '~/layout/navigation/navigationLogic'
import { EventDefinitionType, TeamBasicType } from '~/types'
import { EventDefinitionType, ProductKey, TeamBasicType } from '~/types'
import type { activationLogicType } from './activationLogicType'
import { urls } from 'scenes/urls'
import { savedInsightsLogic } from 'scenes/saved-insights/savedInsightsLogic'
Expand Down Expand Up @@ -327,7 +327,7 @@ export const activationLogic = kea<activationLogicType>([
runTask: async ({ id }) => {
switch (id) {
case ActivationTasks.IngestFirstEvent:
router.actions.push(urls.ingestion())
router.actions.push(urls.onboarding(ProductKey.PRODUCT_ANALYTICS))
break
case ActivationTasks.InviteTeamMember:
actions.showInviteModal()
Expand Down
95 changes: 8 additions & 87 deletions frontend/src/lib/utils/eventUsageLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import type { Dayjs } from 'lib/dayjs'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { convertPropertyGroupToProperties } from 'lib/utils'
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { PlatformType, Framework } from 'scenes/ingestion/types'
import { now } from 'lib/dayjs'
import {
isFilterWithDisplay,
Expand Down Expand Up @@ -332,7 +331,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
) => ({ attribute, originalLength, newLength }),
reportDashboardShareToggled: (isShared: boolean) => ({ isShared }),
reportUpgradeModalShown: (featureName: string) => ({ featureName }),
reportIngestionLandingSeen: true,
reportTimezoneComponentViewed: (
component: 'label' | 'indicator',
project_timezone?: string,
Expand Down Expand Up @@ -439,27 +437,11 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
reportInsightOpenedFromRecentInsightList: true,
reportRecordingOpenedFromRecentRecordingList: true,
reportPersonOpenedFromNewlySeenPersonsList: true,
reportIngestionSelectPlatformType: (platform: PlatformType) => ({ platform }),
reportIngestionSelectFrameworkType: (framework: Framework) => ({ framework }),
reportIngestionRecordingsTurnedOff: (
session_recording_opt_in: boolean,
capture_console_log_opt_in: boolean,
capture_performance_opt_in: boolean
) => ({ session_recording_opt_in, capture_console_log_opt_in, capture_performance_opt_in }),
reportIngestionAutocaptureToggled: (autocapture_opt_out: boolean) => ({ autocapture_opt_out }),
reportIngestionAutocaptureExceptionsToggled: (autocapture_opt_in: boolean) => ({ autocapture_opt_in }),
reportIngestionHelpClicked: (type: string) => ({ type }),
reportIngestionTryWithBookmarkletClicked: true,
reportIngestionTryWithDemoDataClicked: true,
reportIngestionContinueWithoutVerifying: true,
reportIngestionContinueWithoutBilling: true,
reportIngestionBillingCancelled: true,
reportIngestionThirdPartyAboutClicked: (name: string) => ({ name }),
reportIngestionThirdPartyConfigureClicked: (name: string) => ({ name }),
reportIngestionThirdPartyPluginInstalled: (name: string) => ({ name }),
reportAutocaptureToggled: (autocapture_opt_out: boolean) => ({ autocapture_opt_out }),
reportAutocaptureExceptionsToggled: (autocapture_opt_in: boolean) => ({ autocapture_opt_in }),
reportFailedToCreateFeatureFlagWithCohort: (code: string, detail: string) => ({ code, detail }),
reportInviteMembersButtonClicked: true,
reportIngestionSidebarButtonClicked: (name: string) => ({ name }),
reportDashboardLoadingTime: (loadingMilliseconds: number, dashboardId: number) => ({
loadingMilliseconds,
dashboardId,
Expand Down Expand Up @@ -794,9 +776,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
}
posthog.capture('test account filters updated', payload)
},
reportIngestionLandingSeen: async () => {
posthog.capture('ingestion landing seen')
},

reportInsightFilterRemoved: async ({ index }) => {
posthog.capture('local filter removed', { index })
Expand Down Expand Up @@ -1049,70 +1028,17 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
reportPersonOpenedFromNewlySeenPersonsList: () => {
posthog.capture('person opened from newly seen persons list')
},
reportIngestionSelectPlatformType: ({ platform }) => {
posthog.capture('ingestion select platform type', {
platform: platform,
})
},
reportIngestionSelectFrameworkType: ({ framework }) => {
posthog.capture('ingestion select framework type', {
framework: framework,
})
},
reportIngestionRecordingsTurnedOff: ({
session_recording_opt_in,
capture_console_log_opt_in,
capture_performance_opt_in,
}) => {
posthog.capture('ingestion recordings turned off', {
session_recording_opt_in,
capture_console_log_opt_in,
capture_performance_opt_in,
})
},
reportIngestionAutocaptureToggled: ({ autocapture_opt_out }) => {
posthog.capture('ingestion autocapture toggled', {
autocapture_opt_out,
})
},
reportIngestionAutocaptureExceptionsToggled: ({ autocapture_opt_in }) => {
posthog.capture('ingestion autocapture exceptions toggled', {
autocapture_opt_in,
})
},
reportIngestionHelpClicked: ({ type }) => {
posthog.capture('ingestion help clicked', {
type: type,
})
},
reportIngestionTryWithBookmarkletClicked: () => {
posthog.capture('ingestion try posthog with bookmarklet clicked')
},
reportIngestionTryWithDemoDataClicked: () => {
posthog.capture('ingestion try posthog with demo data clicked')
},
reportIngestionContinueWithoutVerifying: () => {
posthog.capture('ingestion continue without verifying')
},
reportIngestionContinueWithoutBilling: () => {
posthog.capture('ingestion continue without adding billing details')
},
reportIngestionBillingCancelled: () => {
posthog.capture('ingestion billing cancelled')
},
reportIngestionThirdPartyAboutClicked: ({ name }) => {
posthog.capture('ingestion third party about clicked', {
name: name,
})
},
reportIngestionThirdPartyConfigureClicked: ({ name }) => {
posthog.capture('ingestion third party configure clicked', {
name: name,
reportAutocaptureToggled: ({ autocapture_opt_out }) => {
posthog.capture('autocapture toggled', {
autocapture_opt_out,
})
},
reportIngestionThirdPartyPluginInstalled: ({ name }) => {
posthog.capture('report ingestion third party plugin installed', {
name: name,
reportAutocaptureExceptionsToggled: ({ autocapture_opt_in }) => {
posthog.capture('autocapture exceptions toggled', {
autocapture_opt_in,
})
},
reportFailedToCreateFeatureFlagWithCohort: ({ detail, code }) => {
Expand All @@ -1121,11 +1047,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
reportInviteMembersButtonClicked: () => {
posthog.capture('invite members button clicked')
},
reportIngestionSidebarButtonClicked: ({ name }) => {
posthog.capture('ingestion sidebar button clicked', {
name: name,
})
},
reportTeamSettingChange: ({ name, value }) => {
posthog.capture(`${name} team setting updated`, {
setting: name,
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/scenes/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ function AppScene(): JSX.Element | null {

return (
<>
<Navigation scene={activeScene} sceneConfig={sceneConfig}>
{wrappedSceneElement}
</Navigation>
<Navigation sceneConfig={sceneConfig}>{wrappedSceneElement}</Navigation>
{toastContainer}
<GlobalModals />
</>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/scenes/appScenes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const appScenes: Record<Scene, () => any> = {
[Scene.PreflightCheck]: () => import('./PreflightCheck/PreflightCheck'),
[Scene.Signup]: () => import('./authentication/signup/SignupContainer'),
[Scene.InviteSignup]: () => import('./authentication/InviteSignup'),
[Scene.Ingestion]: () => import('./ingestion/IngestionWizard'),
[Scene.Billing]: () => import('./billing/Billing'),
[Scene.Apps]: () => import('./plugins/AppsScene'),
[Scene.FrontendAppScene]: () => import('./apps/FrontendAppScene'),
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/scenes/billing/billingLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { userLogic } from 'scenes/userLogic'
import { pluralize } from 'lib/utils'
import type { billingLogicType } from './billingLogicType'
import { forms } from 'kea-forms'
import { urls } from 'scenes/urls'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'

export const ALLOCATION_THRESHOLD_ALERT = 0.85 // Threshold to show warning of event usage near limit
Expand Down Expand Up @@ -77,9 +76,7 @@ export const billingLogic = kea<billingLogicType>([
'' as string,
{
setRedirectPath: () => {
return window.location.pathname.includes('/ingestion')
? urls.ingestion() + '/billing'
: window.location.pathname.includes('/onboarding')
return window.location.pathname.includes('/onboarding')
? window.location.pathname + window.location.search
: ''
},
Expand All @@ -88,7 +85,7 @@ export const billingLogic = kea<billingLogicType>([
isOnboarding: [
false,
{
setIsOnboarding: () => window.location.pathname.includes('/ingestion'),
setIsOnboarding: () => window.location.pathname.includes('/onboarding'),
},
],
}),
Expand Down
35 changes: 0 additions & 35 deletions frontend/src/scenes/ingestion/CardContainer.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions frontend/src/scenes/ingestion/IngestionInviteMembersButton.tsx

This file was deleted.

Loading

0 comments on commit 90651e9

Please sign in to comment.