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

1304 Commits

Author SHA1 Message Date
Marius Andra
e3aac13fb9
LZ-String compression (#1058)
* lz-string compression

* announce to posthog-js that we support lz-string base64 encoding

* add another gzip test, add lzstring base64 test

* compression string refactor

* ignore types for the lzstring library
2020-07-06 12:28:49 +02:00
James Greenhill
f1d1b59b89
Fix upside down Changelog links (#1146) 2020-07-03 21:38:29 +02:00
Michał Matłoka
93aebb9e7b
Update prettier to 2.0.x (#1143)
* Update prettier devDependency to 2.0.x

* Format with prettier 2.0.5

* Update yarn.lock
2020-07-03 14:37:07 +02:00
James Greenhill
ad8ad53a51
bump version and changelog to 1.10.1 (#1142) 2020-07-02 13:23:25 -07:00
James Greenhill
884ead8b01
Bump version to 1.10.0, was missed in previous commit (#1141) 2020-07-02 13:00:55 -07:00
Eric Duong
6ccc38b11e
Add flutter docs and reorder flow (#1134)
* add flutter docs and reorient flow

* make consistent

* fix tests
2020-07-02 10:56:22 -04:00
Marius Andra
da5a48c33d
Black all the things! (#1136)
* Black all the things!

* changed line length to 120
2020-07-02 15:41:49 +02:00
Marius Andra
1ecabe373e
changelog for 1.10 (#1135) 2020-07-02 14:46:18 +02:00
Marius Andra
9cb177af80
posthog js 1.2.4 (#1133) 2020-07-01 21:18:05 +02:00
Marius Andra
3d245c2b0b
upgrade posthog-js to 1.2.3 (#1131) 2020-07-01 16:24:49 +02:00
Tim Glaser
9a22495e5e
Update logo (#1111)
* Update logo in app

* Update favicons
2020-07-01 16:12:38 +02:00
Marius Andra
c751085cfd
Toolbar Updates - Episode 4 (A New Hope) (#1125)
* max-height for the floating windows

* authenticate text alignment

* drag only from the main toolbar button

* fix key errors

* support searching by text

* fade above the heatmap

* keep dock on top

* max height for toolbar block

* put all of the "stats" tab in a block that can scroll

* fix heatmap style

* if I can't `position:fixed` this dock, then let's at least make it animate smoothly

* add link to issue to provide feedback during the beta program
2020-07-01 16:05:02 +02:00
Michał Matłoka
705d12f78b
Fix funnel query generation when applying element filters (solves #1089) (#1123)
* Fix query generation for element filters

* Add funnel API test
2020-06-30 15:16:21 +02:00
Marius Andra
c058084646
Set the session cookie to samesite=none (#1103)
* set the session cookie to samesite=none

* fix rename issue

* import fix
2020-06-30 13:27:16 +02:00
Marius Andra
8a9d7f620a
Toolbar Updates - Episode 3 (#1105)
* fix tab alignment

* fix button float color

* default color in float mode

* long press extends the toolbar

* add new logo

* also add logo without text

* add window values plugin

* refactor utils

* support x,y coords in circle

* show toolbar button in new style

* remove float mode

* draging doesn't trigger click

* improve rotation

* improve heatmap number

* position of the close button

* "dock" icons to button

* clarify my choice

* show heatmap in a window

* show heatmap with a border

* use new icons

* open actions tab

* remove unused prop

* move Fade into lib/components

* animate with fire

* fix heatmap icon bug

* don't show X, new stats icon

* heatmap window title

* dock and close also shrink

* flag animation and loading for actions

* dock actions to button when enabled

* actions window

* open actions in button window

* colors for indicators

* close buttons

* inspect X

* add stats view with info

* new icons for close & dock

* add/edit actions in button mode

* color code the different elements in select element view
2020-06-30 12:57:02 +02:00
Eric Duong
f8f27316c5
Team timestamp with proper defaults (#1083)
* team-timestamp

* add updated_at field

* update manifest

* use proper default

* remove blank
2020-06-30 11:46:41 +02:00
Michał Matłoka
cfebe3e498
Fix chart sizing in Safari (solves #1045) (#1118)
* Fix styles

* Remove redundant graph-container inhibiting autosizing
2020-06-30 11:28:21 +02:00
Michał Matłoka
bd0a81d680
Rework property filter operator is_set into is_set + is_not _set (solves #1097) (#1115)
* Change property_to_Q mechanics for is_not_set

* Update operatorMap and add isOperatorNonparametric

* Add is_not_set to UI and update is_set behavior

* Update tests

* Revert "Update tests"

This reverts commit a63948bee2.

* Update tests

* Use more familiar terminology

* Fix oversight in default operator display
2020-06-29 14:49:25 +02:00
Marius Andra
2348dc9e49
fix old toolbar again (#1117) 2020-06-29 14:30:34 +02:00
Marius Andra
c4a00c3954
Revert "Fix old editor toolbar (#1114)" (#1116)
This reverts commit 0720c6e7a3.
2020-06-29 13:54:17 +02:00
Marius Andra
0720c6e7a3
Fix old editor toolbar (#1114)
* Fix editor toolbar crashing

* show property filters only in app
2020-06-29 10:53:29 +02:00
Tim Glaser
bb746be2c9
Update contributors 2 (#1110)
* update contributors

* update contributors
2020-06-26 20:27:32 +02:00
James Hawkins
9bd1ca7331
Update README.md (#1102) 2020-06-26 20:09:17 +02:00
Eric Duong
5aca261109
change how bools are parsed (#1106) 2020-06-26 20:08:51 +02:00
Marius Andra
561043e53a
Use new snippet for layout.html (#1104) 2020-06-26 15:56:35 +02:00
Tim Glaser
c4c52314ea
Closes #1096 add property filter to all action options (#1098) 2020-06-26 14:14:15 +02:00
Karl-Aksel Puulmann
4f0522266a
Don't crash adding new action filtering by integer properties (#1087)
This solves https://github.com/PostHog/posthog/issues/1086
2020-06-25 21:01:20 +02:00
Eric Duong
f23fb2f674
Fix/booleans from env (#1009)
* Fix settings.py

* one more diff

* recover missing field

* update tests

Co-authored-by: Filip Kucharczyk <filip.m.kucharczyk@gmail.com>
2020-06-25 20:54:18 +02:00
Marius Andra
3130b967ee
Toolbar: fix gatsby body overflow (#1095)
* fix gatsby body overflow

* make the site work better with the toolbar: set height: 100vh to minHeight: 100vh

* capture all scroll events
2020-06-25 20:53:25 +02:00
Karl-Aksel Puulmann
02b68b6b1b
Add index to Action model (#1085)
This is a micro-optimization, likely doesn't matter for the actual bug
but something I noticed debugging issue 1059.

The query in question is:

```
last_updated_action_ts = Action.objects.filter(team_id=self.team_id).aggregate(models.Max("updated_at"))['updated_at__max']
```

The query plan before:
```
d25vf5hht9th9v> explain analyze SELECT MAX("posthog_action"."updated_at") AS "updated_at__
  max"
    FROM "posthog_action"
   WHERE "posthog_action"."team_id" = 1;
+----------------------------------------------------------------------------------------------------
| QUERY PLAN
|----------------------------------------------------------------------------------------------------
| Aggregate  (cost=5.46..5.47 rows=1 width=8) (actual time=0.026..0.026 rows=1 loops=1)
|   ->  Bitmap Heap Scan on posthog_action  (cost=2.06..5.46 rows=2 width=8) (actual time=0.019..0.02
|         Recheck Cond: (team_id = 1)
|         Heap Blocks: exact=1
|         ->  Bitmap Index Scan on posthog_action_team_id_3a21e3a6  (cost=0.00..2.06 rows=2 width=0)
|               Index Cond: (team_id = 1)
| Planning Time: 0.145 ms
| Execution Time: 0.062 ms
```

After:
```
+----------------------------------------------------------------------------------------------------
| QUERY PLAN
|----------------------------------------------------------------------------------------------------
| Result  (cost=2.06..2.06 rows=1 width=8) (actual time=0.024..0.024 rows=1 loops=1)
|   InitPlan 1 (returns $0)
|     ->  Limit  (cost=0.06..2.06 rows=1 width=8) (actual time=0.020..0.020 rows=1 loops=1)
|           ->  Index Only Scan using posthog_act_team_id_8c04de_idx on posthog_action  (cost=0.06..4
|                 Index Cond: ((team_id = 1) AND (updated_at IS NOT NULL))
|                 Heap Fetches: 1
| Planning Time: 0.147 ms
| Execution Time: 0.049 ms
```
2020-06-25 20:52:38 +02:00
James Greenhill
1b689054bf
Fix cypress inconsistent tests with longer wait and purecomponents (#1078)
* Test lengthening the wait time for the toasts to see if they are less flakey

* use purecomponent hook to prevent unnecessary rerender

* test again

* test again x2

* change pagekey

* test x2

* test

* run on chrome

* remove chrome

Co-authored-by: Eric <eeoneric@gmail.com>
2020-06-25 13:53:13 -04:00
Marius Andra
dd16eb1d02
Toolbar fixes (#1092)
* fix redirect to auth page by default

* toolbar version now sent in all cases, not just debug

* fix issue with actions tab not opening in button mode
2020-06-25 14:34:26 +02:00
Marius Andra
684bb13772
Toolbar BETA Toggle (#951)
* per-user toggle to use new toolbar

* add migration

* fix test and remove setting

* add choices to toolbar setting

* fix latest_migrations.manifest

* update text

* add hint to restart the browser

* fix test now that the setting is gone

* simplify language
2020-06-25 13:46:49 +02:00
Marius Andra
5cd2f07c76
Toolbar Actions (#1033)
* fix scrollbar taking up space in window

* get actions for elements

* show number of elements found

* fix bug with tooltip position

* clean up text and tooltip

* show labels for elements that have actions

* X button orientation + text color

* remove dashboards tab

* extract colors for elements

* hover styles also applied when selected

* form for new action

* improve ux

* section titles

* no tab animation

* show info on actions

* top align in dock mode

* element action flag mouse events

* very rough actions lists

* show action labels only if inspect active

* more ux updates, hide inspect/heatmap when on actions tab

* action new/edit interface

* remove old actions

* toolbar actions form, various ux fixes and refactoring

* tab refactor, keep element open on inspect

* form via kea, more space

* inpsect element for actions

* select the right fields by default

* action select logic

* highlight elements when creating actions

* highlight action elements when in the list

* remove debug

* select action to edit by clicking on heatmap

* save actions in db

* delete actions

* fix some interactivity

* actions list cleanup in element view

* toolbar ux and code cleanup

* float mode max height

* clarify code

* rename StepField

* try to justify the madness

* add shadow back to float toolbar

* add "dock" button to float mode

* remove elements with width=0 & height=0 from inspect

* align current page icon

* make the name of the action required

* hide heatmap/inspect when the toolbar is closed
2020-06-25 11:40:33 +02:00
James Greenhill
75627eb953
chore: clean the configs for release-drafter (#1088) 2020-06-24 13:20:08 -07:00
James Greenhill
27b1fa9241
chore: Automate the creation of the change log (#1080)
* Automate the creation of the change log

* fix: bugs with release-drafter configs
2020-06-24 13:08:32 -07:00
Karl-Aksel Puulmann
f6df41afaa
Retention page (#1073)
* Retention query v0

* First iteration of endpoint

* Return dates labels as well

* Fix the order of result building

* Improve query for retention.

Instead of trying to figure out the "first date", it instead:
1. Figures out what dates every user does events on (WITH query)
2. Then for every date/'first' date combo counts users.

I doubt this is the efficient way to do things but seems to return the
right results.

We now also include time range filter with the query.

* Add empty views for retention

* Add logic for loading data for retention table

* Get a table rendering for retention

* 11 days over 10

This results in a more pretty table

* Remove raw column

* Use correct relative timeframe

* Add spec for retention feature

Note it's currently failing because of missing functionality

* Use query combining for retention queries

* Color cells in retention table

Background color baseline was picked based on already used colors in
css.

Text color switches when crossing a handpicked threshold for legibility.

* Open submenu when navigating to retention

* Add e2e test for retention route

* Add subheader for retention

* Try make mypy happy
2020-06-24 21:13:56 +02:00
Eric Duong
c6428e9190
Onboarding Wizard (#1051)
* intiial working

* remove animation and added snippets

* full flow working

* reorganize

* more cleanup

* fix linting

* add test for the onboarding flow

* add elixir and send event script

* try without cache

* restore cache and move directory

* udpate case

* add lazy loading to onboarding flow

* move field to team

* .

* update styling

* add default

* migration with default working

* add missing model field

* conditional test based on DOM

* add promise return

* try wait

* test again x2
2020-06-24 12:03:28 -04:00
Tim Glaser
dfb9fd5dee
Revert "Add created_at to team model (#1075)" (#1082)
This reverts commit 9e90215709.
2020-06-24 15:20:17 +02:00
Eric Duong
9e90215709
Add created_at to team model (#1075)
* team-timestamp

* add updated_at field

* update manifest
2020-06-24 09:03:06 -04:00
Eric Duong
1aab7859d1
fixed start time (#1077) 2020-06-24 10:44:43 +02:00
Karl-Aksel Puulmann
5257c30ff1
Enable discarding of IP address data (#1081)
* Add migration to add `anonymize_ips` boolean field

Issue #947

* Add setting to not capture ip data

This solves issue 947
2020-06-24 10:38:45 +02:00
Karl-Aksel Puulmann
596635fbcd
Improve ./bin/test command (#1074)
It did not run under `fish` shell at all, added a shebang to make it
work.

Also it assumed nodemon is installed globally. Instead we can add
nodemon as a devDependency and use `npx` to run it.
2020-06-23 18:42:54 +02:00
Eric Duong
d71805b5ca
1050 breakdown person props (#1070)
* add person props to breakdown filter

* fix frontend logic

* working filter by person properties

* run lint

* fix types

* person endpoint and tests
2020-06-23 15:43:09 +02:00
Tim Glaser
11720c3add
Speed up people load by not loading events (#1056)
* Speed up people load by not loading events

* Remove last event
2020-06-23 09:45:48 +02:00
Tim Glaser
d9ef3cd954
Disabled batching in snippet (#1049) 2020-06-22 11:03:25 +02:00
Tim Glaser
f61e9c111b
517 feature flags (#1017)
* WIP #517 feature flags

* Fix default filters

* Move decide to its own file

* Bump posthog-js 1.2.2

* Fix decide endpoint

* Add logic, update posthog-js

* yarn lock

* update snippet

* Add cypress tests

* Add example code

* Fix example code

* Add tests for query size

* Add errors when trying to create feature flag with same key

* Add explanation comment

* Fix cypress tests

* Do caching of teams in Team model

* Use <= instead of <

* Instrumentation and fix

* Fix ci test

* Add patch for team

* Debug test

* It passed
2020-06-22 10:57:09 +02:00
Tim Glaser
720a6f2bc5
Fix moving from sessions to trends (#1039)
* Fix moving from sessions to trends

* Clear results as a response to an action

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-06-19 19:08:53 +02:00
Tim Glaser
18100c6f04
Fix person properties being selected (#1040) 2020-06-19 19:08:09 +02:00
Tim Glaser
e03b6786a9
Automatically select hourly if today/yesterday (#1057) 2020-06-19 14:40:54 +02:00