0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
Commit Graph

28 Commits

Author SHA1 Message Date
Michael Matloka
4fe9b3c0ad
Aggregate functions on Trends (closes #1193) (#1217)
* Update entityFilterLogic for filter.math_property

* Add new math types and math_property to ActionFilterRow

* Add backend support for new math types

* Update data-attrs

* Add dropdown Cy test

* Add API tests

* Improve process_math style

* Add resiliency to non-number property value occurences

* Annotate for clarity

* Update UI text

* Update UI text a bit more

* Reword tooltip

* Update UI slightly

* Update capitalization

* Improve internal style

* Improve code style

* Filter out property `token`

* Utilize formatted string

* Don't show empty dropdown contents

* Add event_properties_numerical for the future

* Fix dropdown button title
2020-07-21 16:18:11 +02:00
Eric Duong
9ffa069f7e
Add comprehensive Cypress tests for dashboards (#1171)
* integration tests

* pop last_refresh

* add tests
2020-07-10 13:21:30 -04:00
Eric Duong
9fb2f64cba
Annotations (#1120)
* draw a vertical line

* some annotation

* progress

* progress on logic and mouse events

* popover aligned

* comment popup working

* fix spacing

* add model

* annotation endpoint

* initial working

* frontend create dashbaord item with annotations working/ modified model

* remove plugin

* add sizing hook

* fully working basic implementation

* style the notes

* annotations delete

* annotations base complete

* tweaking spacing and styling

* enforce input limit

* format

* add margin

* restrict deletes to proper users

* modify styling

* add api tests

* add error boundary to graph

* fix code comments

* fix lint

* fix how name is determined

* nit

* refactor into logic

* ux fixes

* colors

* inting errors

* fix dashbaord test

* remove hardcoded test

* fix linting again

* remove autofocus

* add dynamic spacing for annotations and fix margins

* more patches

* disable annotations on compared graph

* code fixes

* fix mouseover detail

* add patch

* add control for mousedown

* add condition

* add escape key functionality

* refine boundary recalculation condition

* missing call

* fix dragging listener

* some refactoring and add control for dragging/popup

* better control when clustered

* one more tweak

* use ref again

* add condition

* another condition

* remove animations

* limit area

* adjust spacing

* condition

* minor fix

* colors

* more patches

* use draggablecancel

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-07-10 10:28:15 -04:00
Kaushik Asp
777d9a871f
Allow filtering retention table (#1165)
* Closes #1108 Allows filtering of retention table

* Adds logic to parse properties(filters) from the URL and including the filters while making api request for data

* Adds PropertyFilters component to the rentention table scene

* Adds props that are passed on to the RetentionTable component so that the properties prop is populated

* Fixes failing tests since the person_id wasn't added to the event objects

* Fixes type error for json loads

* Adds frontend and backend test

* Removes print statement
2020-07-09 15:26:47 +02:00
Eric Duong
fb10127633
add requirement for password (#1162)
* add regex requirement for input and prompt

* update test with new password restrictions

* fix more tests
2020-07-08 09:44:29 +02:00
Yakko Majuri
37d4b0ead2
Added backend checks to required signup fields (closes #1128) (#1145)
* added checks on input for setup_admin and signup_to_team (#1128)

* added comment about is_input_valid

* minor formatting changes to tests for improved readability

* uncommented cypress/plugins/index.js

* reverting cypress example plugin file to original state

* fixed invalid input tests
2020-07-08 09:41:10 +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
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
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
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
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
9c393c4381
470 filter by event name (#1024)
* Bump posthog-js 1.2.2

* Closes #470 allow filter by event name

* Add cypress tests

* Fix test

* Fix inconsistencies
2020-06-17 11:46:22 +02:00
Eric Duong
65fedb23e4
Sessions view (#926)
* initial foundation for sessions

* initial ui

* updated icon

* temporary repeated code

* aggregated properly

* working onclick row

* reorganize sessions logic

* paginate

* update test

* fix typing

* remove materialize script

* .

* add api test

* add e2e test

* update label

* fix test

* initial working materialize sessions

* add ellipsis

* working with double migration

* remove materialized and paginate properly

* undo migrations manifest

* remove unneeded diffs

* fix test errors

* fix test

* remove button when unnecessary

* fix logic

* linting error

* styling fix

* more styling

* .

* fix test

* Add cursor pointer

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-06-16 13:49:31 +02:00
Eric Duong
43d3b632b0
Capitalize actions and cohorts buttons (#1019)
* capitalized

* one more title
2020-06-15 20:43:14 +02:00
Tim Glaser
9b8736d576
Fix cypress linting errors and speed up tests (#865)
* Speed up e2e builds

* Don't go to demo when logging in/cypress errors

* Execute cypress in docker container

* Pull from correct image

* add -T

* Try something else

* Add dockerfile

* Don't push tags

* Tag

* Try another tag

* image tag

* Try pulling

* Try

* Try caching

* no docker ifle

* Install node

* name

* name
2020-06-08 19:34:39 +01:00
James Greenhill
f37adf3548
Cache yarn builds to speed up end to end testing (#927)
* Cache yarn builds to speed up end to end testing

* refine configs a bit

* map port to localhost for redis and postgres

* background posthog so we can proceed to next step

* test debug=1

* debug back to false

* block on posthog boot for debug

* back to single boot posthog step

* check response from login url

* see if this is ssl redirect

* more debugging around wait

* print out redirect to see where it is going

* print redirect location from header

* this is so tedius

* hit setup_admin url

* ok, so we know it's 500-ing let's see what response is

* reflect production docker file more closely for dep building

* posthog is up, let's see what it is returning that is causing failures

* Save screenshots as artifacts

* rename artifact and use zip

* demo is missing?

* only upload artifacts if cypress fails

* use the path for screenshots for artifacts

* clean up wait script and call it done for this PR

* correctly hash requirements for pip cache

* cache build and dep separately for yarn

* change to test the cache

* use cypress suggested runner for actions

* use parallel execution for cypress

* skip python caching for now

* not going to use parallel now because premium feature of cypress

* do not attempt to archive video artifacts

* re-enable pip cache 🤞

* bust the python cache and see if we can't get manage working

* test python cache

* it's just caching the pip cache...

* test turning DEBUG false

* reenable debug mode for now

* collectstatic after yarn build

* run collectstatic with noinput
2020-06-06 10:13:09 -07:00
James Greenhill
9bfb4f3802
Wait for PostHog to start serving requests before running cypress (#920)
* Work towards more reliable run of cypress

* health endpoint

* don't use requests lib

* update copy a bit since we are not waiting for frontend to build
2020-06-04 12:42:09 +01:00
Eric Duong
5cb8e9c409
Fix Initial Overlay (#904)
* fix overlay so that components aren't rendering over one another and use hooks

* fix linting err

* change cypress test
2020-06-03 17:13:42 +01:00
Tim Glaser
c49a608722
Events table antd (#895)
* Add property key descriptions to breakdown filter

* Change name in eventstable header

* Move events tables to antd

* Fix test

* Move live actions table over

* Fix tests

* Fix tests

* Fix test

* add pointer to row

* person spacing

Co-authored-by: Eric <eeoneric@gmail.com>
2020-06-01 17:37:36 +01:00
Tim Glaser
72fe7e1c73
Fix selecting filters (#844)
* Fix selecting filters

* Test

* Handle case in urlToAction
2020-06-01 16:08:05 +02:00
Tim Glaser
ce4da7a1f3
Improve app urls (#863)
* Improve app urls

* Remove saved message

* Add cypress tests

* Only show toast when saving URL

* Fix tests
2020-05-27 11:50:46 +01:00
Tim Glaser
4b31532025
Add property filters to actions + lots of improvements (#841)
* Add property filters to actions

* Show calculating of acitons and other improvements

* Fix delete, add toast back in and change toast colour

* Fix cypress tests

* Fix e2e

* Fix cy tests

* Remove double events

* Fix tests and event not saving

* change name

* Fix tes

* Empty result set error
2020-05-27 11:26:36 +01:00
Eric Duong
720c06f9e6
E2e important paths (#802)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres

* test all pages

* basic actions per page and create funnel

* trend breakdown filter

* test create action

* add DAU and entity-specific filter

* uncomment

* run test

* .

* add clicks to tables

* add auth

* add changelog

* add dashbaord click

* uncomment test for single funnel

* add test for pinned dashboard

* fix copy paste button and add invite team link tests

* use data-attr for all filtesr

* fix overall filter

* remove filter

* disasble virtual scroll

* uncomment

* remove unnecessary

* run again

* increase timeout

* remove flimsy test

* run again

* add cypress checklist item

* force click cohorts button

* add opt out capture for tests

* remove some tests

* run twice

* .

* run twice
2020-05-22 12:34:48 -04:00
Tim Glaser
f74874b972
772 add is true and is false (#777)
* Closes #737 filter by person properties

* Remove unused selectStyle

* Only get what we need

* show value

* Hide event properties if filtering by person

* Speed up event filtering

* Fix type error

* Remove unused properties_to_Q function

* Fix test

* Closes #772 filter is true/false and is set

* Closes #737 filter by person properties

* Remove unused selectStyle

* Only get what we need

* show value

* Hide event properties if filtering by person

* Speed up event filtering

* Fix type error

* Remove unused properties_to_Q function

* Fix test

* Fix endpoint laoding

* Fix objects filtering

* Fix changing operator

* Fix setting correct value when selecting is_set

* Filter out empty properties

* Fix cohort people properties

* Fix funnel

* Fix cypress test

* update cypress tests

* .

* .

Co-authored-by: Eric <eeoneric@gmail.com>
2020-05-20 12:03:19 -04:00
Eric Duong
a012aa6723
Cypress tests (#789)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres
2020-05-19 14:48:10 -04:00