Skip to content

Commit

Permalink
chore: remove signup benefits feature flag (#21835)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield authored Apr 25, 2024
1 parent 06fe778 commit a9c1d3c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 77 deletions.
Binary file modified frontend/__snapshots__/scenes-other-signup--cloud--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-other-signup--cloud--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-other-signup--self-hosted--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ export const FEATURE_FLAGS = {
POSTHOG_3000_NAV: 'posthog-3000-nav', // owner: @Twixes
HEDGEHOG_MODE: 'hedgehog-mode', // owner: @benjackwhite
HEDGEHOG_MODE_DEBUG: 'hedgehog-mode-debug', // owner: @benjackwhite
SIGNUP_BENEFITS: 'signup-benefits', // experiment, owner: @zlwaterfield
WEB_ANALYTICS: 'web-analytics', // owner @robbie-c #team-web-analytics
WEB_ANALYTICS_SAMPLING: 'web-analytics-sampling', // owner @robbie-c #team-web-analytics
HIGH_FREQUENCY_BATCH_EXPORTS: 'high-frequency-batch-exports', // owner: @tomasfarias
Expand Down
91 changes: 15 additions & 76 deletions frontend/src/scenes/authentication/signup/SignupContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@ import { IconCheckCircle } from '@posthog/icons'
import { useValues } from 'kea'
import { router } from 'kea-router'
import { BridgePage } from 'lib/components/BridgePage/BridgePage'
import { CustomerLogo } from 'lib/components/CustomerLogo'
import { CLOUD_HOSTNAMES, FEATURE_FLAGS } from 'lib/constants'
import { CLOUD_HOSTNAMES } from 'lib/constants'
import { Link } from 'lib/lemon-ui/Link'
import { featureFlagLogic, FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
import { ReactNode } from 'react'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { SceneExport } from 'scenes/sceneTypes'
import { userLogic } from 'scenes/userLogic'

import { Region } from '~/types'

import airbus from '../../../lib/customers/airbus.svg'
import hasura from '../../../lib/customers/hasura.svg'
import staples from '../../../lib/customers/staples.svg'
import yCombinator from '../../../lib/customers/y-combinator.svg'
import { SignupForm } from './signupForm/SignupForm'

export const scene: SceneExport = {
Expand Down Expand Up @@ -52,83 +45,29 @@ export function SignupContainer(): JSX.Element | null {
) : null
}

type ProductBenefit = {
benefit: string
description: string | ReactNode
}

const getProductBenefits = (featureFlags: FeatureFlagsSet): ProductBenefit[] => {
const signupBenefitsFlag = featureFlags[FEATURE_FLAGS.SIGNUP_BENEFITS]
switch (signupBenefitsFlag) {
case 'generic-language':
return [
{
benefit: 'Free usage every month - even on paid plans',
description: '1M free events, 5K free session recordings, and more. Every month. Forever.',
},
{
benefit: 'Start collecting data immediately',
description: 'Integrate with developer-friendly APIs or a low-code web snippet.',
},
{
benefit: 'Join industry leaders that run on PostHog',
description:
'Airbus, Hasura, Y Combinator, Staples, and thousands more trust PostHog as their Product OS.',
},
]
case 'logos':
return [
{
benefit: '1M events free every month',
description: 'Product analytics, feature flags, experiments, and more.',
},
{
benefit: 'Start collecting events immediately',
description: 'Integrate with developer-friendly APIs or use our easy autocapture script.',
},
{
benefit: 'Join industry leaders that run on PostHog',
description: (
<div className="grid grid-cols-2 gap-2 mt-2">
{[airbus, hasura, yCombinator, staples].map((company, i) => (
<span key={i}>
<CustomerLogo image={company} alt={company} />
</span>
))}
</div>
),
},
]
default:
return [
{
benefit: 'Free for 1M events every month',
description: 'Product analytics, feature flags, experiments, and more.',
},
{
benefit: 'Start collecting events immediately',
description: 'Integrate with developer-friendly APIs or use our easy autocapture script.',
},
{
benefit: 'Join industry leaders that run on PostHog',
description:
'Airbus, Hasura, Y Combinator, Staples, and thousands more trust PostHog as their Product OS.',
},
]
}
}
const productBenefits = [
{
benefit: 'Free usage every month - even on paid plans',
description: '1M free events, 5K free session recordings, and more. Every month. Forever.',
},
{
benefit: 'Start collecting data immediately',
description: 'Integrate with developer-friendly APIs or a low-code web snippet.',
},
{
benefit: 'Join industry leaders that run on PostHog',
description: 'Airbus, Hasura, Y Combinator, Staples, and thousands more trust PostHog as their Product OS.',
},
]

export function SignupLeftContainer(): JSX.Element {
const { preflight } = useValues(preflightLogic)
const { featureFlags } = useValues(featureFlagLogic)

const getRegionUrl = (region: string): string => {
const { pathname, search, hash } = router.values.currentLocation
return `https://${CLOUD_HOSTNAMES[region]}${pathname}${search}${hash}`
}

const productBenefits = getProductBenefits(featureFlags)

return (
<>
<div className="mb-16 max-w-100">
Expand Down

0 comments on commit a9c1d3c

Please sign in to comment.