Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@
(
(SELECT persons.id AS id
FROM
(SELECT tupleElement(argMax(tuple(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties, 'name'), ''), 'null'), '^"|"$', '')), person.version), 1) AS properties___name,
(SELECT tupleElement(argMax(tuple(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties, 'name'), ''), 'null'), '^"|"$', '')), person.version), 1) AS properties___name,
person.id AS id
FROM person
Expand All @@ -487,6 +488,7 @@
WHERE and(equals(where_optimization.team_id, 99999), ifNull(equals(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(where_optimization.properties, 'name'), ''), 'null'), '^"|"$', ''), 'test'), 0)))))
GROUP BY person.id
HAVING and(ifNull(equals(tupleElement(argMax(tuple(person.is_deleted), person.version), 1), 0), 0), ifNull(less(tupleElement(argMax(tuple(toTimeZone(person.created_at, 'UTC')), person.version), 1), plus(now64(6, 'UTC'), toIntervalDay(1))), 0))) AS persons
HAVING and(ifNull(equals(tupleElement(argMax(tuple(person.is_deleted), person.version), 1), 0), 0), ifNull(less(tupleElement(argMax(tuple(toTimeZone(person.created_at, 'UTC')), person.version), 1), plus(now64(6, 'UTC'), toIntervalDay(1))), 0))) AS persons
WHERE ifNull(equals(persons.properties___name, 'test'), 0)
ORDER BY persons.id ASC
LIMIT 1000000000 SETTINGS optimize_aggregation_in_order=1,
Expand All @@ -505,6 +507,7 @@
e.distinct_id AS distinct_id
FROM events AS e
LEFT OUTER JOIN
(SELECT tupleElement(argMax(tuple(person_distinct_id_overrides.person_id), person_distinct_id_overrides.version), 1) AS person_id,
(SELECT tupleElement(argMax(tuple(person_distinct_id_overrides.person_id), person_distinct_id_overrides.version), 1) AS person_id,
person_distinct_id_overrides.distinct_id AS distinct_id
FROM person_distinct_id_overrides
Expand Down Expand Up @@ -572,6 +575,7 @@
(
(SELECT persons.id AS id
FROM
(SELECT tupleElement(argMax(tuple(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties, 'name'), ''), 'null'), '^"|"$', '')), person.version), 1) AS properties___name,
(SELECT tupleElement(argMax(tuple(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties, 'name'), ''), 'null'), '^"|"$', '')), person.version), 1) AS properties___name,
person.id AS id
FROM person
Expand All @@ -581,6 +585,7 @@
WHERE and(equals(where_optimization.team_id, 99999), ifNull(equals(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(where_optimization.properties, 'name'), ''), 'null'), '^"|"$', ''), 'test'), 0)))))
GROUP BY person.id
HAVING and(ifNull(equals(tupleElement(argMax(tuple(person.is_deleted), person.version), 1), 0), 0), ifNull(less(tupleElement(argMax(tuple(toTimeZone(person.created_at, 'UTC')), person.version), 1), plus(now64(6, 'UTC'), toIntervalDay(1))), 0))) AS persons
HAVING and(ifNull(equals(tupleElement(argMax(tuple(person.is_deleted), person.version), 1), 0), 0), ifNull(less(tupleElement(argMax(tuple(toTimeZone(person.created_at, 'UTC')), person.version), 1), plus(now64(6, 'UTC'), toIntervalDay(1))), 0))) AS persons
WHERE ifNull(equals(persons.properties___name, 'test'), 0)
ORDER BY persons.id ASC
LIMIT 1000000000 SETTINGS optimize_aggregation_in_order=1,
Expand All @@ -599,6 +604,7 @@
e.distinct_id AS distinct_id
FROM events AS e
LEFT OUTER JOIN
(SELECT tupleElement(argMax(tuple(person_distinct_id_overrides.person_id), person_distinct_id_overrides.version), 1) AS person_id,
(SELECT tupleElement(argMax(tuple(person_distinct_id_overrides.person_id), person_distinct_id_overrides.version), 1) AS person_id,
person_distinct_id_overrides.distinct_id AS distinct_id
FROM person_distinct_id_overrides
Expand Down
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.
10 changes: 8 additions & 2 deletions frontend/src/layout/scenes/components/SceneDivider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { LemonDivider } from '@posthog/lemon-ui'

export function SceneDivider(): JSX.Element | null {
return <LemonDivider className="scene-divider -mx-4 w-[calc(100%+var(--spacing)*8)]" />
import { cn } from 'lib/utils/css-classes'

export interface SceneDividerProps {
className?: string
}

export function SceneDivider({ className }: SceneDividerProps): JSX.Element {
return <LemonDivider className={cn('scene-divider -mx-4 w-[calc(100%+var(--spacing)*8)]', className)} />
}
7 changes: 5 additions & 2 deletions frontend/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3763,8 +3763,11 @@ const api = {
async update(surveyId: Survey['id'], data: Partial<Survey>): Promise<Survey> {
return await new ApiRequest().survey(surveyId).update({ data })
},
async getResponsesCount(): Promise<{ [key: string]: number }> {
return await new ApiRequest().surveysResponsesCount().get()
async getResponsesCount(surveyIds?: string): Promise<{ [key: string]: number }> {
return await new ApiRequest()
.surveysResponsesCount()
.withQueryString(surveyIds ? { survey_ids: surveyIds } : undefined)
.get()
},
async summarize_responses(
surveyId: Survey['id'],
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/lib/utils/eventUsageLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { objectClean } from 'lib/utils'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { BillingUsageInteractionProps } from 'scenes/billing/types'
import { SharedMetric } from 'scenes/experiments/SharedMetrics/sharedMetricLogic'
import { NewSurvey, SurveyTemplateType } from 'scenes/surveys/constants'
import { NewSurvey, SURVEY_CREATED_SOURCE, SurveyTemplateType } from 'scenes/surveys/constants'
import { userLogic } from 'scenes/userLogic'

import {
Expand Down Expand Up @@ -595,6 +595,10 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
survey,
}),
reportSurveyCreated: (survey: Survey, isDuplicate?: boolean) => ({ survey, isDuplicate }),
reportUserFeedbackButtonClicked: (source: SURVEY_CREATED_SOURCE, meta: Record<string, any>) => ({
source,
meta,
}),
reportSurveyEdited: (survey: Survey) => ({ survey }),
reportSurveyArchived: (survey: Survey) => ({ survey }),
reportSurveyTemplateClicked: (template: SurveyTemplateType) => ({ template }),
Expand Down Expand Up @@ -1478,6 +1482,12 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
end_date: survey.end_date,
})
},
reportUserFeedbackButtonClicked: ({ source, meta }) => {
posthog.capture('feedback button clicked', {
source,
...meta,
})
},
reportProductUnsubscribed: ({ product }) => {
const property_key = `unsubscribed_from_${product}`
posthog.capture('product unsubscribed', {
Expand Down
Loading
Loading