0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
Commit Graph

3777 Commits

Author SHA1 Message Date
Alex Gyujin Kim
ce077bd51b
Fix lingering tooltips in Line Graphs (#5663)
* fix lingering tooltips

* handle component unmount scenario
2021-08-19 14:26:14 -07:00
Karl-Aksel Puulmann
ba332ce713
Don't fetch team unless needed (#5650)
Previously every login/shared dashboard/page load request loaded
team independent of whether it's needed or not.

This makes it so we only load the team here when SELF_CAPTURE is turned
on (i.e. only during dev)
2021-08-19 12:17:46 -07:00
Alex Gyujin Kim
2d7c80f35e
Hot fix auto loading of funnels (#5603)
* fix no refreshing on parameter changes

* remove console

* persist funnel parameters to url

* rename
2021-08-19 18:06:14 +00:00
Neil Kakkar
b484d34c90
Remove unused breakdown query variables (#5655) 2021-08-19 14:04:06 +00:00
Karl-Aksel Puulmann
0f58482a66
Handle denormalized properties everywhere* (#5635)
* WIP: port process_math to support materialized columns

* Add skipped test showing trend breakdowns dont use materialized columns

* Simplify testing and test&fix math property aggregation w/ materialized columns

* Add (failing) test for filtering with materialized action props

* Add test around materialized property filtering

* Refactor entity.math materialization impl

* Make trends breakdowns work with materialized columns

* Simplify process_math further

* Handle denormalized properties in format_action_filter for step.properties

Note the following files all called this method:
ee/clickhouse/views/events.py
ee/clickhouse/views/actions.py
ee/clickhouse/queries/trends/util.py
ee/clickhouse/queries/trends/lifecycle.py
ee/clickhouse/queries/trends/breakdown.py
ee/clickhouse/queries/funnels/base.py
ee/clickhouse/queries/sessions/util.py
ee/clickhouse/queries/clickhouse_stickiness.py
ee/clickhouse/queries/clickhouse_retention.py
ee/clickhouse/models/cohort.py

I verified all of them are OK since they query events table directly
with the passed filter

* Handle materialized $current_url in action step filtering

* Remove now unneeded clause

* Update test helper

* Allow denormalized props for filtering with breakdowns

* Allow denormalized props for filtering with lifecycle

* Allow denormalized props for some views

* Fix entity math yet again

* Query materialized columns in insights > sessions

* Handle breakdown edge case

* Allow denormalized props for more views

* PR feedback

* reformat
2021-08-19 16:09:40 +03:00
Marius Andra
1402faf9de
display range in dropdown value if only start given (#5619) 2021-08-19 14:30:19 +02:00
Karl-Aksel Puulmann
8b0b4bdf0f
Account for entity properties in stickiness feature (#5641)
Closes https://github.com/PostHog/posthog/issues/5639
2021-08-19 13:21:56 +02:00
Karl-Aksel Puulmann
0f0241e01d
Funnels: support breaking down by "All users" pseudo-cohort (#5651)
This already works in trends, but had a bug in funnels. Unified the
implementations as well.

Closes https://github.com/PostHog/posthog/issues/5566
2021-08-19 13:23:07 +03:00
Michael Matloka
52d3ed7599
Hide irrelevant numbers for the initial funnel step and clean styling up (#5645)
* 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
2021-08-19 09:18:51 +00:00
Michael Matloka
d225d6ef8e
Add support for cohort-based cohorts (#5632)
* Add test cases for calculation of cohort-based cohorts

* Add cyclic dependency test

* Add support for cohort-based cohorts

* Reraise error in `calculate_people_ch` to fail loudly

* Use feedback

* Update `test_error_while_calculating`

* Move CH test case to CH suite

* Fix funnels and code formatting
2021-08-19 10:59:03 +02:00
Karl-Aksel Puulmann
44ca474897
Wrap client err before sending to statsd (#5649)
This makes statsd stats more useful on query errors
2021-08-19 10:54:34 +02:00
Karl-Aksel Puulmann
020cb3b085
Only query event columns that are needed (#5610)
* Cache action lookups on entity

* Avoid mutating filters

* Single-line a long query line

* Calculate columns to select from table dynamically

* Rename class to ColumnOptimizer

* Improve typing

* Set logic

* Rename var

* Fetch funnel top values via materialized columns

* Add a cast

* Simplify, fix

* Move types to more logical place

* Add tests for ColumnOptimizer

* Tidy code

* Test whether elements_chain is needed or not

* No caching in tests

* Use `ColumnOptimizer` in trends

* Prepend commas

* Fix event_query tests

* Handle another edge case around elements_chain

* Handle funnel exclusions

* Add documentation around trickier pieces of logic

* Comment out a broken case for now
2021-08-19 10:17:40 +03:00
Karl-Aksel Puulmann
661e6073e4
Make backend responses for comparison/lifecycle more consistent (#5494)
* Make backend responses for comparison/lifecycle more consistent

Closes https://github.com/PostHog/posthog/issues/4718

* Remove unused vars

* Restore frontend hacks

Don't worry, they'll go away soon again!
2021-08-19 06:54:38 +00:00
James Hawkins
be053ed373
Updated deployment instructions in readme (#5237)
* Updated deployment instructions in readme

and made a few minor tweaks to functionality to highlight data warehouses

* minor wording change

Co-authored-by: Tiina Turban <tiina303@gmail.com>

* readme tweaks

* tweak sentence

Co-authored-by: Tiina Turban <tiina303@gmail.com>
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-08-19 02:44:13 +00:00
Karl-Aksel Puulmann
ae56b89d5f
Fix internal dashboard property type (#5643)
* Fix internal dashboard property type

This broke. Sentry: https://sentry.io/organizations/posthog/issues/2585818045/?project=1899813&referrer=slack

Updating these definitions should update everything automatically :)

* Clean internal metrics dashboard text up

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-08-18 18:59:42 +00:00
James Greenhill
910667b22a
Include the set of organizations for an instance in a report (#5630)
* Include the set of organizations for an instance in a report

* use correct python black version

* include license keys as well

* include in telem payload

* remove organizations from summary

Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-08-18 11:56:16 -07:00
Alex Gyujin Kim
b4c30cbe78
Fix edit actions losing focus on each keystroke (#5628)
* separate out components in action step for proper rerender

* fix required props

* add focus check to e2e
2021-08-18 18:13:43 +00:00
Kunal
4fce6d52ee
Fix empty tooltip popup on dashboards (#5631)
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-08-18 09:47:37 -07:00
Paolo D'Amico
e250e78135
Sort dashboards based on pins (#5588)
* Sort dashboards based on pins

* clean up code a bit
2021-08-18 09:41:12 -07:00
Paolo D'Amico
ad7866743d
Release Nailing Funnels (#5605)
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-08-18 08:44:28 -07:00
Karl-Aksel Puulmann
b1f5cd38e3
Display 0% instead of NaN when 0 out of 0 people complete a step (#5634)
Closes https://github.com/PostHog/posthog/issues/5633
2021-08-18 17:51:51 +03:00
Karl-Aksel Puulmann
f2bd6d7f1f
Try fix flaky tests (#5642)
For some reason, this test has been failing reliably the past day,
returning 2 people instead of 1.

The culprit should be https://github.com/PostHog/posthog/pull/5572 but
not sure why tests passed on that branch?
2021-08-18 10:29:46 -04:00
Karl-Aksel Puulmann
59c7efdebe
Migrate person_distinct_id table to CollapsingMergeTree (#5563)
* WIP: Migration to migrate person_distinct_id to CollapsingMergeTree

* Improve migrations

* Another attempt at migration

Using nullable otherwise it defaults without the default 😅

* Linter approved

* Update test code

* Fix testing issues
2021-08-18 17:25:02 +03:00
Karl-Aksel Puulmann
323f82bd2b
Add loading state to InsightsTable (#5601)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-08-17 20:04:09 +00:00
Michael Matloka
49c8ec58b0
Add "KEEP CLICKHOUSE-SERVER VERSION IN SYNC" comment (#5623) 2021-08-17 21:54:47 +02:00
Eric Duong
c79c270f5f
Cumulative person bug (#5572)
* add test and only handle interval if it's non cumulative

* add cumulative to tests that have specific date range
2021-08-17 15:13:24 -04:00
Li Yi Yu
742ad33252
prevent sessions to trends white screen death bug (#5620) 2021-08-17 15:00:29 -04:00
PostHog bot
64de1f0d86
Update plugin server to 1.2.0 (#5621)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-08-17 19:13:34 +02:00
Yakko Majuri
a4b183a950
Hide bot users from org members (#5596)
* Hide bot users from org members

* Revert "Hide bot users from org members"

This reverts commit cb0fd412ac.

* do backend filtering
2021-08-17 16:29:57 +02:00
Karl-Aksel Puulmann
c29ffb016d
Fix dev.Dockerfile (#5613)
* Fix dev.Dockerfile

See https://github.com/PostHog/posthog/pull/5609 for why this broke

Bullseye has libpq-dev version 13 and apt doesn't support version ranges
so removing the package version seems all we can do 😅

* Pin version to bypass linter
2021-08-17 16:24:49 +02:00
Marius Andra
95dafc9a62
Insight & dashboard loading issues (#5612)
* 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
2021-08-17 16:19:17 +02:00
Yakko Majuri
1bfb20f85e
Show search bar for plugin config choice field (#5578) 2021-08-17 09:33:49 +00:00
Karl-Aksel Puulmann
4ba8249cb5
Handle materialized properties in more cases (#5523)
* Extract method from funnels code

* Add failing test case for using denormalized property in a funnel breakdown

* Handle materialized event properties in funnel breakdown

* Refactor property lookups

* Use denormalized properties in paths

* Update validation tests

* Update validation tests

* Fix a broken test

* Move test around
2021-08-17 12:30:28 +03:00
Karl-Aksel Puulmann
9a6516aa94
Use Literal type to type Filter/Property/Entity objects better (#5608)
* Type python Property.type

* Type Filter.breakdown_type in python

* Fix typing issue in actions view

* Type python Filter.insight

* Type python Filter.display

* Type python Filter.interval, fix resulting typing errors

* Type python funnel Filter.layout

* Type python funnel Filter.funnel_window_interval_unit

* Type python Filter.retention_type

* Type python funnel Filter.funnel_window_interval_unit_ch

* Type python path Filter.path_type

* Type python path Filter.target_event

* Type Entity.type

* Type python Property.operator
2021-08-17 12:13:14 +03:00
Karl-Aksel Puulmann
11e2b33225
Fix docker dev build (#5611) 2021-08-17 12:10:59 +03:00
Karl-Aksel Puulmann
8acb0e2242
Fix docker build (#5609) 2021-08-17 10:55:40 +03:00
posthog-contributions-bot[bot]
2e818ecdf2
🤖: Add 7MIMIRA as a contributor 🎉 (#5602) 2021-08-16 20:46:08 +01:00
Alex Gyujin Kim
51918efe35
Add delays to tooltip + Typing Actions (#5591)
* 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
2021-08-16 19:33:04 +00:00
Karl-Aksel Puulmann
5517cead23
Fix refreshing funnels (#5597)
https://github.com/PostHog/posthog/pull/5576 broke funnels refreshing
due to an added equality check
2021-08-16 09:07:12 -07:00
PostHog bot
1fd0fd7f14
Update plugin server to 1.1.15 (#5599) 2021-08-16 16:56:10 +01:00
Alex Gyujin Kim
344aab3ee7
Patch for dashboardLogic crashing home page (#5522) 2021-08-16 08:59:50 -05:00
PostHog bot
dfca81b66a
Update plugin server to 1.1.14 (#5595) 2021-08-16 13:04:06 +01:00
Yakko Majuri
e5a9c3b04e
merge people test (#5567)
* do all merge_people ops in plugin server

* add integration test

* flip call order

* allow calls in any order

* update test approach
2021-08-16 10:53:52 +03:00
Karl-Aksel Puulmann
46f43bc247
Fix empty element filtering (#5504)
* Refactor event_query class

* Don't error when filtering by empty elements array

"Solves" https://github.com/PostHog/posthog/issues/5501

* Solve same copy-pasted solution consistently

* Behave consistently with return values

See also issue https://github.com/PostHog/posthog/issues/5503 - maybe we
shouldn't even allow non-empty?
2021-08-16 10:51:12 +03:00
Li Yi Yu
3ad9ad2158
Fix retention filters (#5590)
* fix filter params

* add comment

* clean up with selector
2021-08-13 18:30:38 -07:00
Alex Gyujin Kim
db1def7c6d
Revert "Fix white screen bug for sessions table navigation to trends (#5569)" (#5592)
This reverts commit 2bc3281d05.
2021-08-14 00:46:59 +00:00
Paolo D'Amico
bb458edbff
Report properties on insight viewed (#5511) 2021-08-13 17:59:51 +00:00
Alex Gyujin Kim
d945bb3b3c
PEMDAS, Performance Optimization, and a small UI bug (#5576)
* pemdas, performance improvement

* descriptive comment

* no bools today
2021-08-13 09:09:40 -07:00
Li Yi Yu
2bc3281d05
Fix white screen bug for sessions table navigation to trends (#5569)
* do not render line graph for wrong data types

* data of undefined fix
2021-08-13 09:40:33 -04:00
Michael Matloka
18bd79ee41
Insights refresh improved (#5530)
* 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
2021-08-13 03:31:54 +02:00