0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
Commit Graph

1306 Commits

Author SHA1 Message Date
Eric Duong
3f56d53b62
Null check for persons in PersonHeader (#3750) 2021-03-25 12:07:22 -07:00
Paolo D'Amico
82a0e7c2fb
Fix #3747 (#3748) 2021-03-25 11:05:02 -07:00
Paolo D'Amico
f4a87efa2b
Global hotkey navigation (#3740) 2021-03-25 11:04:33 -07:00
Karl-Aksel Puulmann
a5be4f2c33
Add 'cohorts' tab to Person page (#3744)
* Add a cohort tab to Person page

Closes #3743

* Add E2E test navigating from cohort -> person -> back
2021-03-25 17:24:36 +02:00
Paolo D'Amico
89b71a9959
New login & signup (React) (#3701) 2021-03-25 07:40:20 -07:00
Karl-Aksel Puulmann
cdbd82a0a7
Add some data-attr for plugins (#3742)
The next step for plugins should be getting more adoption, including on
cloud. This PR adds some much-needed instrumentation.
2021-03-25 11:26:40 +02:00
Kunal
20f982f7ac
reduce width so button isn't covered (#3734)
* reduce width so button isn't covered

* accidental checkin

Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-03-23 17:05:26 -07:00
Michael Matloka
68a5d68f15
Clarify test accounts → internal users (#3733)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-23 15:40:50 -07:00
Paolo D'Amico
6cc09eaef7
Support custom identifier for person name (#3581) 2021-03-23 15:40:37 -07:00
Paolo D'Amico
136a021d1a
Feature Flags Revamp (UX & Code) (#3675) 2021-03-23 14:34:48 -07:00
Michael Matloka
f97d40207b
Explain premium feature in upgrade modal (#3619)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-23 14:16:54 -07:00
Eric Duong
75fb02933c
use utc on dates without hours for consistency (#3731) 2021-03-23 14:14:28 -07:00
Paolo D'Amico
8a35701505
Fix unmounted logic bug on shared dashboards (#3712) 2021-03-23 13:23:57 -07:00
Paolo D'Amico
a8838701aa
Timezone handling UX (#3698)
Co-authored-by: Tim Glaser <tim@glsr.nl>
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-23 12:54:33 -07:00
Karl-Aksel Puulmann
d8d6ecd7ab
Add "test account filters" filter to trends (#3729)
This was added to one feature flag path but not the other, missing on
cloud.
2021-03-23 12:15:28 +01:00
Paolo D'Amico
1147372799
Fix hotkeys in textarea (#3713)
* ignore hotkeys in textarea inputs

* autofocus text area when adding annotation

* fix ts issue
2021-03-22 16:55:09 +01:00
Marius Andra
6dcb18f593
Async event action mapping to 5 min, add warning (#3717)
* Set ACTION_EVENT_MAPPING_INTERVAL_SECONDS to 300, move to settings

* Add async warning

* Use smarter get_from_env

* Async event action mapping warning when creating a webhook

* Async event action mapping warning when editing an action

* remove top async warning

* Use common reworded notice component for async mapping

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-22 15:38:46 +01:00
Michael Matloka
9af478354d
Fix linting-breaking import (#3718) 2021-03-22 15:27:28 +01:00
Paolo D'Amico
0b755d20bf
Dashboard empty & error states + mobile support (#3666)
* dashboard not found page

* empty dashboard graphics

* move to components (responsive)

* finish empty state component

* update rocket component

* remove unused styles

* fix mobile dashboards

* small fix

* fix cypress
2021-03-22 14:22:00 +01:00
Paolo D'Amico
8c961e2766
bring back individual refresh (#3708) 2021-03-19 10:36:18 -07:00
Michael Matloka
828e0fd5c2
Solidify plugins on Cloud rollout (#3706)
* Better handle extra info buttons during plugin reordering

* Fix UI bug in first time plugin enabling

* Give very new Cloud org config access to plugins

* Add migration
2021-03-19 14:25:09 +01:00
Kunal
3c178620a9
add beta tag to trends, center title (#3704)
Co-authored-by: kunal
2021-03-18 21:41:22 -07:00
Michael Matloka
169c3ba1e4
Better plugin globalization UX (#3702)
* Disallow global plugin uninstallation in the backend

* Rework plugin globalization UX
2021-03-18 23:31:08 +01:00
Yakko Majuri
ed70ddfc0f
Lower the bar to report bugs in plugins (#3699)
* Lower the bar to report bugs in plugins

* remove lingering space

* Fix PluginImage sizing

* Improve ordering tooltip clarity

* Use new ExtraPluginButtons component for About and Feedback

* Reduce large PluginImage size

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-18 21:47:09 +01:00
Tim Glaser
f7dfc7f7e2
Introduce Dayjs (#3490)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-18 10:49:45 -07:00
Michael Matloka
e16d479e81
Plugins page tiny fixes (#3694)
* Fix SubtitleProps.buttons type

* Improve "Mark as global" styling

* Show globally managed plugins last in the installed disabled list

* Update InstalledTab.tsx

* Add Edit order tooltip
2021-03-18 15:08:02 +01:00
Paolo D'Amico
3df295351c
Shared dashboards fix (#3672)
* fix logic unmounted error

* fix dashboards loading with shareToken

* remove unnecessary connect

* hide unused controls on shared dashboards
2021-03-18 12:55:40 +01:00
Eric Duong
9b652fe092
3682 Various annotation fixes (#3689)
* various annotation fixes

* fix typescript
2021-03-17 15:06:21 -07:00
Eric Duong
341bd600d9
funnel trend fix white screen and remove description (#3686)
* fix white screen and remove description

* move prompt
2021-03-17 16:07:07 -04:00
Paolo D'Amico
7c6bd06af3
Automatically enable debug mode for posthog-js on SELF_CAPTURE (#3613) 2021-03-17 12:32:20 -07:00
Michael Matloka
3c0737f0fd
Plugins access control (#3486)
* Add Organization.PluginsAccess

* Rename PluginsAccess to PluginsAccessLevel

* Use Organization.plugins_access_level in can_…_plugins_via_api

* Add migration for Organization.plugins_access_level

* Remove unused PLUGINS_CLOUD_WHITELISTED_ORG_IDS

* Update access.py

* Add OrganizationPluginsAccessLevel TS enum

* Fix merge

* Disable LocalPlugin UI on Cloud

* Move away from PluginAccess interface

* Extend PluginsAccessLevel range

* Refactor PluginsAccessLevel for brevity

* Remove PluginAccess interface completely

* Add plugins managed globally

* Update migration

* Show managing org name in "Managed" plugin tag

* Smoothen some rough edges

* Smoothen more edges

* Restore correct MULTI_TENANCY default

* All the edges

* Fix most existing tests

* Remove PLUGINS_*_VIA_API env var support

* Update pluginsNeedingUpdates

* Remove can_*_plugins_via_api from instance status page

* Add tests and polish permissioning

* Update migration

* Fix typing

* Make plugin drawer UI less intrusive

* Update migration

* Fix Uninstall button condition

* Use unified _preflight status endpoint instead of the custom plugins one

* Fix plugin update label condition

* Fix "Check for updates" button condition

* Explain PluginsAccessLevel choices with comments

* Hide global plugin installation option on self-hosted

* Don't actions.loadRepository() as install org

* Improve permissioning with tests

* Satisfy mypy

* Add plugins access level to admin and fix org admin

* Check plugins access level more

* Rename endWithPeriod

* Refactor FE access control checks to accessControl.ts

* Deduplicate permissioning

* Add exception message

* Align backend and frontend plugins access level helpers

* Add plugins access level helper tests

* Fix ChartFilter
2021-03-17 15:01:55 +01:00
Marius Andra
f2cebf2b3f
Notice in toolbar if could not get a unique selector for the element (#3635)
* Show notice if could not get a unique selector for the element

* Remove redundant value fallback

* Clarify tip

* Prettier

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-16 01:35:26 +01:00
Sandeep Guptan
a3f50f65cd
fixed y axis color issue (#3653) 2021-03-16 00:44:16 +01:00
Paolo D'Amico
e5a0cd518e
Dashboard hotkeys (#3623)
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-15 16:10:14 -07:00
Tim Glaser
17c90ad3df
Default event property usage to false (#3655)
* Default event property usage to false

* fix type errors and wording
2021-03-15 19:43:39 +01:00
Paolo D'Amico
b27dace009
Dashboard Improvements I (#3608) 2021-03-15 11:41:48 -07:00
Tim Glaser
3b2ceee89e
Fix organization settings (#3643)
* Fix organization settings

* add test

* fix
2021-03-14 17:12:56 +01:00
Kunal
4210717922
Fix Funnel rendering on dashboards (#3641)
* use the same logic within a component instance

* cleanup value unpack

Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-03-12 23:15:12 +01:00
Marius Andra
8c98e4f61d
Toolbar Date Filter, remove react-hot-loader, fix dashboard date filter URL (#3586)
* dropdown and datepicker z-index

* remove dead code

* pass getPopupContainer to range picker

* make DateFilter's custom time range work in a shadow root

* close after selecting

* show date filter instead of date range

* skip updating url on date filter change in toolbar

* actually filter the dates

* fix flickering (always show map)

* refactor date filter component

* upgrade to webpack 5 and @posthog/react-rrweb-player module

* disconnect dashboardLogic from dateFilterLogic (remove broken url changes, etc)

* add bundle tracker

* remove react-hot-loader

* Revert "add bundle tracker"

This reverts commit e59bcfa8

* remove bundle tracker

* remove updatePath

* fix code quality complaints

* revert @cypress/webpack-preprocessor version

* try different cypress webpack plugin

* add crypto-browserify

* add crypto-browserify

* revert to webpack 4

* revert to webpack 4

* revert to webpack 4

* implement feedback and remove debug stuff

* move insights date filter logic out of lib/

* rename DateFilterComponent to DateFilter

* rename DateFilterCustom to DateFilterRange

* Remove hot from new code
2021-03-12 14:54:29 +01:00
Tim Glaser
bf2c4429b5
Auto filter test accounts (#3492)
* WIP auto filter test accounts

* finish off

* Fix tests

* Non generic emails

* add list of generic emails

* Move location to below property filters

* Fix typescript errors

* as any

* fix tests

* filters

* fix tests

* Featureflag doesn't really makes sense for this feature

* fix tests

* fix test

* Add clickhouse + tests for each insight

* Fix lifecycle and paths

* Fix sessions

* Fix session tests

* fix sesisons test

* fix migrations

* fix migration chain

* refactor path & remove stale console.log

* adjust useAnchor & minor copy

* rename to avoid confusion with inline component

* test account filter tweaks

* fix filters

* hardcode

* Add tests for funnel trends

* Make generic emails super fast

* Fix migrations

* Default to false for now

* Default to false, remember a user's preference

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-11 18:16:38 +01:00
Michael Matloka
9fdbd87aba
Improve Plugins page UX (#3614)
* Improve Plugins page UX

* Don't allow for closing "Advanced Features Ahead"
2021-03-11 16:13:57 +01:00
Yakko Majuri
ce3dced6e6
Fix funnels loading message (#3598)
* Fix funnels loading message

* remove console.log
2021-03-11 12:51:40 +01:00
Michael Matloka
e50d5912e5
Add organization settings (#3324)
* Add organization settings

* Update test_organization.py

* Fix TS issues

* Improve permissioning frontend

* Fix an import

* minor typos

* fix cypress

* Make use of AnalyticsDestroyModelMixin

* Solve nits

* Rework Invites empty state

* Update organization test

* Improve organization tests and permissioning

* Polish Organization Settings frontend

* Improve Members UX

* Use RestrictedArea in Project Settings

* Fix APITestMixin._create_user

* some minor copy adjustments

* Use email initial in ProfilePicture

* Clean up org deletion tests

* Improve org/project deletion UX and reliability

* Enhance org deletion test

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-10 13:09:35 +01:00
Michael Matloka
7326f987ed
Add action titles to CodeSnippet (#3612)
* Show HTML title on CodeSnippet Actions

* Make Action.title mandatory
2021-03-09 22:47:55 +01:00
Marius Andra
c47a9e320f
get rid of needless space (#3603) 2021-03-09 11:22:25 +01:00
Yakko Majuri
d693abab79
Add ph-no-capture to relevant sections pt. 2 (#3596)
* Add ph-no-capture to relevant sections pt. 2

* extra ts fixes

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-09 07:58:45 +00:00
Michael Matloka
6f85e8f580
Gravatar support for user profile picture (#3584)
* Add crypto-js for calculating MD5

* Add Gravatar support to profile picture

* Add title attribute to ProfilePicture img

* Optimize ProfilePicture

* Fix typing

* Show Gravatar in Members list

* Remove style from ProfilePictureProps

* Update title in ProfilePicture img

* Fix TS

* Show Gravatars in Invites

* Remove debug line

* Use nbsp in /.+ (At|By)/ table headers

* Remove user prefix from ProfilePicture props
2021-03-08 14:13:31 +01:00
Tim Glaser
26fdfabc35
Fix funnels with only events (#3593) 2021-03-06 11:37:55 +01:00
Eric Duong
27f271725a
Filter disappearing bug + more (#3590)
* fix deleting filter bug and adjust close button spacing

* remove null check to fix event property empty condition
2021-03-05 15:46:11 +00:00
Eric Duong
859734138a
add missing param to retention payload (#3585) 2021-03-04 19:57:57 -05:00
Michael Matloka
8625b6a935
Clean up command palette style (#3583) 2021-03-04 23:51:57 +01:00
Marius Andra
a8c2bd0cb1
Add <wbr /> to allow very long strings to split nicely (#3578) 2021-03-04 16:12:24 +01:00
Paolo D'Amico
53041a5057
Fix long person properties UI (#3570)
* global style

* components adjustment
2021-03-04 15:04:41 +01:00
Yakko Majuri
e933184fda
Plugins secret config fields (#3341)
* WIP Plugins secret config fields

* add comments

* Polish Secret Plugin Field (#3476)

* Replace warning with a button

* no matter what the value is -> a secret is a secret

* update text

* secret api changes

* check equality with secret string

* fix type

* add tests

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-03-04 12:19:49 +01:00
Paolo D'Amico
78bfade0df
Post-release 1694-dashboards (#3513) 2021-03-03 07:17:43 -08:00
Eric Duong
adee71ec60
parse timestamps to local time (#3522) 2021-03-03 10:21:50 +00:00
Eric Duong
55a298018b
disable unnecessary chart filters on retention (#3521) 2021-03-03 10:21:22 +00:00
Paolo D'Amico
2f90e5aa24
Instrument person properties management (#3511)
* reportPersonPropertyUpdated event

* report event + adjustments

* report old property type

* remove stale console log
2021-03-03 11:02:04 +01:00
Marius Andra
d4ab38db7c
add $device_type to initial properties to save (#3564) 2021-03-03 10:53:06 +01:00
Marius Andra
888b1314da
Add JSON view for events (#3560)
* Add JSON view for events

* Extract sortedKeys to utils

* Don't wrap EventJSON CodeSnippet in extra div

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-03 10:48:44 +01:00
Kunal
1051143ba4
Update tracking for Retention & Paths (#3563)
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-03-02 21:28:02 -08:00
Kunal
d6093f10b7
Add calculate funnel event (#3556)
* add calculate funnel event

* update naming scheme

* move analytics to eventUsageLogic

Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
2021-03-02 17:57:50 -08:00
Paolo D'Amico
7e10a4f06c
Release Persons V2 (persons-2353) (#3461) 2021-03-02 11:18:04 -08:00
Michael Matloka
a2ea4d0146
Clean up copyToClipboard (#3553) 2021-03-02 11:57:06 +01:00
Yakko Majuri
aced4b98f7
Add ability to add person props on the UI (#3394)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-03-01 16:43:07 -08:00
Yakko Majuri
b5038bbd60
Fix minor UI issue with funnel loading (#3519)
* Fix minor UI issue with funnel loading

* remove console.log
2021-03-01 21:58:53 +01:00
Paul Ungureanu
20ea346f66
Closes #3524 filters do not reset (#3532)
Before this, the events table did not update when the last filter
was deleted.
2021-03-01 19:13:15 +01:00
Paolo D'Amico
b025ada381
Random fixes Mar 1 (#3530)
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-01 09:35:30 -08:00
Yakko Majuri
01774c0746
fix plugin invalid config error (#3529) 2021-03-01 17:52:25 +01:00
Michael Matloka
38331e696f
Add explanation for clipboard not working on remote HTTP (#3528)
* Add explanation for clipboard not working on remote HTTP

* Fix toast
2021-03-01 17:30:45 +01:00
Yakko Majuri
7281639d36
Fix cannot read property 0 of undefined (#3518) 2021-03-01 16:51:03 +01:00
Tim Glaser
ca5c50b67a
Add UTM tags to property info (#3508) 2021-03-01 10:18:31 +01:00
Karl-Aksel Puulmann
b7bdad90eb
Add test for bar charts (#3474)
* Add test for bar charts

Since our charts are rendered on a canvas we can't really interact well
with it. Instead, we take a screenshot now (new dependency).

* Debug error in CI

* Make sure images are the same size on CI and locally
2021-02-26 16:50:36 +02:00
Karl-Aksel Puulmann
75f1332afc
Reload our feature flags after changing them (#3477)
This only "affects" our team and local development. I got tired of
needing to reload after toggling a feature flag locally. This makes it
so that the newly edited flag is applied immediately.
2021-02-25 16:28:52 -06:00
Tim Glaser
e5cfa68b60
Reduce calls to api/action (#3493)
* Reduce calls to api/action

* Fix saving
2021-02-25 22:48:53 +01:00
Eric Duong
195a358819
Change graphs to ts (#3181)
* change to TS

* fix type

* fix types

* add type to kea logic

* fix errors
2021-02-25 12:44:37 -05:00
Eric Duong
2d4daa6558
Revert "Revert "935 trend legend"" (#3489)
* Revert "Revert "935 trend legend (#3434)" (#3487)"

This reverts commit 5784f90df6.

* patch bug

* format breakdown label

* add ff
2021-02-25 12:06:06 -05:00
Eric Duong
5784f90df6
Revert "935 trend legend (#3434)" (#3487)
This reverts commit cd660e52f8.
2021-02-25 11:41:57 -05:00
Eric Duong
cd660e52f8
935 trend legend (#3434)
* base table legend

* toggle visibility logic

* colors working

* display data in legend

* clean up types and conditions

* review-points

* missing constant from merge

* Make the table small

* disabled when only 1 is left and add label clickable

* add better label handling

* fix test

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-02-25 10:59:35 -05:00
Karl-Aksel Puulmann
eb7b361401
Fix: funnels & retention person links, funnel calculations (#3483)
* Fix links to people from Retention modal and Funnels.

More details under issue https://github.com/PostHog/posthog/issues/3480

* Fix funnel calculations on self-hosted

Broken by renames within https://github.com/PostHog/posthog/pull/3301

* Handle cached calculations in e2e test runner

When executing e2e tests, celery tasks are evaluated immediately. Previously
due to the caching the funnels never loaded as we overwrite the results immediately.

* Add test for navigating to persons from funnels

* Test for retention visualization and person navigation
2021-02-25 17:41:25 +02:00
Karl-Aksel Puulmann
264d4b03db
Bar chart by value (#3457)
* Extract const for a frequent if-statement

* Show bar graph

* Show bar chart breaking down by value

* Don't show interval filter when non-time based visualization

* Set axis color as expected

* Add percentage of total to bar graph

* Include action info in tooltip for value graph

* Support DashboardItem

* Mark prop as optional

* Convert new file to typescript

* Disable bar value for stickiness
2021-02-25 17:01:05 +02:00
Karl-Aksel Puulmann
f36495bec6
Filters: Select multiple for equality/inequality (#3422)
* Don't colorize sql for output

* Handle setting array props as values

* Handle arrays exact/is_not property filters

Also updates tests to use parameterization

* Avoid autoclosing PropertyFilter popup

As key changes, old one got removed from DOM

* Improve filter UX

Don't allow filter to become multi-line and keep inputs the same size.

Previous flex={1} was doing flex: 1 1 auto which was messing things up

* Fix typescript issue

* Handle array lookups in postgres

* Update types

* Fix fixture to recreate tables

* Make replace spaces logic consistent with what was there before

* Handle list filtering better in postgres

* Update frontend tests

* Handle edge case: Switching between multi operator and single operators
2021-02-25 16:54:55 +02:00
Karl-Aksel Puulmann
bd9a44cdb3
Fix "unseen sessions" filter (#3478) 2021-02-25 16:26:42 +02:00
Michael Matloka
a50822b27f
Fix "passowrd" on invite page (#3473) 2021-02-25 12:26:52 +01:00
Marius Andra
84d853748d
Earlier IP anonymization (#3464)
* Clarify what anonymize_ips does

* Hide IP before event ingestion, not during (hides it also from the task queues and plugins)

* flip it around

* add IPs to tests that expected them to be there

* "Discard"

* test that everything works when ip is none
2021-02-25 10:31:33 +01:00
Michael Matloka
55ffbb04a1
Fix invite signup being inaccessible for users without org or project (#3466) 2021-02-25 10:14:10 +01:00
Marius Andra
325a8d653e
Alert if plugin server down (#3465)
* Alert if plugin server down

* Strip plugin server version of quotes

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-25 01:57:49 +01:00
Michael Matloka
4a08abf789
Bulk invite the Polish (#3346)
* Refactor bulk invites to use OrganizationInviteViewSet

* Refactor BulkInviteModal

* Flyby utils fix

* Make invitation button nicer

* Fix dropdown Invite button

* Fix invites/bulk response status

* Update test_organization_invites.py

* Fix Formula typing

* Fix test_invites_are_create_atomically

* Fix typing

* Update comment

* The to each

* Address feedback and introduce optimizations

* Fix tests

* Polish

* use single invite on user dropdown if email is not available

* Add unit tests for pluralize

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-24 23:41:08 +01:00
Eric Duong
9514e290a2
Static cohort on person modal (#2952)
* Upload static cohort using CSV, closes #2868

* fix tests

* Fix tests

* Fix e2e test

* Avoid double inserts

* Speed up query

* Move to params

* fix tests

* initial cleanup

* initial scaffold for cohort static logic

* intiial frontend changes

* initial working

* fix error on iterable

* stickiness people func refactor

* Use JSON instead of protobuf

* stickiness working

* clickhouse route

* unused import

* move button

* make interface easier to user

* clickhouse support

* restore cache decorator

* endpoint adjustment

* adjust how clickhouse handles inserting for static cohorts

* split out processing into pg

* use worker for clickhouse querying too

* add pg test

* ee test

* add input for cohort naming

* add stickiness test

* condition for when to show save cohort

* fix types

* minor fix

* remove repeats

* remove hardcoded id

* add date handling to trends cohort func

* remove print

* add link on success creation

* cohort working

* fix backend test

* fix cohort typescript

* remove unnecessary kafka topic

* remove brackets

* shift default

* raise exceptions when debug or test is true

* remove test flag

* move trends insight related components to different folder

* change get_earliest_timestamp

* remove extraneous condition

* fix test call

* put behind ff

* fix test x2

* fix tests

* restore exceptions hog

* fix tests

* restore exceptions hog

* fix test x20

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-02-24 09:59:13 -05:00
Eric Duong
23a7c9e2df
Fix clicking datapoint with multiple entities (#3428)
* remove unnecessary condition

* change all refs

* fix switched params

* remove targeet entity from filter
2021-02-23 11:03:14 -05:00
Karl-Aksel Puulmann
f4039003e1
Dashboards: allow changing date filters & refresh (#3363)
* DashboardHeader to ts

* Convert files to typescript

* Use BindLogic instead of passing logics as arguments

* Improve typing for dashboards

* Fix DashboardHeader types

* Improve typing: DashboardItem

* Fix InsightHistoryPanel, SharedDashboard types

* Add WIP code for date ranges on dashboards

* DateFilter/dateFilterLogic to typescript

* Show 'Custom' daterange by default on a dashboard

* Border for dates in Dashboard

* Add dashboard.filters field

* Populate dashboard.filters, use it in code

* Fix some type errors in dashboardItemsModel

* Fetch dashboard items again on date change

* Make dashboard items refresh as dashboard gets updated

* Add refresh button to DashboardHeader

* Make saving dashboard items work again

* Update dashboard type

* Don't update URL in DateFilter

* Update selected time range on load

* Avoid flickering in DateFilter

* Only show 'Custom' in dashboards

* Show calendar icon next to date filter in dashboard

* Avoid double-loading results due to date change

* Kill some duplicated code

* Avoid cache when filters change

(datefilters on dashboard)

* Test individual update_cache method

* Add test for import_from and attributes being updated

* Fix typing errors

* Update api/dashboard tests

* Avoid redirects when changing date range for funnels or retention

Previously funnelLogic might be mounted in the background, causing a
reload

* Add a missing breakpoint

* Reformat with black
2021-02-23 12:19:36 +02:00
Paolo D'Amico
348b50f73f
Fix authenticated invite signup (#3433) 2021-02-22 14:55:02 -06:00
Yakko Majuri
28b548f72c
Rename DAU -> Active Users (#3420)
* Rename DAU -> Active Users

* update test
2021-02-22 12:48:45 +00:00
Michael Matloka
65e5878683
Stricter Team model (#3252)
* Remove deprecated Team.opt_out_capture

* Remove obsolete and unused Team.users

* Make Team.organization, api_token and name stricter

* Add migration

* Add Team.api_token min length

* Adjust 0124_stricter_team for opt_out_capture removal

* Don't remove Team fields

* Update migration

* Update migration

* Set org ID of orgless teams to first org instead of deleting

* Update migration

* Fix

* Ensure that each project has a name before migration

* Rename prepare_teams
2021-02-22 13:14:53 +01:00
Michael Matloka
52cc8b3124
Fix "Finish setup" button (#3416) 2021-02-22 09:11:37 +01:00
Paolo D'Amico
e35ef9df80
Migrate team invite signup to React - Part II (Front-end) (#3300)
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-19 16:53:01 -06:00
Karl-Aksel Puulmann
e50980c06a
Improve reordering funnel steps (#3412)
You can now drag the whole "row" not just by the handle

distance now needs to be set not to interact badly with dropdown menus -
by default it would eat all the clicks.

Fixes #3410
2021-02-19 16:20:54 -05:00
Paolo D'Amico
b25a72d0cf
Support client-side compact number formatting & instrumentation (#3360) 2021-02-19 11:58:00 -06:00
Yakko Majuri
33c989721f
Add created by tag to individual dashboards (#3367)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-19 05:50:18 -06:00
Michael Matloka
cb3127ea3b
Fix tooltips over property type icons (#3404)
* Fix lack of rowKey on EventsTable

* Fix tooltips over property type icons
2021-02-19 13:41:30 +02:00
Tim Glaser
ed919918b3
Fix unselecting fields in action (#3352)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-18 17:09:56 -06:00
Paolo D'Amico
d7aa259d7e
Fix loading billing plans on self-hosted (#3389)
* only load plans on cloud

* move plans endpoints to /api/plans
2021-02-18 19:39:02 +01:00
Eric Duong
f1de2e9002
add properties to filter cleaner for retention logic (#3359) 2021-02-17 19:43:23 +02:00
Yakko Majuri
98b7b85af4
Fix hidden plugin config field (#3364)
* Fix hidden plugin config field

* remove console.log
2021-02-17 15:20:15 +01:00
Yakko Majuri
8e3559a4c2
Update launch toolbar CTA for new nav (#3347) 2021-02-17 13:43:45 +00:00
Eric Duong
66641546d7
Trend component test (#3278)
* temp changes

* more tests

* initial trend tests

* merge master

* remove creepover

* remove stubs

* remove unnecessary check

* remove flaky test

* change fixture

* remove console

* focus tests

* update names

* make test more specific

* remove unecessary check

* fix insights file

* checkout insight file
2021-02-17 13:50:41 +02:00
Karl-Aksel Puulmann
3a6ffad2be
Fix/replace setTimeout in logics (#3337)
* Update kea to 2.3.2

* Clear timeout before unmount

https://sentry.io/organizations/posthog/issues/2212704003/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&statsPeriod=14d

* Fix old kea ts compatibility issue
2021-02-16 12:44:23 +01:00
Michael Matloka
77b01bd9cb
Add Invite Team Member to top bar user dropdown (#3343)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-15 12:25:06 -06:00
Tim Glaser
5c8314ba09
Fix funnel people not showing (#3335)
* Fix funnel people not showing

* funnel viz
2021-02-15 09:50:13 +01:00
Tim Glaser
aa2295467a
Refreshing insights (#3301)
* Refreshing insights

* Fix dashboarditem

* put exceptionhog back

* Fix ts issues

* fix tests

* Fix tests

* Remove printers

* fix type errors

* fix test

* Fix flickering

* Fix issues switching between views

* Use result for backwards compatability

* Fix tests

* Refreshing insights part 2

* Get rid of last refresh

* Add breakpoint

* more breakpoints

* Remove loadFunnel function. TODO issue with refreshing funnel in dashboard

* fix refreshing issue

* fix trends loading

* Fix funnel loading
2021-02-12 16:39:49 +01:00
Tim Glaser
c536deacfa
fix more formula errors (#3326) 2021-02-12 15:31:36 +01:00
Yakko Majuri
cb979c5a2a
Remove Stats from Toolbar (#3040)
* Remove Stats from Toolbar

* wip remove logic

* move buttons down

* run prettier

* top: 15 -> 0
2021-02-12 13:36:22 +00:00
Karl-Aksel Puulmann
9402f753da
Move breakpoints around (#3313)
Solves issue from sentry:
https://sentry.io/organizations/posthog/issues/2212704003/events/eadd52c2f9f84356a1c5a2712c2b8342/?project=1899813
that popped up due to person navigating from trends before API result
came back.

(PS: Thanks marius for the new error messages!)
2021-02-12 11:13:08 +01:00
Karl-Aksel Puulmann
95630f7a6b
Return no data for invalid regexes (#3248)
* Return no data if invalid regular expression

This currently returns a 500. Fixes 3191 together with frontend
validation.

* Add browser validation

* Typing errors
2021-02-11 21:53:58 +02:00
Tim Glaser
45933d39b3
Formulas (#3275)
* Formulas

* Add frontend for formulas

* fix type issues

* fix tests

* fixxx

* fix typing

* Add better tests

* Add more tests and fix various options

* fix pie and ui updates

* fix types

* fix lifecycle and table issues

* Regression test for %B in urls
2021-02-11 20:20:01 +01:00
Karl-Aksel Puulmann
c6d00fc3ee
Allow viewing sessions/recordings on persons page (#3302)
* Add spec for being able to reach session recording to sessions page

* Add basic Person page component test

* Fix viewing session recorings on person page

I broke this in a recent PR by narrowing the URLs down too much to fix
another bug (logics clashing).

* Persons tests pass again
2021-02-11 21:14:28 +02:00
Yakko Majuri
5ad265ca18
Add selection option to plugin config (#3229)
* Add selection option to plugin config

* update naming

* bump scaffold version

* add check for choices

* bump plugin scaffold

* wip handle invalid choices

* handle invalid choices

* bump scaffold

* clean up
2021-02-11 12:25:15 +01:00
Marius Andra
fd57536aa0
Misc plugin improvements (#3288)
* redirect to "repository" tab if no plugins installed

* fix lone "." for empty descriptions

* sort repository alphabetically

* add WIP test to make sure plugins are separated by organisation

* org id can be str

* try to reset membership

* Add permission_classes to PluginSerializer

* don't show tabs if only one tab can be used

* sort installed plugins alphabetically

* don't check for updates if can't actually update

* hide some more information if can't install

* remove 'global' from plugin config

* deprecate unused 'error' field

* fix plugin permission_classes mishap

* fix test, 400 -> 403

* simplify test

* Simplify isinstance check

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-11 11:46:49 +01:00
Paolo D'Amico
465c87240f
Migrate team invite signup to React - Part I (Backend) (#2734)
* base API invite signup

* prevalidate invites

* allowed signed in users to claim an invite

* add more test cases

* remove legacy invite signup

* add trailing slash to endpoint

* post merge cleanup

* bring back signup_to_organization_view to be able to split the PR

* another cleanup

* bring back signup to organization template

* mask_email_address util

* fix typing

* fix tests

* fix analytics metadata

* OrganizationSocialSignupSerializer

* support social auth

* rename company_name to organization_name

* final tweaks

* add organization_name to prevalidate response
2021-02-11 11:46:42 +01:00
Tim Glaser
b9f3d3ec7c
Don't set is calculating for static cohorts (#3297)
* Don't set is calculating for static cohorts

* update frontend

* fix inconsistency

* Add migration and fix typing

* N/A

* typing

* types

* more! typing!
2021-02-11 11:07:12 +01:00
Eric Duong
399b6a544c
Revert "Revert "Revert "2794 retention people (#3108)" (#3264)" (#3271)" (#3295)
This reverts commit 9934b7905d.
2021-02-10 17:04:10 -05:00
Eric Duong
9934b7905d
Revert "Revert "2794 retention people (#3108)" (#3264)" (#3271)
This reverts commit 6b56abe876.
2021-02-10 16:45:53 -05:00
Michael Matloka
ce1d5955b5
Fix instance status page (#3292)
* Fix is_plugin_server_alive to never return None

* Handle void in RenderValue

* Fix typing
2021-02-10 16:08:21 +01:00
Michael Matloka
3111d21afc
Fix retention linear chart in dashboards (#3290) 2021-02-10 14:05:19 +01:00
Karl-Aksel Puulmann
3311b0da5a
Make page not jumpy on initial load (#3246)
By showing side nav even if scene has not loaded.

This fixes #3020
2021-02-10 08:45:28 +02:00
Eric Duong
1dac0ad699
Persons component test (#3266)
* WIP: get cypress something doing

* Get a test running

* Get css loading, stub posthog

* Move helpers to separate file

* Givens > given2

It plays nicer with beforeEach

* Test for session filters

* Test date navigation

* Test filtering

* Try keep old tests running

* Try get tests running under CI

* Prettify fixtures

* Cleanup, use cypress 6

* Add yarn build

* Fix e2e cypress tests

* given2 => givens

* Rename `frontend-test-runner` to `e2e-test-runner`

* Fix cypress test

* add devdependency

* add scaffold

* person test

* fix type

* fix check

* inline fixture

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-02-10 08:25:17 +02:00
Karl-Aksel Puulmann
d507c876ff
Don't show "save" if user has not yet entered all cohort group data. (#3261)
Sentry error: https://sentry.io/organizations/posthog/issues/2062467419/?project=1899813&query=is%3Aunassigned+is%3Aunresolved

From recording I could see that the user filled in Dynamic group >
Action > 7 days, but never picked the action and pressed save. After
seeing no error he stood by for a while.

Also fixes some type errors and a misc bug (choosing action second
deletes days)
2021-02-10 08:24:04 +02:00
Tim Glaser
50ae632d8e
Improve entity rows layout (#3255)
* Improve entity rows layout

* adjust UI

* handle case where mathSelector is not available

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-09 18:32:08 +01:00
Michael Matloka
f71e9899cb
Clean up query timeout notice (#3231)
* Clean up query timeout notice

* Update wording
2021-02-09 18:27:23 +01:00
Michael Matloka
ee7289956a
Enhance Project settings (#3240)
* Update Project Danger Zone to Plugins standard

* Extract PinnedDashboards to own component

* Set default body background to white

* Fix JSBookmarklet note style

* Add project rename

* Expect data-attr in okButtonProps type error

* Rename project name section to "DIsplay Name"

* Use disabled and loading on projet DisplayName

* Add models-side Team.name min length requirement

* Make small fixes on Plugins pages

* Revert "Add models-side Team.name min length requirement"

This reverts commit 97874ed7c2.

* minor copy adjustments

* Make button "Rename Project" and improve interactivity

* Remove teamLogic.connect

* Add project rename success toast

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-09 18:11:53 +01:00
Eric Duong
f8a665a80c
Revert "Refreshing insights (#3144)" (#3269)
This reverts commit b804ba9619.
2021-02-09 11:37:52 -05:00
Karl-Aksel Puulmann
30b6692920
React component tests with cypress (#3233)
* WIP: get cypress something doing

* Get a test running

* Get css loading, stub posthog

* Move helpers to separate file

* Givens > given2

It plays nicer with beforeEach

* Test for session filters

* Test date navigation

* Test filtering

* Try keep old tests running

* Try get tests running under CI

* Prettify fixtures

* Cleanup, use cypress 6

* Add yarn build

* Fix e2e cypress tests

* given2 => givens

* Rename `frontend-test-runner` to `e2e-test-runner`

* Fix cypress test

* Add webpack-preprocessor as a devDependency

* Improve freezing time

* Make css inclusions automatic for component tests
2021-02-09 17:28:01 +02:00
Eric Duong
6b56abe876
Revert "2794 retention people (#3108)" (#3264)
This reverts commit 1dbd3df937.
2021-02-09 09:47:41 -05:00
Paolo D'Amico
3c46b93d9f
Instrumentation Feb-8 (#3238) 2021-02-09 15:17:53 +01:00
Karl-Aksel Puulmann
f3a75f5887
Show toast if signup fails (#3257)
* Show toast if signup fails

Companion PR: https://github.com/PostHog/posthog-production/pull/72

We have been silently showing no errors since https://github.com/PostHog/posthog/pull/3220

* adjust copy

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-09 15:42:29 +02:00
Paolo D'Amico
505507b040
Release onboarding #2822 & final tweaks (#3174) 2021-02-09 14:28:51 +01:00
Paolo D'Amico
ba7866a8c0
Billing page improvements (#3192)
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-09 14:02:31 +01:00
Gustav Westling
afefa3eb43
Updated Go Instructions (#3256)
posthog.NewWithConfig returns two values [1], updated the code to use (but ignore) the error.

os.GetEnv does not work this way, use the API key directly in a string.

1: https://pkg.go.dev/github.com/posthog/posthog-go#NewWithConfig
2021-02-09 13:21:15 +02:00
Paolo D'Amico
8926864949
Fix update indicator on top navigation (#3258) 2021-02-09 12:19:21 +01:00
Tim Glaser
b804ba9619
Refreshing insights (#3144)
* Refreshing insights

* Fix dashboarditem

* put exceptionhog back

* Fix ts issues

* fix tests

* Fix tests

* Remove printers

* fix type errors

* fix test

* Fix flickering

* Fix issues switching between views

* Use result for backwards compatability

* Fix tests
2021-02-08 20:26:36 +01:00
Karl-Aksel Puulmann
3608e3bdf7
Ellipsis for long action names (#3239)
Solves https://github.com/PostHog/posthog/issues/3163
2021-02-08 18:24:13 +02:00
Eric Duong
1dbd3df937
2794 retention people (#3108)
* frontend changes

* backend changes

* remove print

* fix query

* remove print

* fix date

* fix tests

* fix trend query

* type

* adjust again

* another adjustment

* run again

* remove any

* fix array iteration
2021-02-08 10:28:38 -05:00
Paolo D'Amico
c1518e8b97
Fix more z-index wonkiness (#3210) 2021-02-08 16:23:44 +01:00
Karl-Aksel Puulmann
ac4180e551
Fix Cannot read property 'sessionsPlayLogic' of undefined (#3235)
Sentry error: https://sentry.io/organizations/posthog/issues/2205276842/?project=1899813&query=is%3Aunassigned+is%3Aunresolved
2021-02-08 17:03:28 +02:00
Michael Matloka
5e61bd7f80
Improve invites (#3232)
* Clean up Invites component

* Don't overwrite user's clipboard with invite URL unexpectedly
2021-02-08 15:18:06 +01:00
Tim Glaser
c9d607e816
Remove any loaders errors (#3220)
* Remove any loaders errors

* fix typing

* Fix line errors

* Fix formatting
2021-02-08 13:48:16 +01:00
Karl-Aksel Puulmann
159cfc97dd
Improve project deletion (#3234)
* Improve project deletion

I noticed that we immediately reload after project gets deleted - before
the actual request completes and any data is deleted, making it seem it
did not work.

This fixes that, showing a toast while the request is outgoing.

* Fix margin from CreateProjectModal error

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-08 13:14:07 +01:00
Eric Duong
7455b8d2a8
add type and null check before reporting (#3224)
* add type and null check before reporting

* add more types

* make type consistent
2021-02-05 15:56:27 -05:00
Karl-Aksel Puulmann
93e8e3e73d
Fix SelectBox keyboard navigation (#3211)
This was broken since I added support for it in sessions. Typescript
errors were leading to real bugs.

Sentry error: https://sentry.io/organizations/posthog/issues/2161288131/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&sort=freq&statsPeriod=14d
2021-02-05 21:38:31 +02:00
Karl-Aksel Puulmann
5fda581cbd
Add breakpoint() calls to cohortLogic (#3217)
This avoids issues if logic is unmounted before network request
finishes. https://kea.js.org/docs/guide/additional/#breakpoints

Sentry issue: https://sentry.io/organizations/posthog/issues/2072913139/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&statsPeriod=14d
2021-02-05 21:27:50 +02:00
Karl-Aksel Puulmann
a57342e447
Avoid erroring when loading dashboards with no active project (#3214)
Related sentry error: https://sentry.io/organizations/posthog/issues/2070730230/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&statsPeriod=14d
2021-02-05 14:18:35 -05:00
Karl-Aksel Puulmann
d0fef1b520
Remove broken copy-pasted code (#3184)
This code was introduced in commit #1dd7f7342b3cf43f3af96e9efa0f085e7694bc8d
from frontend/src/lib/components/PropertyFilters/PropertyValue.js

This fix seems to work properly, though not 100% sure if we should be
loading properties in this component or not.

Sentry error: https://sentry.io/organizations/posthog/issues/2068768985/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&statsPeriod=14d
2021-02-05 14:18:05 -05:00
Tim Glaser
728410c87b
1269 funnel trends 2 (#3079)
* WIP

* Closes #1269 funnel trends

* Fix tests

* fix

* fix tests

* Hide interval and featureflag display switcher

* fix one step issue

* fix insights

* Fix tests

* undo todo

* Fix label issues, add warning

* fix frontend issue

* fix
2021-02-05 14:32:28 +01:00
Karl-Aksel Puulmann
e0b011c943
Add missing awaits to breakpoint(X) calls (#3216)
Sentry error: https://sentry.io/organizations/posthog/issues/2185594460/?project=1899813&query=is%3Aunresolved+is%3Aunassigned+kea&statsPeriod=14d

According to marius, breakpoint() can be called without await, but when
passing milliseconds await is always needed.
2021-02-05 13:39:23 +01:00
Yakko Majuri
bc625ea18d
Fix numerical person properties turning to strings on save (#3202)
* update props

* fix props number update on PersonV2

* avoid overwriting function argument

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-05 09:01:54 +00:00
Eric Duong
62ded053e4
Type path logic (#3170)
* initial types

* state adjustment

* more type fixes
2021-02-04 20:43:17 -05:00
Eric Duong
2a28955df3
move logic to comparefilter (#3203) 2021-02-04 16:28:51 -05:00
Karl-Aksel Puulmann
daed88dc49
Handle navigation race in insights logic (#3207)
If user navigates away from the page before timeout occurs, the logic
gets unmounted and we would currently get an error:

```
TypeError
Cannot read property 'activeView' of undefined
```

Sentry error: https://sentry.io/organizations/posthog/issues/2181870161/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&statsPeriod=14d
2021-02-04 22:40:12 +02:00
Karl-Aksel Puulmann
9f4dd622e3
Fix recursion problems caused by sessionsTableLogic (#3183)
Related sentry error: https://sentry.io/organizations/posthog/issues/2171433703/?project=1899813&query=is%3Aunresolved+is%3Aunassigned+maximum&statsPeriod=14d
2021-02-04 22:38:45 +02:00
Paolo D'Amico
eea29cc01c
Fix mobile menu z-index (#3198) 2021-02-04 15:28:58 +01:00
Karl-Aksel Puulmann
4c98e78c0f
Fix LinkButton component (#3194)
Caused by Link component updates

Fixes https://github.com/PostHog/posthog/issues/3193
2021-02-04 13:26:38 +02:00
Paolo D'Amico
167a79fa2f
Release navigation-1775 (#3167)
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2021-02-04 10:53:00 +01:00
Karl-Aksel Puulmann
fbd7046c07
Avoid TypeError when assets have been regenerated loading a scene (#3188)
This caused the following sentry error: https://sentry.io/organizations/posthog/issues/2019430827/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&statsPeriod=14d

Problem came from not initializing `importedScene` which is used below
2021-02-04 10:18:08 +01:00
Karl-Aksel Puulmann
8a7ab616be
Fix bug introduced by typing trendsLogic (#3186)
Sentry: https://sentry.io/organizations/posthog/issues/2197447421/?project=1899813&query=is%3Aunassigned+is%3Aunresolved&sort=priority&statsPeriod=14d
2021-02-04 10:03:20 +01:00
Eric Duong
c11970916c
fix condition for disabled compare filter when all time is selected (#3123) 2021-02-04 06:14:48 +02:00
Eric Duong
d0318cc2d0
Type trend logic (#3152)
* initial typing

* move interfaces to top

* add comment

* remove ts

* remove magic strings

* fix typescript errors

* move check

* random tpye error

* run again

* more adjustments
2021-02-03 14:26:17 -05:00
Yakko Majuri
414701ab54
Fix axis labels color on bar charts (#3176) 2021-02-03 14:10:45 +01:00
Paolo D'Amico
de317c8e87
Bulk invite team members (setup section II) (#3143)
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-03 13:03:22 +01:00
Yakko Majuri
c74056151c
Make pies listen to color changes and update (#3157) 2021-02-03 10:56:55 +00:00
Michael Matloka
04c9e3e86b
Wrap saved funnel name smarterly (#3171) 2021-02-03 00:20:55 +01:00
Eric Duong
9cc9d40e21
try catch it (#3168) 2021-02-02 13:19:18 -05:00
Yakko Majuri
a1cb32e0d0
Do not open people modal on retention panel in dashboard (#3162)
* Do not open people modal on retention panel in dashboard

* update ternary
2021-02-02 18:11:14 +01:00
Paolo D'Amico
0624471b4a
Setup Section II & General State (#3129) 2021-02-02 17:04:14 +01:00
Tim Glaser
4e110e1956
Autofocus on email instead of first name on signup (#3155) 2021-02-02 14:24:14 +01:00
Michael Matloka
4e7192cefc
Improve Saved Funnels UX (#3153) 2021-02-02 11:16:49 +01:00
Yakko Majuri
04c949aeee
Fix Person page loading by email under persons-2353 (#3139)
* Fix Person page loading by email under persons-2353'

* remove log

* update fix
2021-02-01 09:23:54 -05:00
Michael Matloka
200b80dd03
Chart above fold (#3142)
* Update TrendInsight minHeight to keep chart above the fold

* Refactor Insights main content for clarity

* Fix PostHog FOSS sync

* Remove extraneous div
2021-02-01 11:22:55 +01:00
Eric Duong
ff3d2d7aae
add null check on eventUsageLogic (#3125) 2021-02-01 06:30:37 +01:00
Karl-Aksel Puulmann
ce342cd35f
Onboarding: Save personalization data (#3126) 2021-01-29 13:47:04 +01:00
Karl-Aksel Puulmann
9afc4a432e
Update demo data warning styles (#3120)
* Update demo data warning styles

Left-over from https://github.com/PostHog/posthog/pull/3103

* minor adjustment

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-29 10:25:39 +02:00
Eric Duong
89770ab270
Apply type and optional checks to billing var (#3121) 2021-01-29 08:58:17 +01:00
Eric Duong
7d52877092
Retention logic types (#3091)
* add null check

* add another check

* add types to retention logic

* change action into ts

* missing optional

* null check

* move types
2021-01-28 13:15:11 -05:00
Paolo D'Amico
e163e9d147
Onboarding personalisation adjustments (retention#9) (#3117) 2021-01-28 18:01:40 +01:00
Paolo D'Amico
d1c2506c40
Onboarding setup page (continues #2822) (#3104)
Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-01-28 16:32:42 +01:00
Karl-Aksel Puulmann
15d04d9e56
Improve demo data (#3111)
* Unify clickhouse and pg demo data creation

* Adapt yakkos demo data generation to normal demo

* Split demo.py into subfolder

* Add original, web data import

Note that elements are not added because they can't be added
automagically :(.

* Improve wording

* dont generate dashboards

* try get tests passing

* fix types

* Get cypress tests green
2021-01-28 13:50:01 +02:00
Tim Glaser
108a50264f
Remove emails from csv (#3115)
* Add team filter to cohort query to speed up

* Fix querying

* Remove emails from CSV upload

* fix clickhouse email
2021-01-28 11:43:46 +01:00
Eric Duong
b912f1ef6a
Add action filter button on remove-shownas flag (#3105)
* add back button

* fix types

* only show on trensd
2021-01-27 16:08:08 -05:00
Marius Andra
9cfd1969aa
Plugin order (#3100)
* fix form type

* split to enabled/disabled plugins and add empty and loading screens

* show ingestion order

* add "rearrange" button

* show alert when rearranging

* drag to sort plugins

* fixes

* move opt-out to "danger zone" in "advanced" tab

* refactor "custom" to "advanced" in the code

* rename to DangerZone

* start rearranging from dragging card

* show changed order

* remove extra button

* save order in the backend

* fix default config for newly installed plugins

* newly enabled plugins go to the end of the list

* mypy

* hide second "check again" button

* show code diff

* lowercase

* clarify string

* reload only if saved, add 403 status if no access, simplify dict

* set temporary order only on enabled plugins, avoiding rearranging "plugins to update" list

* simplify condition

* change empty component

* raise instead of 403
2021-01-27 17:43:27 +01:00
Yakko Majuri
7dc40f2c37
Fix paths background color in dashboard (#3089)
* Fix paths background color in dashboard

* update colors
2021-01-27 15:56:19 +01:00
Eric Duong
62a95fad62
Revert "Revert "Add timeout and error messages"" (#3013)
* Revert "Revert "Add timeout and error messages (#2876)" (#3012)"

This reverts commit 6e7ff0d4db.

* add loadresults to setfilters

* fix ts errors

* fix type§

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-01-27 13:47:11 +01:00
Karl-Aksel Puulmann
249ae881c4
Onboarding: Create demo data, show demo alert at top, route directly to dashboard (#3103)
* Migration for is_demo

* Populate is_demo when triggered

* Refactor: extract create_demo_team

* Also create ee sample data

* Create demo data if feature flag enabled (and in debug), redirect to root

* Show demo warning

* Solve rease issue

* Redirect to personalization

* Redirect to root

* Update antd to latest, which gives access to Alert action prop

* Update demowarning code

* update tests

* Update naming

* Update link
2021-01-27 12:53:10 +02:00
Eric Duong
148559e3b1
only show tooltips when you can actually click (#3093) 2021-01-27 10:58:33 +02:00
Paolo D'Amico
689410d33e
Milestone P1 - #2822 implementation (#3088)
* refactor Signup location

* personalization route stub

* radio buttons base UI

* select radio options

* continue button

* save personalization state

* report personalization answers to PH

* all data & nicer UI

* mark personalization completed on DB

* cannot complete personalization twice

* rename components

* more fixes

* undo completed_personalization as per discussion, @macobo's PR coming

* fix ts
2021-01-27 10:14:39 +02:00
Eric Duong
fcef914182
3072 retention person modal fix (#3080)
* fix time formatting

* fix queries and serializers

* fix ret tests

* fix tests

* fix tests

* remove unnecessary change
2021-01-27 10:01:12 +02:00
Eric Duong
18bb25f264
add refresh param to retention and paths (#3039) 2021-01-26 13:25:43 +01:00
Karl-Aksel Puulmann
1dbbb46f82
Allow configuring session recording retention period (#3074)
* Add session recording retention period column

* Allow setting session recording retention period

Solves #3059

* Run session recording retention task on all self-hosted

Using setting from team.session_recording_retention_period_days
2021-01-26 12:04:39 +02:00
Marius Andra
be0cf32521
Plugins required in preflight check (#3083)
* make plugins required in the setup

* make plugins still optional in dev, but add a strict warning

* Unify text formatting

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-26 00:35:27 +01:00
Marius Andra
64f282b3db
Private token support for GitHub and npm URLs (#3070)
* private token support for github and npm

* refactor url splitting

* mypy

* fix needless regexp escapes

* simplify parse_url output, tag is always tag now

* simplify parsing api response to get latest tag

* add links to api key docs for various providers

* update title

* global _TOKEN settings for github, gitlab and npm (mainly to bump api limits)

* move gitlab api key to headers
2021-01-26 00:35:03 +01:00
Karl-Aksel Puulmann
8023581845
Fix retention "load more" people (#3075)
* Fix retention `loadMore`, #3071

* Retention table to tsx
2021-01-26 01:23:41 +02:00
Karl-Aksel Puulmann
da92f0bbac
Allow rolling feature flags out to multiple groups (#3030)
* Support multiple groups in feature flags model

This will be part of #3007

I did not do a migration since it would cause errors for decide endpoint
once migrations have run but new schema not up.

* Update analytics_metadata method

* Allow defining multiple groups in frontend

* Allow sorting

* Update tests, allow submit without filters.

* Update cypress

* Avoid N+1 queries

* Indicate filters better in table
2021-01-26 01:18:05 +02:00
Marius Andra
bfe6f859ec
Plugin upgrades (#3057)
* upgrade typegen

* check for upgrades in the interface

* refactor plugin scene files

* separate plugins needing updates

* show an update button

* show progress when checking

* actually update plugins + ux improvements

* open drawer if new required and unfilled field

* better loading for plugins

* fix frontend type error

* fix backend test

* Do tiny cleanup of version labels

* clarify role of custom.d.ts

* cache plugin update status for 30min, refresh update status on page load if stale

* fix tests

* Fix capitalization in updates check button

* fix bad merge

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-26 00:13:47 +01:00
Yakko Majuri
35c987f3df
Add autofill for posthog props in plugin config (#2838)
* Add autofill for posthog props in plugin config

* fix types

* restructure logic

* code quality

* fix code quality

* refactor api key generation

* more cleanup

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-01-25 23:36:14 +01:00
Paolo D'Amico
bc3a59ab10
Various fixes 210122 (#3058) 2021-01-25 11:38:21 +01:00
Paolo D'Amico
09283afcbe
Refactor web ingestion onboarding & add bookmarklet (#2953) 2021-01-25 10:49:59 +01:00
Eric Duong
eb279d142f
Show progress in retention table (#2995)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-25 10:24:00 +01:00
Marius Andra
3259f8e706
Some typescript fixes (#3049)
* fix sceneLogic and teamLogic

* personLogic one fix

* navigationLogic type

* topContentLogic type

* personalAPIKeysLogic type

* BackTo type

* few other quick wins

* Update blacklist after rebase

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-01-25 11:05:36 +02:00
Marius Andra
88e1300a14
fix exception when using a bad selector to select actions (#3067) 2021-01-25 09:35:07 +01:00
Karl-Aksel Puulmann
365243a102
Fix session recording breakage (#3045)
* Fix broken session recording case

No strict typescript makes me sad. This property was gone during
refactoring, probably broken due to parallel PRs.

* Make pagination respect filters
2021-01-25 08:49:55 +02:00
Marius Andra
19b453c996
Kea TypeGen types in the same folder as logic (#3048)
* update kearc to generate types in the same folder, add types to gitignore

* update type imports
2021-01-22 10:21:48 +01:00
Yakko Majuri
7c0cc81105
Hide plugins from nav in Cloud (#3038)
* Add plugins on new nav behind feature flag (cloud)

* filter by plugin org access

* remove accidental commit
2021-01-21 16:23:02 -03:00
Eric Duong
7001a1ce02
patch null check (#3037) 2021-01-21 11:22:52 -05:00
Karl-Aksel Puulmann
29c1ed954d
Allow filtering by unseen recordings (#3000)
* Add model for session recording viewed

* Save view when querying for session recording data

* Send information to FE about whether session has been viewed

* Allow filtering by "recording unseen"

* Rename property

* Update migration
2021-01-21 09:42:00 +02:00
Tim Glaser
811e414ce3
Standardize created at and by table columns (#2961)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-20 20:08:31 -06:00
Eric Duong
6e7ff0d4db
Revert "Add timeout and error messages (#2876)" (#3012)
This reverts commit c2f844c832.
2021-01-20 09:51:35 -05:00
Marius Andra
10b5f20f80
Plugins page UX improvement (#3006)
* open drawer if plugin installed but never configured when toggling switch

* ?.

* set initial/unsaved changes when opening plugin drawer

* set "enabled" to true when installing plugin

* use plugin url as key to remove installed plugins from repository, not name

* extra fix

* disallow multiple plugin installations from the same URL
2021-01-20 14:16:29 +01:00
Tim Glaser
c2f844c832
Add timeout and error messages (#2876)
* Only grab recent events in Events list

* Add timeout and error messages

* Add timeout messages to other items

* Add instrumentation, fixed issues

* Longer timeout for plugins

* update UI for error message

* UI for timeout message

* Fix funnel timer, improve error message

* change icons when timeout has elapsed

* Fix error messages

* Fix funnel loading timeout

* fix errors

* fix exception

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-20 12:45:08 +01:00
Karl-Aksel Puulmann
9354b7ce64
Highlight filtered events in events table and in session recording (#2954)
* Highlight rows from sessions which are matched by the filter

* Send start_time of recording to frontend

This helps us calculate offsets a bit better

* Use timestamp by server for date shown

* Load session events via kea logic

* Update rrweb, rrweb-player

* Highlight events user is filtering for in sessions player

* Handle empty case properly

* Add positive test

* Order session recording events in query

* Fix filtering by multiple events with differing names

previously only the first would have been used due to overlapping
params.

* Return all highlighted times as action_filter_times

* Send back ids not timestamps

This avoids weird rounding errors causing issues

* Show skeleton for longer

* update typing

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-19 21:16:42 -06:00
Karl-Aksel Puulmann
c245af6a3e
Filters design followups (#2993)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-19 20:58:21 -06:00
Eric Duong
0a68184cc4
Use utc moment for retention dates and fix modal title (#2998) 2021-01-19 20:54:15 -06:00
Marius Andra
2dc132e388
Plugins Design Refresh (#2939)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-19 18:16:18 -06:00
Karl-Aksel Puulmann
a612a6b6bd
Sessions filters design (#2987) 2021-01-19 08:20:21 -06:00
Yakko Majuri
f39877f869
Add Community tag to plugins (#2982) 2021-01-19 11:11:41 +01:00
Paolo D'Amico
6daaae8cfd
add and indicator to feat flags (#2959) 2021-01-19 11:08:37 +02:00
Eric Duong
7bc28ca282
Fix prop operator not changing (#2981)
* always allow operator to be changed

* use diff solution
2021-01-18 16:28:48 -05:00
Tim Glaser
e6b7ac88ca
Fix options not loaded (#2973) 2021-01-18 15:29:21 +01:00
Paolo D'Amico
c2d38947b3
fix text_muted var (#2969) 2021-01-18 07:53:20 -06:00
Marius Andra
e3256e3ef0
Add link to plugin troubleshooting if server offline (#2936)
* add link to plugin troubleshooting

* Link directly to "Plugin server is offline"

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-18 13:55:03 +01:00
Marius Andra
0a990ff0e3
Lessen the language in the plugin opt-in warning (#2968)
* lessen the language in the plugin optin warning

* Reword slightly for approachability

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-18 13:51:29 +01:00
Calvin
7b74845cb7
Fixes #2942: Order tooltip by volume (#2960) 2021-01-16 10:06:29 +01:00
Karl-Aksel Puulmann
7103c37a7b
Trends: small fixes (#2956) 2021-01-15 08:53:36 -06:00
Karl-Aksel Puulmann
62dedd9610
Capture rageclicks for posthog (#2957)
Let's see if/how it works, this way we can shout this out next release.
2021-01-15 15:49:49 +01:00
Tim Glaser
1a6207d791
Upload static cohort csv (#2932)
* Upload static cohort using CSV, closes #2868

* fix tests

* Fix tests

* Fix e2e test

* Avoid double inserts

* Speed up query

* Move to params

* fix tests

* Use JSON instead of protobuf

* unused import

* produce instead of produce_proto

* Insert directly into clickhouse, no need for kafka

* a few quick fixes

* insert in batch to clickhouse

* test SQLi since we can't really trust what we are inserting

* Extra check for duplicates

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2021-01-15 11:19:31 +01:00
Karl-Aksel Puulmann
17a31f0b43
Speed up sessions list query (#2934)
* Remove (apparently) useless person joins from sessions sql

* WIP: Make sessions list query use python iteration

* WIP: Show loader while session data is loading

* Aggregate together sessions

* Calculate start and end points of session separately

* Remove cruft code

* Load session events asynchronously for self-hosted

Note clickhouse behavior is unchanged.

* Update pagination logic for sessions

In addition to offset, postgres now returns a dict containing person_id,
timestamp which is used to make sure we filter events on different pages
correctly

* Add some tests to SessionListBuilder

* Fix typing errors

* Fix pagination limit

* Move tests to right file

* Query less events for sessions list

Since we're ordering by end_time we know events before last end_time are
all processed.

* Add test for current_url behavior

* Make sure old tests remain working

* Remove unused base class

* Move sessions-related queries to separate subfolder

* Extract sessions list code to separate file(s)

* Sort sessions by end time in ch as well

* List end time in sessions table

* Return person email when querying sessions lists on postgres

This gets used by the view

* Return email over all user properties for sessions in clickhouse and view

* Fix an ordering bug

* Fix a pagination bug

* Fix endpoint

* Fix basic sessions tests for pagination

* Sort consistently for sessions list builder

* Roll pagination into filters
2021-01-15 01:53:28 +02:00
Paolo D'Amico
39270b3249
Insights data instrumentation (#2787) 2021-01-14 10:59:20 -06:00
Eric Duong
e0980027eb
make flag explicit (#2947) 2021-01-14 09:53:08 -06:00
Paolo D'Amico
d91cc21217
More key feature instrumentation (#2811) 2021-01-14 07:36:44 -06:00
Paolo D'Amico
6c31678016
Add pinned dashboards to new navigation (#2906)
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-13 09:18:31 -06:00
Eric Duong
ca54574374
remove unnecessary action properties iterating (#2926) 2021-01-13 15:13:19 +01:00
Eric Duong
953509b849
change datepickers to rangepicker (#2922) 2021-01-13 14:41:51 +01:00
Karl-Aksel Puulmann
19c50a2bfe
Sessions filtering system (#2912)
* Refactor adding filtering component

* Fix a type error

* Rename events to entries

This makes much more sense since you can select e.g. actions

* Start of the session filter box

* WIP: Sessions filtering

* Make SelectBox more generic

* Make sessions filtering visuals

* Extract operator value selection code

* Make action properties filterable

* Make it possible to filter by cohorts

* Filtering by events

* Make loading sessions possible with the new logic

* Make it possible to filter by actions/events via backend with new code

Note that it's all relying on old 'paths' - will refactor these later.

* Make it possible to filter by user properties

* Update imports

* Small fixes for sessions filter

* Add UserFilter file

* Ignore extra args to Property

* Make it possile to filter by recording duration

* Update how session duration filter works in the backend

* Rename a few columns

* Remove dead mixins

* Remove duplicated logic, put code behind feature flag

* Move sessions filters logic to subfolder

* Don't show properties if feature flag.

* Add saved filters support

This will require some discussion with Paolo - probably want to show
this on the side?

* Add divider before sessions table

* Narrower typing for recordings

* Some frontend for saving filters

* Small rename

* Add SessionsFilter model

* Save filter on backend

* add missing filter

* Extract const

* Make ActionFilterDropdown be able to pick actions again.

* Fix links from person modal to sessions

* Update tests.

* Fix database model

* Use proper deep equal for detecting active filter

* Remove unneeded field

* Only return filters from correct page

* Add missing data-attr

* Add instrumentation

* rename component

* Fix analytics metadata
2021-01-13 14:55:06 +02:00
Michael Matloka
598aea06b9
Make Jest tests work better with TypeScript (#2558)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-12 17:46:59 -06:00
Eric Duong
c3f248513f
Switch user prompt location (#2924)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-12 16:00:31 -06:00
Eric Duong
650bc428d3
Remove shownas filter and move stickiness/lifecycle into separate insight tabs (#2899)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-12 12:12:42 -06:00
Marius Andra
db7b3fef96
fix clearRetention (#2919) 2021-01-12 16:53:14 +01:00
Eric Duong
ed324fd793
add bordercolor var to missing change (#2921) 2021-01-12 16:23:56 +01:00
Marius Andra
1031329986
Fix dashboard colors with non-white backgrounds (#2911)
* fix local variable bug

* add "no-shadow" rule as a warning

* fix two blue lines on line graphs
2021-01-12 12:43:54 +01:00
Eric Duong
70a6ecb407
Separate math aggregates (#2885)
* separate math aggregates

* add data attr back

* adjust cypress

* make sure tooltip is viewable

* Show total by default

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-01-11 14:28:29 +01:00
Paolo D'Amico
5f726ee485
Hotfix - Papercups chat collision (#2908)
* use distinct ID in Papercups to avoid collision

* Add user_id to Papercups customer metadata

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-11 02:02:01 +01:00
Eric Duong
11a7388477
fix missing action when returning from dashboard (#2884) 2021-01-08 16:29:26 +01:00
Eric Duong
95c9a4ee1c
fix dataindex (#2883) 2021-01-08 16:00:53 +01:00