Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(data-exploration): convert funnel properties correlation table #14992

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
4 changes: 2 additions & 2 deletions frontend/src/scenes/funnels/funnelCorrelationFeedbackLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { keyForInsightLogicProps } from 'scenes/insights/sharedUtils'

import type { funnelCorrelationFeedbackLogicType } from './funnelCorrelationFeedbackLogicType'
import { funnelLogic } from './funnelLogic'
import { InsightLogicProps } from '~/types'
import { funnelCorrelationLogic } from './funnelCorrelationLogic'
import { funnelPropertyCorrelationLogic } from './funnelPropertyCorrelationLogic'

export const funnelCorrelationFeedbackLogic = kea<funnelCorrelationFeedbackLogicType>([
props({} as InsightLogicProps),
Expand All @@ -17,7 +17,7 @@ export const funnelCorrelationFeedbackLogic = kea<funnelCorrelationFeedbackLogic
actions: [
funnelCorrelationLogic(props),
['loadEventCorrelations'],
funnelLogic(props),
funnelPropertyCorrelationLogic(props),
['loadPropertyCorrelations'],
],
})),
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/scenes/funnels/funnelCorrelationLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const funnelCorrelationLogic = kea<funnelCorrelationLogicType>([
},
}),
selectors({
// apiParams for data exploration and legacy mode
apiParams: [
(s) => [s.isUsingDataExploration, s.dataExplorationApiParams, s.legacyApiParams],
(isUsingDataExploration, dataExplorationApiParams, legacyApiParams) => {
Expand All @@ -162,6 +163,15 @@ export const funnelCorrelationLogic = kea<funnelCorrelationLogicType>([
return cleanedParams
},
],
// aggregationGroupTypeIndex for data exploration and legacy mode
aggregationGroupTypeIndex: [
(s) => [s.isUsingDataExploration, s.querySource, s.filters],
(isUsingDataExploration, querySource, filters) => {
return isUsingDataExploration
? querySource?.aggregation_group_type_index
: filters?.aggregation_group_type_index
},
],

// event correlation
correlationValues: [
Expand Down
26 changes: 14 additions & 12 deletions frontend/src/scenes/funnels/funnelCorrelationUsageLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { parseEventAndProperty } from './funnelUtils'
import { funnelLogic } from './funnelLogic'
import { funnelDataLogic } from './funnelDataLogic'
import { funnelCorrelationLogic } from './funnelCorrelationLogic'
import { funnelPropertyCorrelationLogic } from './funnelPropertyCorrelationLogic'

export const funnelCorrelationUsageLogic = kea<funnelCorrelationUsageLogicType>([
props({} as InsightLogicProps),
Expand All @@ -21,30 +22,31 @@ export const funnelCorrelationUsageLogic = kea<funnelCorrelationUsageLogicType>(
connect((props: InsightLogicProps) => ({
logic: [eventUsageLogic],

values: [insightLogic(props), ['filters', 'isInDashboardContext'], funnelLogic(props), ['allProperties']],
values: [
insightLogic(props),
['filters', 'isInDashboardContext'],
funnelPropertyCorrelationLogic(props),
['allProperties'],
],

actions: [
insightLogic(props),
['loadResultsSuccess'],
insightDataLogic(props),
['loadDataSuccess'],
funnelLogic(props),
[
'hideSkewWarning as legacyHideSkewWarning',
'setPropertyCorrelationTypes',
'excludePropertyFromProject',
'setPropertyNames',
'openCorrelationPersonsModal',
],
['hideSkewWarning as legacyHideSkewWarning', 'openCorrelationPersonsModal'],
funnelDataLogic(props),
['hideSkewWarning'],
funnelCorrelationLogic(props),
[
'setCorrelationTypes',
'excludeEventFromProject',
'loadEventWithPropertyCorrelations',
'excludeEventPropertyFromProject',
],
funnelDataLogic(props),
['hideSkewWarning'],
insightDataLogic(props),
['loadDataSuccess'],
funnelPropertyCorrelationLogic(props),
['setPropertyCorrelationTypes', 'excludePropertyFromProject', 'setPropertyNames'],
eventUsageLogic,
['reportCorrelationViewed', 'reportCorrelationInteraction'],
],
Expand Down
Loading