From dcf83ad3c16bc9226c4bcb9bcefba161c9751470 Mon Sep 17 00:00:00 2001 From: Li Yi Date: Tue, 13 Feb 2024 18:57:43 -0500 Subject: [PATCH] add explore more results button --- frontend/src/scenes/surveys/SurveyView.tsx | 26 ++++++++++++++++++- frontend/src/scenes/surveys/surveyViewViz.tsx | 4 +-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/frontend/src/scenes/surveys/SurveyView.tsx b/frontend/src/scenes/surveys/SurveyView.tsx index 7cc725516e593..5a17feafd67c9 100644 --- a/frontend/src/scenes/surveys/SurveyView.tsx +++ b/frontend/src/scenes/surveys/SurveyView.tsx @@ -13,10 +13,11 @@ import { LemonTabs } from 'lib/lemon-ui/LemonTabs' import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { capitalizeFirstLetter, pluralize } from 'lib/utils' import { useEffect, useState } from 'react' +import { urls } from 'scenes/urls' import { Query } from '~/queries/Query/Query' import { NodeKind } from '~/queries/schema' -import { PropertyFilterType, PropertyOperator, Survey, SurveyQuestionType, SurveyType } from '~/types' +import { InsightType, PropertyFilterType, PropertyOperator, Survey, SurveyQuestionType, SurveyType } from '~/types' import { SURVEY_EVENT_NAME } from './constants' import { SurveyReleaseSummary } from './Survey' @@ -316,6 +317,29 @@ export function SurveyResult({ disableEventsTable }: { disableEventsTable?: bool } })} +
+ + Explore results + +
{!disableEventsTable && (surveyLoading ? : )} ) diff --git a/frontend/src/scenes/surveys/surveyViewViz.tsx b/frontend/src/scenes/surveys/surveyViewViz.tsx index 906069dc0a75a..a83929d1e6cfd 100644 --- a/frontend/src/scenes/surveys/surveyViewViz.tsx +++ b/frontend/src/scenes/surveys/surveyViewViz.tsx @@ -36,8 +36,8 @@ const formatCount = (count: number, total: number): string => { export function UsersCount({ surveyUserStats }: { surveyUserStats: SurveyUserStats }): JSX.Element { const { seen, dismissed, sent } = surveyUserStats const total = seen + dismissed + sent - const labelTotal = total === 1 ? 'Unique user viewed' : 'Unique users viewed' - const labelSent = sent === 1 ? 'Response submitted' : 'Responses submitted' + const labelTotal = total === 1 ? 'Unique user shown' : 'Unique users shown' + const labelSent = sent === 1 ? 'Response sent' : 'Responses sent' return (