-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: allow hogql property queries in replay filtering #26176
base: master
Are you sure you want to change the base?
Changes from 1 commit
f1d1551
416c61b
055f2c3
d3d8c2f
7b35837
b630acd
3b82878
9f5b54c
647faa9
1454b13
00794a3
438c075
29de030
54a0650
57b6cda
1a77a19
efcfad2
62f2a63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
import { actionsModel } from '~/models/actionsModel' | ||
import { cohortsModel } from '~/models/cohortsModel' | ||
import { AndOrFilterSelect } from '~/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect' | ||
import { NodeKind } from '~/queries/schema' | ||
import { RecordingUniversalFilters, UniversalFiltersGroup } from '~/types' | ||
|
||
import { DurationFilter } from './DurationFilter' | ||
|
@@ -109,6 +110,8 @@ | |
TaxonomicFilterGroupType.Cohorts, | ||
TaxonomicFilterGroupType.PersonProperties, | ||
TaxonomicFilterGroupType.SessionProperties, | ||
TaxonomicFilterGroupType.FeatureFlags, | ||
TaxonomicFilterGroupType.HogQLExpression, | ||
]} | ||
onChange={(filterGroup) => setFilters({ filter_group: filterGroup })} | ||
> | ||
|
@@ -144,6 +147,7 @@ | |
onRemove={() => removeGroupValue(index)} | ||
onChange={(value) => replaceGroupValue(index, value)} | ||
initiallyOpen={allowInitiallyOpen} | ||
metadataSource={{ kind: NodeKind.RecordingsQuery }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need something here to correct the autocomplete There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need a query runner in python for the recordings query |
||
/> | ||
) | ||
})} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import { loaders } from 'kea-loaders' | |
import { actionToUrl, router, urlToAction } from 'kea-router' | ||
import { subscriptions } from 'kea-subscriptions' | ||
import api from 'lib/api' | ||
import { isAnyPropertyfilter } from 'lib/components/PropertyFilters/utils' | ||
import { isAnyPropertyfilter, isHogQLPropertyFilter } from 'lib/components/PropertyFilters/utils' | ||
import { DEFAULT_UNIVERSAL_GROUP_FILTER } from 'lib/components/UniversalFilters/universalFiltersLogic' | ||
import { | ||
isActionFilter, | ||
|
@@ -120,6 +120,8 @@ export function convertUniversalFiltersToRecordingsQuery(universalFilters: Recor | |
actions.push(f) | ||
} else if (isLogEntryPropertyFilter(f)) { | ||
console_log_filters.push(f) | ||
} else if (isHogQLPropertyFilter(f)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this "just works"™ |
||
properties.push(f) | ||
} else if (isAnyPropertyfilter(f)) { | ||
if (isRecordingPropertyFilter(f)) { | ||
if (f.key === 'visited_page') { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hogql property filters don't have an item so this needs to be slightly safer