0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 11:17:50 +01:00
Commit Graph

6129 Commits

Author SHA1 Message Date
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
Neil Kakkar
13a93098cc
Enable different Property lists based on group type for Property Correlations (#7093)
* Enable different property lists based on group type

* fix test again
2021-11-12 11:45:31 +00:00
Neil Kakkar
7a5bb93e2a
Enable Correlations for Groups (#7056)
* enable correlations for groups

* address comments, refactor bits

* address comments
2021-11-12 11:32:55 +00:00
Marius Andra
a1ad7c3728
do not update "updated_at" when listing a dashboard item without cached results (#7092) 2021-11-12 11:11:51 +01:00
Tiina Turban
6175a7f6bb
Use new person properties update function behind a flag (#6755)
* Gating for new set and set_once

* make it super safe

* better way to add specific tests for the new update function

* move the function usage

* add ingestion order tests

* comments

* fix gating - '' doesn't enable for team 0 anymore

* Update plugin-server/src/utils/db/db.ts

Co-authored-by: Yakko Majuri <38760734+yakkomajuri@users.noreply.github.com>

* re-add the spy

Co-authored-by: Yakko Majuri <38760734+yakkomajuri@users.noreply.github.com>
2021-11-12 09:45:32 +00:00
Karl-Aksel Puulmann
15ed4519b7
Allow filtering by group properties under entities in trends/funnels (#7049) 2021-11-12 09:19:45 +02:00
Karl-Aksel Puulmann
82058b5e04
Groups: Improve wording in more places (#7048)
* Improve wording in funnels

* Improve a tooltip

* Improve another dropdown

* Show `Unique organization(s)` on trends graph tooltips
2021-11-12 09:17:37 +02:00
Karl-Aksel Puulmann
e730d07d69
Groups: Capture projects as a group, include info in instance status reports (#7061)
* Capture projects as a group type

* Capture information on groups in status report

* Include more info on instance
2021-11-12 09:15:49 +02:00
Paolo D'Amico
23af1533f8
Project settings improvements (#7085)
* sentence case and clarify stuff

* improve correlation analysis exclusions

* tweaks
2021-11-12 07:15:13 +00:00
Michael Matloka
89af87f40e
Fix breadcrumbs on wider screens (#7080) 2021-11-11 14:50:30 -08:00
Michael Matloka
b32a77fb56
Release lemonade for self-hosted users (#7059)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-11-11 12:20:01 -08:00
Michael Matloka
d5c2412edb
Make dashboard item shadow look sleek (#7062)
* Make dashboard item shadow look sleek

* fixes based on Chris's feedback

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-11-11 21:08:58 +01:00
Michael Matloka
4b74b5a11c
Improve insight type tabs (#7071) 2021-11-11 19:49:08 +01:00