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

6141 Commits

Author SHA1 Message Date
Marius Andra
a8ca2ac634
add change (#7181) 2021-11-17 11:24:16 +01:00
Paolo D'Amico
b5383e7346
Dayjs plugins (#7165)
* dayjs local module

* dayjs from local module

* fix tests
2021-11-17 10:44:45 +01:00
Michael Matloka
4d215cf548
Better handling of current project edge cases (#7142)
* Fix handling of the user being shut out of the current project

* Fix blank screen when there's no current project

* Properly handle current project state edge cases in UI refresh

* Add more information to org/project creation modals

* Update ErrorProjectUnavailable.tsx

* Use feedback

* Fix API mocking for Jest

* Update organizationLogic.test.ts
2021-11-17 10:37:21 +01:00
Rick Marron
87744e863b
Fix $active_feature_flags in capture.py (#7173)
* fix $active_feature_flags in capture.py

* add test for case

* remove unused import
2021-11-17 10:30:19 +01:00
Karl-Aksel Puulmann
79acd298d4
Plugin-server: Always use db.postgresQuery (#7162)
* Use `postgresQuery` whenever possible

This makes it so we have proper metrics on all postgres queries, not
just a subset of them

* Update more callsites

* Make use of transaction in current alias code

* Re-add an await
2021-11-17 10:22:14 +02:00
Paul D'Ambra
626efb9490
Convert funnel tests to journey helper (#7111)
* convert the smallest of the funnel test files

* convert unorder funnel person test to journey for helper

* convert another file

* convert another file

* convert another file

* convert another file

* convert another file

* undelete snapshot files

* undelete snapshot files

* Revert "convert another file"

This reverts commit ef08511509.
2021-11-17 08:18:16 +00:00
Tiina Turban
2dc87655c9
Stop over-producing to kafka (#7172) 2021-11-17 10:06:06 +02:00
Eric Duong
fb946a2186
[funnel trends] make sure required parameter is being passed (#7139)
* remove check on funnel trends

* restore original api handling and add param properly
2021-11-16 22:28:12 -05:00
Marius Andra
c3eec840c4
Session recordings logic unmounted when accessing values (#7159) 2021-11-16 15:10:47 -08:00
PostHog bot
ba176a1c56
Update posthog-js to 1.16.4 (#7171) 2021-11-16 18:14:45 +00:00
Yakko Majuri
d5675648de
Handling for plugin server restarts in historical exports (#7141)
* handling for plugin server restarts in historical exports

* Update plugin-server/src/worker/vm/upgrades/historical-export/export-historical-events.ts
2021-11-16 17:51:30 +00:00
Karl-Aksel Puulmann
dbd1208125
Disable person modal if breaking down by group modal (#7148) 2021-11-16 19:16:15 +02:00
posthog-contributions-bot[bot]
0e161e807c
🤖: Add chasovskiy as a contributor 🎉 (#7166) 2021-11-16 15:41:25 +00:00
Tim Glaser
31ac831739
Update pull_request_template.md (#6952) 2021-11-16 07:50:51 -06:00
Sam Winslow
aa9098413f
Show delete button on single filter in Recordings (#7135)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-11-16 07:49:56 -06:00
Karl-Aksel Puulmann
e6527d9e3d
Plugin-server: Remove person properties business logic from db.ts (#7156)
* Refactor db.ts, remove business logic from the class

* Rename function

* Move tests around

* Mocking bs
2021-11-16 15:29:04 +02:00
Yakko Majuri
5586336f04
Update person version on person updates and send value to Kafka (#6982)
* update postgres version on person update and pass to kafka

* update postgres creation

* final updates

* fix tests (#7007)

* update tests

* fix tests

* fix tests

Co-authored-by: Tiina Turban <tiina303@gmail.com>
2021-11-16 10:12:27 +00:00
Michael Matloka
e8826dceed
Fix sidebar and breadcrumbs logic (#7136)
* Fix things

* Remove breadcrumb loading state

It wasn't really useful and caused breadcrumbs to blink when org/project/user where updated (because they were then loading for a moment).

* Fix unused import
2021-11-16 11:02:11 +01:00
Jaspreet singh
cff71f81ca
Closes #7118 trends graph type shows 'steps' when changing from funnels (#7127) 2021-11-16 10:49:57 +01:00
Marius Andra
3d97ddceae
yarn install plugin server deps earlier (#7149) 2021-11-16 09:52:57 +01:00
Michael Matloka
2b476b046a
Improve icons and responsiveness of fresh top bar (#7131) 2021-11-16 09:15:00 +01:00
Marius Andra
0338759da8
Fix feature flag edit page load (#7076)
* fix feature flag edit on page load

* Update E2E Feature flags test

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-11-16 09:12:21 +01:00
Eric Duong
b7667f528f
fix issue when breaking down on group property and trying to return persons (#7145) 2021-11-16 09:39:48 +02:00
Alex Gyujin Kim
e3690f3c4d
Update pycharm configs with new plugin server scripts (#7140)
* change start scripts for plugin-server

* fix'
2021-11-16 08:19:26 +01:00
Rick Marron
c55e834bc1
include elements chain in recordings query when needed (#7147) 2021-11-15 18:35:45 -08:00
Rick Marron
60545e9c93
Recording query improvements (#7006)
* seperate clickhouse and postgres queries

* move to single query

* remove ununsed imports

* fix cohort + subquery issues

* some cleanup

* fix mypy issue

* fixes to query + tests

* add test for person and cohort properties

* remove cruft

* fix api tests

* Remove cohort + person prop filter from postgres

* move cohort and person property tests to clickhouse

* Filter down events

* typing fix

* fix test

* remove unneeded snapshot

* tests working with snapshots

* switch limit to property

* use materialized columns

* move to new distinct_id query

* add snapshots

* fix materialized column bug

* support cohort and person prop filters

* add person and cohort filtering

* remove cohort filtering from clickhouse

* small tweaks

* Lint fix
2021-11-15 16:15:37 -08:00
Harry Waye
a9e615cf45
feat(funnels): update frontend to use new people_urls in response (#7099)
* remove cohort comment

* feat(funnels): update frontend to use new people_urls in response

This change updates the `FunnelBarGraph` and `FunnelStepTable`
components to use the new `converted_people_url` and
`dropped_poeple_url` in the funnels response.

I need to check that this covers all the cases for funnels. I've only
added people urls for funnels of type step for ordered/unordered/strict
and haven't yet touched the time bins and conversion time funnel
endpoint variants.

* add /some/people/url/ to tests

* chore: add action back, update tests to reference it

* fix typing
2021-11-15 18:32:23 +00:00
Eric Duong
c7158fc895
[testing] Organize api tests (#7110)
* move tests

* update compare test

* use latest format

* typing
2021-11-15 13:12:18 -05:00
Marius Andra
055648b16d
No name override (#7124)
* fix dayjs "utc not found" error

* when updating the insight's metadata, only populate changes to the fields we changed

* add a missing path

* breakpoint in case the logic has unmounted already (due to a crash earlier in react)

* remove extra () => {}

* update before saving to not flicker values
2021-11-15 17:29:03 +01:00
Paul D'Ambra
79069af552
add autogenerated path to events list logic (#7129) 2021-11-15 16:57:43 +01:00
Michael Matloka
1ee1167be6
Align highlighted dashboard item border width with regular border 2021-11-15 15:38:03 +01:00
Michael Matloka
bc394a8cde
Align project/org switcher header to design (#7114)
* Align project/org switcher header to design

* Move org/project switcher to `lemonade/` as they don't belong in legacy `navigation`

* Fix `LemonRow` content padding
2021-11-15 15:16:12 +01:00
Karl-Aksel Puulmann
bf28d14aed
Add some benchmarks for stickiness (#7116)
* Add benchmarks for stickiness

* Don't require get_earliest_timestamp always

* Improve benchmark
2021-11-15 13:38:11 +02:00
Li Yi Yu
e0fe499a05
Groups pages table (#7039)
* wip

* get list of groups

* move backend endpoints

* frontend wip

* fix routes for groups

* add groups file

* try to fix tab nav

* fix groups query

* reformat results, add limits and offsets and next url

* move groups pages logic into own file

* fix and clean up tabs

* account for pagination and response reformatting

* lint fixes

* optional prev input

* typescript errors

* typescript fixes

* address feedback comments

* groups list logic test

* render properties expandable row

* fix test and lints

* prettier

* simplify table column title

* Fix a typing issue

* Use enum > boolean parameter

This makes what's going on more explicit

* Turn off pagination at the bottom of the table

* Rename table column

* Make pagination in groups work

Quite bugs fixed:
1. `previous` page was always shown, even if going into negative offsets
2. query_result could never be larger than `limit` with the code

* Cleanup code

* Make sidenav active under persons

* Use the correct query

* Add tests for pagination

* Update wording again

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-11-15 11:08:13 +02:00
Guido Iaquinti
b4a6ece4ec
Dockerfile(s) - use 'libpq~=13' (#7113) 2021-11-15 11:00:08 +02:00
Yakko Majuri
963c62aaf1
Use monorepo plugin server (#6784)
* use plugin-server in same repo

* remove plugins dir

* update docker files

* clean up docker files:

* visual separation

* run plugin server test stack

* build and push test image

* revert push image

* fix default yarn start

* another fix

* fix some more

* add plugin-server-prod script

* make executable

* update scripts:

* revert prod script

* fixes

* fix tests

* clean

* move build to docker

* build plugin-server in prod dockerfile

* use different entrypoint for e2e test

* fix bugs with ts-node-dev

* restore yarn.lock

* lost a few changes in the rebase

* fix dockerfile

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2021-11-13 11:52:00 -08:00
Alex Gyujin Kim
07186942ef
Event list in session recordings player (#6971)
Co-authored-by: Rick Marron <rcmarron@gmail.com>
2021-11-12 12:47:22 -08:00
Paolo D'Amico
60b8aaf7b0
UI/UX tweaks to breadcrumbs (#7025) 2021-11-12 11:34:17 -08:00
Paul D'Ambra
3a323f361d
batch insert events in the test journey helper (#7108) 2021-11-12 19:33:55 +00:00
Eric Duong
48a6302f6f
[trends] Cumulative fix (#7041)
* cumulative dau for non breakdown

* breakdown case

* clean up test

* add trends request util

* use simpler test util

* types

* insight tests

* add snapshots

* black
2021-11-12 14:27:28 -05:00
Harry Waye
31b4919177
Make get people test ids sorted, remove flakiness (#7107)
I introduced some flakiness in introducing this, it seems indeterministic so need to sort before compare
2021-11-12 18:48:35 +00:00
Paul D'Ambra
19fd07dc87
Convert breakdown_cases to new test helper (#7098)
* adds a first draft of a test helper for clearer event setup in tests

* one spelling of journeys

* obey the type checker

* convert all of breakdown_cases to the new test helper

* Removes unused helper method
2021-11-12 18:33:20 +00:00
Rick Marron
7f56778268
remove cohort filtering (#7106) 2021-11-12 10:18:02 -08:00
Eric Duong
f2108564e2
[trends] Fix compare persons onclick (#7075)
* fix frontend

* temp test
2021-11-12 13:12:23 -05:00
Michael Matloka
d73e9bd5d6
Lemonize New insight button (#7081)
* Lemonize New insight button

* Address feedback
2021-11-12 18:31:51 +01:00
PostHog bot
46ad68649d
Update posthog-js to 1.16.3 (#7104) 2021-11-12 16:37:38 +00:00
Harry Waye
2550fb26c6
feat(funnel-people): return converted/dropped people url in funnel (#7057)
* test(funnel-people): add tests for converted/dropped people urls

As per https://github.com/PostHog/posthog/issues/6935 we are adding urls
to responses to attempt to improve consistency between insight responses
and the people we display in the UI.

This simply adds tests for these urls, just for funnel step response
shape. The other two types of response will be handled separately.

* feat(funnel-people): return converted/dropped people url in funnel

Here I have simply added converted / dropped urls in the base funnel.
This touches both clickhouse and postgres functionality, so I will
probably add in tests for postgres also, or just disable to postgres.

It doesn't pass yet as there is an issue in that the order appears to be
ignored by the people endpoint.

* fix(funnels): actually use strict/unordered persons querying

Previously we were always using the standard `ClickhouseFunnelPersons`
class for retrieving people from the `/api/persons/funnel/` endpoint.
This change selects from the unordered and strict variants based on the
`funnel_order_type` setting.

Refers to https://github.com/PostHog/posthog/issues/7058 although there
is a frontend component to add that will truely resolve the issue.

* feat(funnel-people): add people urls for funnels with breakdown

In this I have also removed any changes from the non-clickhouse code.
Note that there are two places I've added the url generation code, one
in the `ClickhouseFunnelBase` and another in the `ClickhouseFunnel`

I think the former covers the unordered and strict cases, and the later
for the breakdown case. I think there are further test that I'll need to
add to validate e.g. if breakdown + strict work as expected.

* Fix people urls for unordered funnels + breakdown

* test: add test for strict breakdown with people urls

* make funnel response assertions not check people url equality

* fix typing

* fix tests

* remove new line in postgres funnel.py

* clear cache on insight test start

* no really, clear the cache

* remove flakiness from strict funnel test

* correct the unordered test

* use absolute uris

* use step.index not step.order

* remove out of date comment

* use step.index, not step.order

* use step.index, remove unordered funnels comment

* use journeys_for instead of create_events
2021-11-12 14:50:39 +00:00
Tim Glaser
d23e6143b9
Fix dashboard empty state issues (#7031) 2021-11-12 13:18:37 +00:00
Karl-Aksel Puulmann
6344db46a5
Validate group_type_index in properties/entities (#7087)
* Validate group_type_index in properties/entities

This avoids injection-like problems

* Update import path

* No circular import
2021-11-12 14:31:55 +02:00
Paul D'Ambra
1458f07163
Adds a first draft of a test helper for clearer event setup in tests (#7095)
* adds a first draft of a test helper for clearer event setup in tests

* one spelling of journeys

* obey the type checker
2021-11-12 12:26:07 +00:00