* Kea-ify `guardAvailableFeature`
* Fix `RestrictedArea` tooltip placement
* Don't needlessly fetch all org fields in available features sync
Fetching all fields is especially painful when there's a field-adding migration that hasn't ran yet, as Django selects fields explicitly, and when it does that with a field it knows about but the DB doesn't yet, the whole query fails. And because `sync_all_organization_available_features` is ran on Django server start, the server fails to start, refusing to hot reload again until a full server restart.
* Revert "Revert "Swap out old paths querying class with new (#5821)" (#5886)"
This reverts commit 82ef50a1e7.
* remove old ref
* test 3.9 general
* test if there's overlapping
* change version back
* swap out old paths querying class with new
* swap arguments
* swap name
* delete old CH paths file
* dont error out in calculate_by_filter
* write some backwards compatible tests for paths
* remove expanding autocapture element ability
* cleanup
* delete old code
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
* WIP: flamegraphs
* Get flame graphs generating
* Add files to bin
* Crude frontend for analyzing
* Hack: Use a stable clickhouse host instead of conn pool for flamegraphs
Otherwise no way to get back measurements due to LB.
* Error handling
* Only allow read queries
* Hide query analyze button for non-owners
* Make sure non-admins can't run queries
* Fix query issue
* Optimize UI around session recordings
* Round seconds in duration
* Force Recordings column to a reasonable size
* minor tweaks
* Add tests for duration second-rounding
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Adjust `SessionRecordingsButton` behavior for a single recording
* Fix a comment and try to fix E2E tests
* minor style adjustments
* adjust icon
* Fix bug with `SessionRecordingsButton` re-rendered too much
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* selector for boolean/variant
* update frontend forms
* persist updated values for flag variants
* input validation && error msgs
* add/remove variants
* change behavior of adding variant
* focus new field on add
* more focus management
* popconfirm to avoid losing data
* button to distribute variants equally
* hide multivariate UI behind feature flag
* change FF name
* Refactor `PersonModal` and clean related components up a little
* Improve footer button conditions
* Remove unused vars
* "Personalize" "people" and "users"
* set up card layout and insight search
* add more filters
* clean up table
* dropdown actions
* clean up
* fixes
* date from filter
* proper date filtering
* prettier
* search_fields filters are not case insensitive
* various adjustments
* clean up
* split nested ternary into if statements
* UX updates
* add saved insights to storybook
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* initial storybook setup
* fix storybook babel config
* add two stories
* don't load if loaded
* make sure preflightLogic is loaded
* more examples for propertyKeyInfo
* kea storybook provider
* expose getReduxState on dev instances to make stories fast
* history for kea story provider
* remove old kea provider
* stories for insights
* stories for events
* fix .mdx support
* fix preloadedState type
* add step order picker
* actually add the thing I implemented
* tooltips and styling
* adjust copy
* margin
* use options prop in Select
* check for clickhouse, fix B -> A
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Hide "Dropped off" for the initial funnel step
* Clean funnels styling up
* Fix horizontal bars mode styling
* Adjust for #5605
* Show "completed step" percentage for all steps again
* load the funnel after the logic mounts, not after the component
* move logicFromInsight to another file to avoid recursive imports of funnelLogic and insightLogic
* take last applied filters directly from results
* fix type
* more meaningful default key
* add some props (WIP)
* only run insight query start/end tracking if on insights
* fix some types
* load the funnel only if valid to do so; prevents initial "loaded, but error" state
* remove debug
* still call startQuery/endQuery on insightLogic
* convert dashboardLogic to TS
* fix more ts errors
* fix more TS errors
* save last used filters with results
* fix type import path for typegen
* custom tooltip component and typing for actions
* change delay to 500ms
* cautionary comment
* debouncing visible
* dont introduce new html element into tooltip, use cloneElement instead
* add prop types and default override prop to tooltip
* Improve insight refreshing UX
* Clean up
* Make sure `ComputationTimeAndRefresh` is on the right in Trends too
* Fix typing and some inconsistencies
* Remove unused const
* Update test_clickhouse_insights.py
* Update decorators.py
* Refactor `ComputationTimeWithRefresh` into own file
* pull description into its own reuseable component
* working object tags for insights
* refactor editing toast and add insight description editing
* insight name editing and split up huge insights component
* fix toast bug
* typing
* test fixes and clean up
* test something
* add cypress tests
* bug fixes
* test with user logic dashboard collab instead
* history is now a link button
* hide under saved insights feature flag
* skip tests for now
* prettier
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* allow cohort breakdown to show
* Sanitize `order` in `Entity.__init__`
* Remove kludge from #5485 by making `entity.order` useful in practice
* Use synthetic `index` instead of user-provided `order`
* Fix `processed_entities` sorting
* Update frontend/src/scenes/funnels/funnelLogic.ts
Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>
* change type guard and add number back
* remove typeguard and add correct types for cohorts
* remove type change
* working cohort breakdowns ui
* one more type fix
* adjust tests
* adjust tests
* more test adjustmenet
* minor syntax change
* use breakdown type
* add comment
* remove leakover
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>
Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
* Use official rrweb version again and update
* Bump rrweb to 1.0.2 (from 1.0.1)
* Use updated `@posthog/react-rrweb-player`
Co-authored-by: Michael Matloka <dev@twixes.com>
Got feedback that it was very confusing whether the filter is applied as is, or in negation. (as is makes sense for properties, but makes very little sense for cohorts, since internal users cohort size <<< external users cohort size)
* report from dashboard on insight viewed
* report person modal
* abstract filter sanitization and report cohort creation
* report insight viewed after 10s
* change to insight analyzed
* add popover to calculate funnels
* wrong prop
* remove local state
* hide people table if not valid filter
* more accurate comparison
* dirty state alert
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* pass in funnel_step_breakdown param for persons modal
* add comment
* allow clicking on drop off part of the funnel bar
* fix funnel persons modal titling
* small fixes
* ellipses man
* add FunnelStepTable with titles
* Finish v1 of table
* hide some info on step 0
* visibility toggles per breakdown in table
* breakdown visibility toggles affect graph
* clean up types and dedupe rowKeys
* clean up styling of leftmost column
* address changes
* use memoized values in bar chart
* fix table overflow styling
* fix persons modal; show only when steps > 1
* show only on Steps view
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* get default event name directly from django
* default event name in the backend
* fix "~/" urls in jest tests
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* count display update
* do not reload list of people when loading more people
* Revert "do not reload list of people when loading more people"
This reverts commit eb9ef11690.
* fix flag
* separate initial loading state
* update title with "+", fix person/persons
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* funnel trends is clickhouse only
* don't show graph type if there's only one option
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* fix funnel reload bug with changed filters
* remove the type so we could autocomplete feature flag strings
* hide breakdown from time & trends graphs, remove the param when switching to them for safety
* positive check
* clarify arg name
* remove needless flag
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* handle persons modal navigation better
* clean up excess pesronModal actions/values, move people to loader
* fix person modal not opening on funnels
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* steps with breakdown is already validated
* finally make dashboards render 🙌
* abstract new funnels from FunnelViz component
* refactor basic styles
* post-merge fix
* fix text overflow in event name
* funnels base UI on dashboard
* disable bar tooltip on dashboard
* Revert "disable bar tooltip on dashboard"
This reverts commit 4ba814ff2e.
* fix auto height on dashboards
* colored dashboards support
* full color support
* set layout as a filter param
* save funnel layout on backend
* proper scrolling in dashboards
* restore average conversion time
* only one layout for histograms
* fix bar graph margin that's causing a scrollbar
* fix person modal not opening on funnels
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* various time conversion bugs
* pass real network "Error"s to endQuery in order to show an error on 500
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Fix:Funnel drop off user list title is confusing (/buggy?)
* Handle Negative Step
* Conditionally Render The String
* Update frontend/src/scenes/funnels/funnelLogic.ts
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
* prettier
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* funnel trends persons call
* hide nonfunctioning funnel graph display options
* undo date year conversion
* avoid forced typing
* clean up and add comment
* use funnel_viz_type param for funnel graphs
* fix funnel_viz_type param router replacement bug
* fix types and potential display param bug
* funnel trends should not be an option for non-clickhouse
* reuse existing filters
* patch white screen death bug
* type predicate
* undo prettier
* add all steps option
* all steps working; add total and mean time to convert
* change display type checks to use enum
* kea types
* dangling console log
* Add average conversion time to time to convert results
* respond to feedabck
* responsive histogram sizes
* merged @Twixes backend changes; adjust data shape on frontend; add responsiveness to histogram
* add tooltip label
* adjust copy and tooltip
* minor tweaks
* respond to general feedback
* kea auto
* better empty state:
* error handling null time bins
* fix tests
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* init TaxonomicPropertyFilter based on Tabbed variant
* InfiniteSelectResults
* infinite loader state mgmt
* set local state on select
* set by name, not id
* list and filter static values
* value search & loading anim
* allow selecting operator and value
* add cohorts support - WIP
* Fix cohort select
* default by opening to the correct tab
* extract feature flag
* add pagekey to taxonomic filter logic
* remove use of local state in taxon filter
* create keyed infiniteSelectResultsLogic
* not working: loading logic; need breakpoints and return Promise
* address minor changes
* move files to own folder
* TaxonomicPropertyFilter now controls activeTabKey
* wip: Load next chunk of results when list renders
* change pageKeys
* load initial results on mount
* set breakpoint and overscan count
* add a nextOffset state value rather than breakpt
* preserve scroll pos
* allow loading at arbitrary scroll positions
* styling
* minor cleanup
* wip: limit and offset via list accessors
* do a silly little array slice
* separate endpoint for paginated results
* use Fuse for static lists
* wip: tab titles
* counts update on search for both local and async properties
* revert changes to person.py
* minor improvements
* refactor taxonomic property filter logic WIP
* fix bugs, add search queries
* fix key error
* also show local items
* show counts
* add operator value select
* local search with fuse
* get rid of tabKey, select active tab based on filter
* various cleanup
* add simple api cache
* hide property popover -> make the popup usable
* create filter dropdown
* "add filter"
* show the right cohort
* better handling for when the filter is already in a popup
* move up/down
* keyboard up/down navigation
* select on enter
* preselect selected item, fix focus jank
* autofocus on other dropdowns as well
* improve style and refactor util
* fix dumb bug
* show cohorts full screen
* fix filter alignment, type and placeholder
* filter position and responsiveness
* reduce dependence on antd, fix various layout bugs
* fix responsiveness
* tooltip position
* pass on onComplete
* hide tooltip if switching tab
* search property filters also in EE
* add type, fix typegen write loop
* Minor copy adjustment
You're actually searching all at once
* fix outside click handler
* popups with popper
* add ant-select as exception for popup outside clicks
* simplify deps
* always highlight the first item
* use new popup with taxonomic filter
* fix PropertyFilterButton ref
* clear search on select
* placeholder for value input box
* add empty state
* only open filter downwards
* move listTooltip postition into useState
* list tooltip position after opening and resize events
Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Move old funnel people to TS and fix look
* Restore `EntityFilterProps`
* Improve `People` return code readability
* Include People component deprecation notice
* don't end query if failed if new one came in already
* adjust breakpoints and end the query in the end
* abort trends fetch queries
* smaller delay
* fix entityFilter blinking bug and improve types
* new typegen
* remove second source of truth, change value to 300
* improve type accuracy
* log aborted queries
* report aborts in trendsLogic
* consolidate ViewType into types.ts
* one more
* and one more
* add d3 histogram
* different layouts and fine tuning d3 histogram
* spacing math and comments
* row-align steps action dropdown and refactor
* cleanup
* hide time conversion behind ch flag and remove layout toggle
* remove animation and layout toggle
* better app-wide empty states and funnels histogram empty state
* revert fat finger
* erroneous type
* empty state comments
* add d3 histogram
* different layouts and fine tuning d3 histogram
* spacing math and comments
* row-align steps action dropdown and refactor
* cleanup
* hide time conversion behind ch flag and remove layout toggle
* remove animation and layout toggle
* revert fat finger
* erroneous type
* move persons modal logic out of trends
* refactor long action params
* pass filters through actions to decouple trendsLogic from personsModalLogic
* no longer need to preload trendsLogic
* move people loading to persons modal logic
* potential cohort logic id error fix
* Latest browser’s versions and statistics
* Browserlists - Use "defaults" browser support
* Enable Babel polyfills based on usage
* Revert "Polyfill Object.fromEntries (for Safari <= 12) (#4999)"
This reverts commit ad63386a69.
* Different browser support for dev/prod for build performance
* wip
* Add support for plugin config required_if and visibile_if
* update form rules
* update key check
* move from OR to AND operation on deps array
* update scaffold
* Load session events asynchronously from a separate endpoint
This mirrors the behavior of postgres query
* Simplify backend & query
event_count is unused
don't select unused columns in list query
* Rename filter_by_session_recordings to filter_by_session_recordings
This is more in-line with what the function actually does
* Update types, handle start/end url properly
* start_url / end_url to session result
* Update sessions list builder tests
* Remove some `session.events` references
* Remove unneeded code
* Simplify filteredSessions
* Fix type issue
* Add test for session properties
* Test and fix start_url/end_url
* Add test for the new sessions API endpoint
* Improve types
* Update py types again
* Fix bug
* Load action event count asynchronously
This speeds up loading/editing events quite a bit on clickhouse.
Issue: https://github.com/PostHog/posthog/issues/4802
* Add test for /api/action/{id}/count endpoint
* Update code
* connect funnel persons to the frontend
* fixes
* simplify feature flag call and open persons modal on bar click
* persons dropoff call
* move methods to kea and clean up code
* remove unused imports
* round the percentage down
* pass in correct step number
* type fix
* small fixes
* prettier
* clickhouse enabled check
* fix clickhouse enabled check
Co-authored-by: Li Y Yu <liyi@Lis-MacBook-Pro.local>
* connect funnel persons to the frontend
* fixes
* simplify feature flag call and open persons modal on bar click
* persons dropoff call
* move methods to kea and clean up code
* remove unused imports
* round the percentage down
* pass in correct step number
* type fix
* small fixes
* prettier
* clickhouse enabled check
Co-authored-by: Li Y Yu <liyi@Lis-MacBook-Pro.local>
* Display empty values correctly
* fix broken test and I
* handle more cases of empty strings / objects
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* fix when new steps in the url get merged with old steps from values (new steps contain actions, old events)
* set default event in funnels
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>