diff --git a/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png b/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png
index 0e0372679513e..29f658fac2fb8 100644
Binary files a/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png and b/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png
index 0874beff87993..73ef96ff35115 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png
index 4b24320571880..47ef343bc3320 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png
index b6d6f129d5e66..7cd7d0f64cc9a 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png
index 6e392b8df0d66..db6f0a7f56163 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png
index 25b04de448810..f12b8d5746aed 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png
index 37d7e61ada6ff..e974d14deaf29 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png
index 1d63db0eb5a55..5f8f362dc80f4 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png
index e3c5c6ec54b5e..0aead0fac3794 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png
index bb468c41d7099..772ae64573f6a 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png
index ad880846e725c..73a6ac1fbc6d5 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png
index 18412c611e842..12e54f3f008bd 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png differ
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png
index 63cf76f8cfa5d..42e13f4b8326e 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png differ
diff --git a/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png b/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png
index 3da026a0c3c8b..142d66d3f95df 100644
Binary files a/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png and b/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey-customisation-section.png b/frontend/__snapshots__/scenes-app-surveys--new-survey-customisation-section.png
index cf0010952c39e..1d6ad686f014a 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey-customisation-section.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey-customisation-section.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey.png b/frontend/__snapshots__/scenes-app-surveys--new-survey.png
index c913a0d5189b7..6f4ec6febda70 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey.png differ
diff --git a/frontend/src/layout/navigation/SideBar/SideBar.tsx b/frontend/src/layout/navigation/SideBar/SideBar.tsx
index 4983ab4222ad1..c37c2f0284631 100644
--- a/frontend/src/layout/navigation/SideBar/SideBar.tsx
+++ b/frontend/src/layout/navigation/SideBar/SideBar.tsx
@@ -194,19 +194,18 @@ function Pages(): JSX.Element {
!preflight?.instance_preferences?.disable_paid_fs) && (
} identifier={Scene.Experiments} to={urls.experiments()} />
)}
- }
- identifier={Scene.EarlyAccessFeatures}
- title={'Early Access Management'}
- to={urls.earlyAccessFeatures()}
- />
-
}
identifier={Scene.Surveys}
title={'Surveys'}
to={urls.surveys()}
- highlight="beta"
+ highlight="new"
+ />
+ }
+ identifier={Scene.EarlyAccessFeatures}
+ title={'Early Access Management'}
+ to={urls.earlyAccessFeatures()}
/>
Data
diff --git a/frontend/src/lib/components/PayGateMini/PayGateMini.tsx b/frontend/src/lib/components/PayGateMini/PayGateMini.tsx
index f1ba0bdf475dd..3431660481dcc 100644
--- a/frontend/src/lib/components/PayGateMini/PayGateMini.tsx
+++ b/frontend/src/lib/components/PayGateMini/PayGateMini.tsx
@@ -6,7 +6,6 @@ import { IconEmojiPeople, IconLightBulb, IconLock, IconPremium } from 'lib/lemon
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import './PayGateMini.scss'
import { FEATURE_MINIMUM_PLAN, POSTHOG_CLOUD_STANDARD_PLAN } from 'lib/constants'
-import { capitalizeFirstLetter } from 'lib/utils'
import clsx from 'clsx'
type PayGateSupportedFeatures =
@@ -16,6 +15,8 @@ type PayGateSupportedFeatures =
| AvailableFeature.ROLE_BASED_ACCESS
| AvailableFeature.CORRELATION_ANALYSIS
| AvailableFeature.PATHS_ADVANCED
+ | AvailableFeature.SURVEYS_STYLING
+ | AvailableFeature.SURVEYS_TEXT_HTML
export interface PayGateMiniProps {
feature: PayGateSupportedFeatures
@@ -69,6 +70,16 @@ const FEATURE_SUMMARIES: Record<
umbrella: 'advanced analysis capabilities',
docsHref: 'https://posthog.com/manual/paths',
},
+ [AvailableFeature.SURVEYS_STYLING]: {
+ description: 'Customize the look and feel of your surveys with custom colors and positions.',
+ umbrella: 'surveys customization',
+ docsHref: 'https://posthog.com/docs/surveys',
+ },
+ [AvailableFeature.SURVEYS_TEXT_HTML]: {
+ description: 'Use HTML to customize the content of your surveys.',
+ umbrella: 'surveys customization',
+ docsHref: 'https://posthog.com/docs/surveys',
+ },
}
/** A sort of paywall for premium features.
@@ -87,7 +98,7 @@ export function PayGateMini({
const featureSummary = FEATURE_SUMMARIES[feature]
const planRequired = FEATURE_MINIMUM_PLAN[feature]
- let gateVariant: 'add-card' | 'contact-sales' | 'check-licensing' | null = null
+ let gateVariant: 'add-card' | 'contact-sales' | 'subscribe' | null = null
if (!overrideShouldShowGate && !hasAvailableFeature(feature)) {
if (preflight?.cloud) {
if (planRequired === POSTHOG_CLOUD_STANDARD_PLAN) {
@@ -96,7 +107,7 @@ export function PayGateMini({
gateVariant = 'contact-sales'
}
} else {
- gateVariant = 'check-licensing'
+ gateVariant = 'subscribe'
}
}
@@ -109,8 +120,7 @@ export function PayGateMini({
{featureSummary.icon || }
{featureSummary.description}
- Upgrade to {gateVariant === 'add-card' ? 'a premium' : `the ${capitalizeFirstLetter(planRequired)}`}{' '}
- plan to gain {featureSummary.umbrella}.
+ Subscribe to gain {featureSummary.umbrella}.
{featureSummary.docsHref && (
<>
{' '}
@@ -126,8 +136,8 @@ export function PayGateMini({
? '/organization/billing'
: gateVariant === 'contact-sales'
? `mailto:sales@posthog.com?subject=Inquiring about ${featureSummary.umbrella}`
- : gateVariant === 'check-licensing'
- ? 'https://posthog.com/pricing'
+ : gateVariant === 'subscribe'
+ ? '/organization/billing'
: undefined
}
type="secondary"
@@ -138,7 +148,7 @@ export function PayGateMini({
? 'Upgrade now'
: gateVariant === 'contact-sales'
? 'Contact sales'
- : 'Explore license options'}
+ : 'Subscribe'}
) : (
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index fd25cde2002a9..ad523af4aa576 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -143,7 +143,6 @@ export const FEATURE_FLAGS = {
HEDGEHOG_MODE_DEBUG: 'hedgehog-mode-debug', // owner: @benjackwhite
AUTO_REDIRECT: 'auto-redirect', // owner: @lharries
GENERIC_SIGNUP_BENEFITS: 'generic-signup-benefits', // experiment, owner: @raquelmsmith
- SURVEYS_POSITIONS: 'surveys-positions', // owner: @liyiy
WEB_ANALYTICS: 'web-analytics', // owner @robbie-c #team-web-analytics
HIGH_FREQUENCY_BATCH_EXPORTS: 'high-frequency-batch-exports', // owner: @tomasfarias
// owner: team monitoring, only to be enabled for PostHog team testing
@@ -162,7 +161,7 @@ export const FEATURE_FLAGS = {
WEBHOOKS_DENYLIST: 'webhooks-denylist', // owner: #team-pipeline
SURVEYS_MULTIPLE_QUESTIONS: 'surveys-multiple-questions', // owner: @liyiy
SURVEYS_RESULTS_VISUALIZATIONS: 'surveys-results-visualizations', // owner: @jurajmajerik
- SURVEYS_NEW_CREATION_FLOW: 'surveys-new-creation-flow', // owner: @liyiy
+ SURVEYS_PAYGATES: 'surveys-paygates',
CONSOLE_RECORDING_SEARCH: 'console-recording-search', // owner: #team-monitoring
PERSONS_HOGQL_QUERY: 'persons-hogql-query', // owner: @mariusandra
} as const
@@ -194,6 +193,9 @@ export const FEATURE_MINIMUM_PLAN: Partial
[AvailableFeature.ROLE_BASED_ACCESS]: LicensePlan.Enterprise,
[AvailableFeature.RECORDINGS_FILE_EXPORT]: LicensePlan.Scale,
[AvailableFeature.RECORDINGS_PERFORMANCE]: LicensePlan.Scale,
+ [AvailableFeature.SURVEYS_STYLING]: LicensePlan.Scale,
+ [AvailableFeature.SURVEYS_MULTIPLE_QUESTIONS]: LicensePlan.Scale,
+ [AvailableFeature.SURVEYS_TEXT_HTML]: LicensePlan.Scale,
}
export const ENTITY_MATCH_TYPE = 'entities'
diff --git a/frontend/src/scenes/surveys/SurveyAppearance.tsx b/frontend/src/scenes/surveys/SurveyAppearance.tsx
index ed3fc50036ce0..1f53d80ae234e 100644
--- a/frontend/src/scenes/surveys/SurveyAppearance.tsx
+++ b/frontend/src/scenes/surveys/SurveyAppearance.tsx
@@ -6,6 +6,7 @@ import {
RatingSurveyQuestion,
SurveyQuestionType,
MultipleSurveyQuestion,
+ AvailableFeature,
} from '~/types'
import { defaultSurveyAppearance } from './constants'
import {
@@ -22,9 +23,8 @@ import {
import { surveysLogic } from './surveysLogic'
import { useValues } from 'kea'
import React, { useEffect, useRef, useState } from 'react'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { sanitize } from 'dompurify'
+import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'
interface SurveyAppearanceProps {
type: SurveyQuestionType
@@ -134,45 +134,61 @@ export function SurveyAppearance({
}
export function Customization({ appearance, surveyQuestionItem, onAppearanceChange }: CustomizationProps): JSX.Element {
- const { whitelabelAvailable } = useValues(surveysLogic)
- const { featureFlags } = useValues(featureFlagLogic)
+ const { whitelabelAvailable, surveysStylingAvailable } = useValues(surveysLogic)
+
return (
+ {!surveysStylingAvailable && (
+
+ <>>
+
+ )}
+
Button text
+
onAppearanceChange({ ...appearance, submitButtonText })}
+ />
Background color
onAppearanceChange({ ...appearance, backgroundColor })}
+ disabled={!surveysStylingAvailable}
/>
Border color
onAppearanceChange({ ...appearance, borderColor })}
+ disabled={!surveysStylingAvailable}
/>
- {featureFlags[FEATURE_FLAGS.SURVEYS_POSITIONS] && (
- <>
- Position
-
- {['left', 'center', 'right'].map((position) => {
- return (
- onAppearanceChange({ ...appearance, position })}
- active={appearance.position === position}
- >
- {position}
-
- )
- })}
-
- >
- )}
+ <>
+ Position
+
+ {['left', 'center', 'right'].map((position) => {
+ return (
+ onAppearanceChange({ ...appearance, position })}
+ active={appearance.position === position}
+ disabledReason={
+ surveysStylingAvailable
+ ? null
+ : 'Subscribe to surveys to customize survey position.'
+ }
+ >
+ {position}
+
+ )
+ })}
+
+ >
{surveyQuestionItem.type === SurveyQuestionType.Rating && (
<>
Rating button color
onAppearanceChange({ ...appearance, ratingButtonColor })}
+ disabled={!surveysStylingAvailable}
/>
Rating button active color
onAppearanceChange({ ...appearance, ratingButtonActiveColor })
}
+ disabled={!surveysStylingAvailable}
/>
>
)}
@@ -187,11 +204,7 @@ export function Customization({ appearance, surveyQuestionItem, onAppearanceChan
onAppearanceChange({ ...appearance, submitButtonColor })}
- />
- Button text
- onAppearanceChange({ ...appearance, submitButtonText })}
+ disabled={!surveysStylingAvailable}
/>
{surveyQuestionItem.type === SurveyQuestionType.Open && (
<>
@@ -199,6 +212,7 @@ export function Customization({ appearance, surveyQuestionItem, onAppearanceChan
onAppearanceChange({ ...appearance, placeholder })}
+ disabled={!surveysStylingAvailable}
/>
>
)}
diff --git a/frontend/src/scenes/surveys/SurveyEdit.tsx b/frontend/src/scenes/surveys/SurveyEdit.tsx
index 9b8b0b41f8a08..6bc86e4b64760 100644
--- a/frontend/src/scenes/surveys/SurveyEdit.tsx
+++ b/frontend/src/scenes/surveys/SurveyEdit.tsx
@@ -21,9 +21,10 @@ import {
LinkSurveyQuestion,
RatingSurveyQuestion,
SurveyUrlMatchType,
+ AvailableFeature,
} from '~/types'
import { FlagSelector } from 'scenes/early-access-features/EarlyAccessFeature'
-import { IconCancel, IconDelete, IconPlus, IconPlusMini } from 'lib/lemon-ui/icons'
+import { IconCancel, IconDelete, IconLock, IconPlus, IconPlusMini } from 'lib/lemon-ui/icons'
import {
BaseAppearance,
Customization,
@@ -45,6 +46,8 @@ import { CodeEditor } from 'lib/components/CodeEditors'
import { FEATURE_FLAGS } from 'lib/constants'
import { featureFlagLogic as enabledFeaturesLogic } from 'lib/logic/featureFlagLogic'
import { SurveyFormAppearance } from './SurveyFormAppearance'
+import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'
+import { surveysLogic } from './surveysLogic'
function PresentationTypeCard({
title,
@@ -98,6 +101,7 @@ export default function SurveyEdit(): JSX.Element {
setSelectedQuestion,
setSelectedSection,
} = useActions(surveyLogic)
+ const { surveysMultipleQuestionsAvailable } = useValues(surveysLogic)
const { featureFlags } = useValues(enabledFeaturesLogic)
return (
@@ -554,7 +558,10 @@ export default function SurveyEdit(): JSX.Element {
placeholder="ex: Thank you for your feedback!"
/>
-
+
{featureFlags[FEATURE_FLAGS.SURVEYS_MULTIPLE_QUESTIONS] && (
- // TODO: Add pay gate mini here once billing is resolved for it
}
+ sideIcon={
}
+ disabledReason={
+ surveysMultipleQuestionsAvailable
+ ? null
+ : 'Subscribe for multiple question surveys'
+ }
onClick={() => {
setSurveyValue('questions', [
...survey.questions,
@@ -924,6 +936,7 @@ export function HTMLEditor({
setWritingHTMLDescription: (writingHTML: boolean) => void
textPlaceholder?: string
}): JSX.Element {
+ const { surveysHTMLAvailable } = useValues(surveysLogic)
return (
<>
HTML,
+ label: (
+
+ HTML
+ {!surveysHTMLAvailable && }
+
+ ),
content: (
-
onChange(v ?? '')}
- height={150}
- options={{
- minimap: {
- enabled: false,
- },
- scrollbar: {
- alwaysConsumeMouseWheel: false,
- },
- wordWrap: 'on',
- scrollBeyondLastLine: false,
- automaticLayout: true,
- fixedOverflowWidgets: true,
- lineNumbers: 'off',
- glyphMargin: false,
- folding: false,
- }}
- />
+ {surveysHTMLAvailable ? (
+ onChange(v ?? '')}
+ height={150}
+ options={{
+ minimap: {
+ enabled: false,
+ },
+ scrollbar: {
+ alwaysConsumeMouseWheel: false,
+ },
+ wordWrap: 'on',
+ scrollBeyondLastLine: false,
+ automaticLayout: true,
+ fixedOverflowWidgets: true,
+ lineNumbers: 'off',
+ glyphMargin: false,
+ folding: false,
+ }}
+ />
+ ) : (
+
+ onChange(v ?? '')}
+ height={150}
+ options={{
+ minimap: {
+ enabled: false,
+ },
+ scrollbar: {
+ alwaysConsumeMouseWheel: false,
+ },
+ wordWrap: 'on',
+ scrollBeyondLastLine: false,
+ automaticLayout: true,
+ fixedOverflowWidgets: true,
+ lineNumbers: 'off',
+ glyphMargin: false,
+ folding: false,
+ }}
+ />
+
+ )}
),
},
diff --git a/frontend/src/scenes/surveys/surveysLogic.tsx b/frontend/src/scenes/surveys/surveysLogic.tsx
index f5789021e74d1..ca2d8ceb951b6 100644
--- a/frontend/src/scenes/surveys/surveysLogic.tsx
+++ b/frontend/src/scenes/surveys/surveysLogic.tsx
@@ -10,6 +10,8 @@ import { lemonToast } from '@posthog/lemon-ui'
import { userLogic } from 'scenes/userLogic'
import { router } from 'kea-router'
import { LemonSelectOption } from 'lib/lemon-ui/LemonSelect'
+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
+import { FEATURE_FLAGS } from 'lib/constants'
import { teamLogic } from 'scenes/teamLogic'
export function getSurveyStatus(survey: Survey): ProgressStatus {
@@ -34,7 +36,14 @@ interface SurveysCreators {
export const surveysLogic = kea([
path(['scenes', 'surveys', 'surveysLogic']),
connect(() => ({
- values: [userLogic, ['user'], teamLogic, ['currentTeam', 'currentTeamLoading']],
+ values: [
+ userLogic,
+ ['hasAvailableFeature'],
+ teamLogic,
+ ['currentTeam', 'currentTeamLoading'],
+ featureFlagLogic,
+ ['featureFlags'],
+ ],
actions: [teamLogic, ['loadCurrentTeam']],
})),
actions({
@@ -164,9 +173,25 @@ export const surveysLogic = kea([
return response
},
],
+ payGateFlagOn: [(s) => [s.featureFlags], (featureFlags) => featureFlags[FEATURE_FLAGS.SURVEYS_PAYGATES]],
whitelabelAvailable: [
- (s) => [s.user],
- (user) => (user?.organization?.available_features || []).includes(AvailableFeature.WHITE_LABELLING),
+ (s) => [s.hasAvailableFeature],
+ (hasAvailableFeature) => hasAvailableFeature(AvailableFeature.WHITE_LABELLING),
+ ],
+ surveysStylingAvailable: [
+ (s) => [s.hasAvailableFeature, s.payGateFlagOn],
+ (hasAvailableFeature, payGateFlagOn) =>
+ !payGateFlagOn || (payGateFlagOn && hasAvailableFeature(AvailableFeature.SURVEYS_STYLING)),
+ ],
+ surveysHTMLAvailable: [
+ (s) => [s.hasAvailableFeature, s.payGateFlagOn],
+ (hasAvailableFeature, payGateFlagOn) =>
+ !payGateFlagOn || (payGateFlagOn && hasAvailableFeature(AvailableFeature.SURVEYS_TEXT_HTML)),
+ ],
+ surveysMultipleQuestionsAvailable: [
+ (s) => [s.hasAvailableFeature, s.payGateFlagOn],
+ (hasAvailableFeature, payGateFlagOn) =>
+ !payGateFlagOn || (payGateFlagOn && hasAvailableFeature(AvailableFeature.SURVEYS_MULTIPLE_QUESTIONS)),
],
showSurveysDisabledBanner: [
(s) => [s.currentTeam, s.currentTeamLoading, s.surveys],
diff --git a/frontend/src/types.ts b/frontend/src/types.ts
index 39444841413ef..81ed7c8c32fbe 100644
--- a/frontend/src/types.ts
+++ b/frontend/src/types.ts
@@ -87,6 +87,9 @@ export enum AvailableFeature {
BESPOKE_PRICING = 'bespoke_pricing',
INVOICE_PAYMENTS = 'invoice_payments',
SUPPORT_SLAS = 'support_slas',
+ SURVEYS_STYLING = 'surveys_styling',
+ SURVEYS_TEXT_HTML = 'surveys_text_html',
+ SURVEYS_MULTIPLE_QUESTIONS = 'surveys_multiple_questions',
}
export type AvailableProductFeature = {
diff --git a/posthog/constants.py b/posthog/constants.py
index e7ef03baf7014..3beb8ca12b3b9 100644
--- a/posthog/constants.py
+++ b/posthog/constants.py
@@ -33,6 +33,9 @@ class AvailableFeature(str, Enum):
ROLE_BASED_ACCESS = "role_based_access"
RECORDINGS_FILE_EXPORT = "recordings_file_export"
RECORDINGS_PERFORMANCE = "recordings_performance"
+ SURVEYS_STYLING = "surveys_styling"
+ SURVEYS_TEXT_HTML = "surveys_text_html"
+ SURVEYS_MULTIPLE_QUESTIONS = "surveys_multiple_questions"
TREND_FILTER_TYPE_ACTIONS = "actions"