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

114 Commits

Author SHA1 Message Date
Alex Gyujin Kim
a64212d3f5
Use trends legend graph everywhere (#4646)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-06-09 20:30:51 -07:00
Marius Andra
ef2b6acda0
Misc fixes from 4571 (#4658)
* simplify cypress nav menu clicks

* clean unused annotations code

* don't blank all cohorts when deleting one

* add data-test-filters-loading to better target loading indicators in tests
2021-06-09 16:58:34 +02:00
Marius Andra
3e65af436d
Frontend Models (persistent logic) (#4627)
* move event and property definitions to models, refactor models to import via component if user present

* rename Logic to Model

* add personPropertiesModel

* refactor sessionFilters to use personPropertiesModel

* remove personProperties from inside propertyFilterLogic and use the model

* break ternary

* fix cohort and feature flag tests (for virutalized lists)
2021-06-08 15:16:10 +02:00
Alex Gyujin Kim
af969b45be
[Fix] Annotations list not refreshing after creating annotation (#4564)
* Fix list not refreshing after create annotation

* typescript magic and refactor createGlobalAnnotation to loader
2021-06-04 15:24:12 +02:00
Dimitris Mazarakis
da16909b6f
Remove feature flag for hotkeys buttons for insights page and add hot… (#4430)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-05-26 05:51:30 -07:00
Buddy Williams
b15232a9ef
wip: support test_ api key (#4206)
* wip: support test_ api key

* Renamed test_environment property to

* Added Prod/Test switch to determine which environment to show data for

* moved environment toggle behind feature flag

* corrected key name to standard $ names

* Moved hidden filters to PropertyKeyInfo for improved clarity

* fix typing

* proposed UI

* Renamed  to ; Changed  to a string and added environment const types: production, test; Moved  into a hidden filter along with environment types for the frontend; Corrected tests to use environment constants;  is no longer set by default but only when test_ is supplied in the apiKey or  is manually supplied; Moved environment to navigationLogic;

* Added filter for test environments so that when it's enabled all test environments are filtered out

* Remove component if feature flag for test-environment is enabled

* adjust style of tooltip

* adjust UI based on @corywatilo's input

* implemented toggle functionality

* Made Environments an enum for clarity

* Moved environment constants to constants.py for consistency

* Moved Environments into constants for consistency

* Using parameter destructuring for better syntax

* Make sure type is set as a string

* Removed test filters

* Created _clean_token to ensure test_ is removed from all the places

* Bug fixes for adding filter property so that it work properly

* Show test account filter

* ensure token isn't None so that mypy checks pass

* Corrected css selector syntax

* removed quote since it's not needed

* Corrected cypress test by excluding featureFlag usage on shared dashboard scene

* Fixed test

* corrected syntax style issues

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
Co-authored-by: Buddy Williams <buddy@Buddys-MacBook-Pro.local>
2021-05-21 11:34:07 -04:00
Tim Glaser
bbb4025ab1
Fix e2e tests (#4357)
* Fix e2e tests

* Run as 'production' to better mimick CI

* try no self capture

* Correct event/property definitions

* fix

* fix system status

* Try caching cypress separately

* Cache node modules

* cache pip better

* fix tests

* dont run if not cache

* test

* Cache cypress

* Fix event definitions

* Fix and speed up

* try fixing

* fix

* fix

* faster install

* try self capture 1

* fix multiple

* fix

* fix

* fix

* more speeding up

* Fix tests

* try not installing deps

* fix test global

* possibly quicker

* correct

* Fix
2021-05-20 16:42:26 +02:00
Tim Glaser
1ae890fbe2
1534 configurable columns person events table (#4141)
Co-authored-by: Mohit Gupta <mohitgupta3mail@gmail.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
2021-05-13 14:13:54 -07:00
Li Yi Yu
b2180412ba
Revert dashboard item view (#4286)
* lint fix

* revert update

* revert everything
2021-05-10 14:11:35 -04:00
Michael Matloka
69669adbb9
Enhance PropertyKeyInfo (#4235)
* Enhance PropertyKeyInfo

* Prepend "Initial " to $initial labels

* Add Brooklyn example for $geoip_ props

* Try improving E2E test quality
2021-05-07 02:26:42 +00:00
Li Yi Yu
19d30428ce
Dashboard item page view (#4142)
* add dashboard item information to insights page

(cherry picked from commit 63cec8e6c9416a3d89a0420894c9184dec36256d)

* update all dashboard item links

* add logic to include dashboard name on insights dashboard item

* add back to dashboards link and update all dashboard item links

* style clean up

* typescript fixes

* add comments for posterity

* update dashboard item design and componentize item header

* remove dashboardName variable

* refactor displayMap

* update dashboard item logic and props

* span fix

* clean up insight dashboard item view url

* fix weird state bug with trends

* update dashboard item view for paths

* clean up params for dashboardItemHeader

* maintain update dashboard item functionality

* bandaid fix retention insight history bug

* remove stale comment

* typing tweak

* feedback updates

* url namespace update for clarity

* update e2e

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-05-05 13:58:09 -04:00
Karl-Aksel Puulmann
f512028bff
Fix organization membership changing (#4177)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-04-30 18:21:23 -07:00
Tim Glaser
bc24c52804
Attempt to fix e2e retention test (#4180)
* Attempt to fix e2e retention test

* attempt 2
2021-04-30 18:29:39 +02:00
Li Yi Yu
1de3dbf272
3901 Update standard events display (#4010)
* Closes #3901 add PropertyKeyInfo to select box list

* add more event properties

* update standard events on insights dropdowns with PropertyKeyInfo

* fix borked styling

* add more events to the property key info list

* update standard events with property key info for events tables

* typescript error fixes

* resolve finicky typescript null object error

* e2e updates

* update e2e

* update e2e trends filter selector

* fix events filter bug

* update break down button event name

* e2e fix

* wrap in div and style fix
2021-04-20 15:45:49 -04:00
Paolo D'Amico
5ec9aefaa2
Miscellaneous improvements (#4003)
* fix person header icon

* refactor and simplify WebhookIntegration

* do not show error messages related to /billing endpoint

* fix a bunch of ts errors

* clarify anonymous users

* minor tweaks
2021-04-16 14:07:16 -04:00
Paolo D'Amico
6b79a07464
Invite sign up E2E tests (#3591)
* create invite test

* using an invite

* accept invite signup logged in

* fix leaving org

* address feedback

* fix ts

* remove invite signup flaky test

* switch logout form

* fix typo

* another typo?

* nav directly

* undo change

* post-merge fixes

* cleanup & update tests

* make tests less random

* fix tests

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-04-16 16:05:02 +02:00
Paolo D'Amico
2f4ced3255
Renames Active users to Unique users (#3930)
Co-authored-by: Ibrahim Ahmed <atbe@users.noreply.github.com>
2021-04-08 17:20:17 -07:00
Paolo D'Amico
b1d74ebe9f
Fix navigation to insights from dashboards (#3928) 2021-04-08 15:57:12 -07:00
Paolo D'Amico
ae6b8eef90
User V2 Part II - Frontend changes (#3866) 2021-04-08 13:40:29 -07:00
Michael Matloka
a2ff10ab52
Fix Cypress tests on forks (#3892)
* Replace README contents with a single link to Never Gonna Give You Up

* Assert event name

* Add some clicks

* Remove a sessions Cy test because of insufficient demo data

* Reenable Apply table filter test

* Revert "Replace README contents with a single link to Never Gonna Give You Up"

This reverts commit 1b2fe76304.
2021-04-08 19:51:37 +02:00
Tim Glaser
913f819c44
Fix commandpallet test (#3911) 2021-04-08 15:18:32 +00:00
Paolo D'Amico
262e28497c
Fix cypress dependencies (#3881) 2021-04-06 09:21:21 -07:00
Eric Duong
5cfc7ca500
Release remove-shownas (#3851)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-04-05 15:46:15 -07:00
Tim Glaser
e532223435
Fix feature flags insight link (#3865) 2021-04-02 13:07:33 -05:00
Paolo D'Amico
da61c55666
Description & tagging on dashboards (#3756) 2021-03-26 17:38:13 -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
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
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
Tim Glaser
3b2ceee89e
Fix organization settings (#3643)
* Fix organization settings

* add test

* fix
2021-03-14 17:12:56 +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
Tim Glaser
26fdfabc35
Fix funnels with only events (#3593) 2021-03-06 11:37:55 +01:00
Paolo D'Amico
78bfade0df
Post-release 1694-dashboards (#3513) 2021-03-03 07:17:43 -08:00
Paolo D'Amico
7e10a4f06c
Release Persons V2 (persons-2353) (#3461) 2021-03-02 11:18:04 -08: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
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
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
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
Tim Glaser
2297b0f1cf
Grab all events and properties even if job hasn't run yet (#3200)
* Grab all events and properties even if job hasn't run yet

* Use next on generator instead of list comprehension

* Replace IndexError with StopIteration

* Don't raise StopIteration at all

* try delay

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-08 18:34:27 +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
Eric Duong
f1bb651b70
removee proj seetting test (#3179) 2021-02-03 19:15:16 +02: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
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
Eric Duong
4b7b0d5abe
just match on localhost (#3002) 2021-01-19 21:37:30 +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
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
Tim Glaser
e7cf836d59
Merge person modal (#2644)
* WIP merge person

* Warning message

* Fix test

* fix

* Fix small issues
2020-12-10 15:37:30 +01:00
Michael Matloka
1c80aca907
Cleaned up system status page (#2682)
* Polish system status page

* Show system health badge to is_staff users on Cloud

* Update Cypress test

* Correct inconsistent scene name

* Use RDBMS enum instead of constants

* Add "Analytics database in use" to System Status

* Fix typing
2020-12-09 13:57:12 +01:00