diff --git a/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--dark.png b/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--dark.png index 6d4e94f59d95b..00c3ef784c458 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--dark.png and b/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--light.png b/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--light.png index a4d1c03591a0c..7f1124a16d059 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--light.png and b/frontend/__snapshots__/scenes-app-surveys--surveys-global-settings--light.png differ diff --git a/frontend/src/scenes/surveys/Surveys.tsx b/frontend/src/scenes/surveys/Surveys.tsx index d63fc293da025..12485ace3a77a 100644 --- a/frontend/src/scenes/surveys/Surveys.tsx +++ b/frontend/src/scenes/surveys/Surveys.tsx @@ -31,6 +31,7 @@ import stringWithWBR from 'lib/utils/stringWithWBR' import { useState } from 'react' import { LinkedHogFunctions } from 'scenes/pipeline/hogfunctions/list/LinkedHogFunctions' import { SceneExport } from 'scenes/sceneTypes' +import { SurveyAppearancePreview } from 'scenes/surveys/SurveyAppearancePreview' import { Customization } from 'scenes/surveys/SurveyCustomization' import { teamLogic } from 'scenes/teamLogic' import { urls } from 'scenes/urls' @@ -38,7 +39,7 @@ import { userLogic } from 'scenes/userLogic' import { ActivityScope, ProductKey, ProgressStatus, Survey } from '~/types' -import { defaultSurveyAppearance, SurveyQuestionLabel } from './constants' +import { defaultSurveyAppearance, NEW_SURVEY, SurveyQuestionLabel } from './constants' import { openSurveysSettingsDialog } from './SurveySettings' import { getSurveyStatus, surveysLogic, SurveysTabs } from './surveysLogic' @@ -69,6 +70,12 @@ export function Surveys(): JSX.Element { const [editableSurveyConfig, setEditableSurveyConfig] = useState( currentTeam?.survey_config?.appearance || defaultSurveyAppearance ) + + const [templatedSurvey, setTemplatedSurvey] = useState(NEW_SURVEY) + + if (templatedSurvey.appearance === defaultSurveyAppearance) { + templatedSurvey.appearance = editableSurveyConfig + } const shouldShowEmptyState = !surveysLoading && surveys.length === 0 const showLinkedHogFunctions = useFeatureFlag('HOG_FUNCTIONS_LINKED') @@ -152,9 +159,8 @@ export function Surveys(): JSX.Element { )} -