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

669 Commits

Author SHA1 Message Date
Marius Andra
7439577aa9
Toolbar Action link to PostHog after save (#1313)
* set up react-toastify with toolbar

* show links to actions/insights when adding action
2020-08-03 20:03:22 +02:00
Eric Duong
bc7f12cb95
save properties on switch (#1302) 2020-07-30 19:48:52 +02:00
Tim Glaser
7d8bfbba21
By default create annotations globally (#1296)
* By default create annotations globally

* add condition explicitly to checkbox

* fix bug wherre global was being recreated

* fix toParams function

Co-authored-by: Eric <eeoneric@gmail.com>
2020-07-30 19:24:13 +02:00
Marius Andra
cf98e8ba35
Toolbar Typings (#1306)
* update to kea-typegen that runs through prettier

* remove posthog-js yalc package regression

* add types to toolbar

* add react-dom and react-redux types

* add types to toolbar react components

* convert a lot of components to typescript

* convert more components to typescript

* fix error

* actions return void

* clean up other Type.ts files as well

* fix last untyped files

* upgrade kea, fix webpack config entrypoint

* add stricter typechecking

* add types for a few more files

* fix bug with nth_child selectors (introduced in this PR, now fixed)

* fix one more type
2020-07-30 19:16:59 +02:00
Eric Duong
8d92f9897d
add override (#1298) 2020-07-30 11:17:34 +02:00
Eric Duong
7dc4e2e45f
Consolidate features (#1265)
* bring retention table and paths to trends page, refactor tabs

* fix filters

* remove add dashboard item

* add funnel to insights

* add funnel to insights

* add url handling

* add people table to funnel insight

* chart filters

* funnels date filter working

* add comments

* prop and date filters working

* fix default states

* add types for dashboard visualizations

* save funnel

* dashboard items working

* reformat tabs

* fix links

* fix tests

* fix tests

* add missing labels

* change trends to insights

* fix funnel filtering

* add test

* add clear funnel ability
2020-07-29 17:51:49 +02:00
Marius Andra
f2b8d54ee5
Kea TypeGen 0.0.31 (#1297)
* update to kea-typegen that runs through prettier

* update logic type files

* remove posthog-js yalc package regression

* upgrade to 0.0.32 that fixes error with string literals in defaults

* prettier wants to reformat things
2020-07-29 11:21:00 +02:00
Eric Duong
1efc1d8a90
fix gutter condition and global loading (#1291) 2020-07-28 22:35:46 +02:00
Marius Andra
3f47ad2d0c
Kea TypeGen (#1286)
* update typescript eslint config / fix tsconfig.json path bug

* add kea-typegen and UserType

* kea-typegen first run, add types to userLogic
2020-07-28 22:25:24 +02:00
Eric Duong
ebc0e9af38
prevent refresh when no property is added (#1285) 2020-07-28 22:18:23 +02:00
Eric Duong
5bf1fbedef
Fix timestamp on session list (#1294)
* make types consistent

* fix dates

* clear load more when changing dates
2020-07-28 22:15:35 +02:00
Michael Matloka
b75a46d5d7
Team management resolved (closes #260) (#1274)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2020-07-24 11:59:22 +02:00
Tim Glaser
a7bc824d19
Fix funnel loading on dashboards (#1266)
* Fix funnel loading on dashboards

* Fix adding funnels
2020-07-23 13:51:25 +02:00
Tim Glaser
31f3185776
Closes #1020 WIP shared dashboards (#1071)
* add test for caching funnels and refreshing

* Closes #1020 WIP shared dashboards

* Make webpack work

* Progress?

* Hash the entire filter and add share tokens

* Make webpack work properly

* Fix sentry error

* Tighten up the caching logic

* Correctly refresh items and show in frontend'

* Add some padding

* fix caching, update layout

* Add cypress tests

* Fix merge conflict mistake

* Convert share_token to boolean

* Hide text when small

* Redo tooltip for lock

* Remove move cursor when in shared mode

* Improve spacing

* Fix state being incorrect

* Use selectors instead of value

* Use const instead of let

* Fix type errors et al

* Increase cache size

* Fix dashboard tests

* Fix team tests

* Add wait time

* Fix tests

* Fix refreshing

* Fix dashboard tests

* Fix test

* Excluded deleted dashboard items and don't show refreshing

* Fix renaming issue

* Fix migrations and fix display of status change

* Use grid for responsive header

* Don't load annotations

* Eslint

* Fix variable naming

Co-authored-by: Eric <eeoneric@gmail.com>
2020-07-23 10:41:59 +02:00
Eric Duong
d7fe71f083
1247 annotations crud (#1258)
* working table

* add modal

* continue adding to modal

* added function to create global annotation

* format

* test commit

* add precommit

* add update function

* crud working

* add type

* fix tests

* add next

* add prompt

* tests
2020-07-22 12:25:54 +02:00
Eric Duong
2cd1f606f2
Retention entity selection (#1234)
* frontend

* inital working

* add action ability

* add type

* add test

* add label

* fix test

* Show 0.0% if started out with 0 users

* Make Retention UI in line with the rest of PostHog

Co-authored-by: Twixes <dev@twixes.com>
2020-07-21 14:11:25 -04:00
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
Michael Matloka
d7a77da20f
Add regex matching to actions and filters (closes #1150) (#1231)
* Add regex matching option to New Action screen

* Support Action regex matching in the rest of UI

* Add backend support for Action regex matching

* Add regex matching to filters

* Update UI text

* Update PropertyFilter column sizes

* Add not_regex

* Add backend tests

* Fix bug
2020-07-21 15:11:12 +02:00
Tim Glaser
473e4ddac1
Cut of UUID in table on smaller screens rather than wrap (#1255) 2020-07-21 11:46:44 +02:00
Marius Andra
021531c121
Toolbar Instrumentation (& posthog-js-lite) (#1206)
* more packages

* add instrumentation for toolbar

* Remove committed code

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-07-21 11:35:52 +02:00
Sandeep Guptan
d9fe0cd214
Date interval enhancement (#1253)
* added modification to date selection as per the issue for automation selection

* added modification to date selection as per the issue for automation selection
2020-07-20 19:27:09 +02:00
Eric Duong
5003c0b92c
Add interval selection to sessions (#1241)
* add interval selection to sessions

* fix error with session logic
2020-07-20 19:03:00 +02:00
Eric Duong
de50908c4d
Add button to dashboard that allows users to easily add item (#1242)
* add button to dashboard that allows users to easily add item

* Fix "card undefined" className bug

* Fix card margins

* Clean up code style

Co-authored-by: Twixes <dev@twixes.com>
2020-07-20 09:24:16 -04:00
Sandeep Guptan
25d9f8700c
enhanced ctrl + click new tab opening feature (#1248)
* enhanced ctrl + click new tab opening feature

* worked on review changes reverted and fixed over link.js component

* add return method for ctrl click and command click
2020-07-20 12:22:11 +02:00
Michael Matloka
3c65dbb3c8
Fix retentionTableLogic (#1243) 2020-07-18 01:43:03 +02:00
Marius Andra
5623551b04
Launch toolbar (#1186)
Co-authored-by: Twixes <dev@twixes.com>
2020-07-17 19:57:42 +02:00
Eric Duong
0d93ccf883
Add people breakdown on retention (#1202)
* use pandas to intercept unique ids

* add people breakdown

* update test

* add people

* remove people tests

* ranked people

* fixed filtering

* people working again

* people paginate on retention working

* fixed sorting

* fix types

* .

* add message for no users

* make lowercase

* remove unnecessary action

* make sure something is always returned

* Add period and update button capitalization

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-07-17 11:26:22 -04:00
Max Ungless
66d9aef47b
Fix line charts and make them straight (closes #1218) (#1238)
* Lines now straight in LineGraphs

* Resolve #1218

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-07-17 16:31:40 +02:00
Eric Duong
5960d95b6b
Add funnel interaction time per step (#1190)
* add funnel interaction time per step

* 0 check

* fix typing

* add days to datetime util
2020-07-17 13:04:09 +02:00
abhijitghate
5875df25f5
Closes #609 adds text DAU or Total next to event (#1201)
* Closes #609 adds text DAU or Total next to event

* Closes #609 Updated PR

* Removed console log statement
2020-07-16 09:42:54 -04:00
Michael Matloka
01c237015b
Refined toolbar styles (#1226)
* Refine shadows

* Set font weight

* Fix background override

* Set .toolbar-block color to avoid inheritance

* Improve body background check

* Update label style

* Put circle-label style in the right place
2020-07-16 15:22:06 +02:00
Eric Duong
742912f2f1
Global annotations (#1173)
* 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

* initial working

* 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

* fixed bug

* use ref again

* add condition

* add util

* another condition

* add delete

* delete working

* remove animations

* limit area

* adjust spacing

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-07-16 09:12:21 -04:00
Eric Duong
932e200555
Make sessions load (#1221)
* remove premature evaluation

* fix test

* add one null fix

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-07-16 09:12:03 -04:00
Michael Matloka
487a44289e
Patch small issue with default Add filter tab (#1228) 2020-07-16 14:47:51 +02:00
Michael Matloka
0e88fc5f0a
Fix Add filter tabs (#1225) 2020-07-16 13:42:01 +02:00
Michael Matloka
a2a90825a2
Possibly fix issue with switching to Cohort tab (#1224) 2020-07-16 12:51:15 +02:00
Marius Andra
493dcc0338
Make "new version" less threatening (#1216) 2020-07-15 14:49:12 -04:00
Eric Duong
6af4a6bf5d
fixed filtering (#1214) 2020-07-15 13:25:11 +02:00
Marius Andra
fc1befb12e
Dashboard pie label (#1211)
* pass dashboard item size to css classname

* label with variable font size for pie chart

* adjust font size in trends page
2020-07-14 16:41:48 +02:00
Michael Matloka
4e1d1e7003
Cohort filters (solves #952) (#1130)
* Update UI for cohort filters

* Change cohort filter interface slightly

In TS notation a cohort filter is: `{
    key: string, // hashtag followed by cohort ID
    value: true,
    type: 'cohort'
}`

* Add server-side support for cohort filters

* Optimize PropertyFilter and change tabs width

* Refactor PropertyFilter for better maintainability

* Fix property of undefined bug

* Fix Select values

* Test API

* Resolve merge conflicts with master

* Prettier JS

* Add search to CohortPaneContents and element attributes

* Make cohort filter property more elegant

The relevant type is now
```TypeScript
interface CohortProperty {
	key: 'id',
	value: number, // cohort ID, e.g. 42
	type: 'cohort'
}
```

* Update and enhance test

* Improve code style
2020-07-13 16:22:16 +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
Marius Andra
8eb43925ab
[WIP] Toolbar Updates Episode 5 - The Editor Strikes Back (#1160)
* don't show action labels in normal inspect mode

* fix draggable windows on touch devices (close button didn't work)

* show "click for details" to guide users in toolbar button mode

* show actions tooltip
2020-07-10 15:22:40 +02:00
Kaushik Asp
5eb5633015
Moves total to the bottom of the pie chart (#1179)
* Closes #1140 Moves total to the bottom of the pie chart

* Changes the tag from h2 to h1 as it has no effect

* Adjusts the width, height, and font size to make everything fit on the dasboard card as well
2020-07-09 19:05:26 +02:00
Eric Duong
ddab8c3a0c
1139-Fix regex for event filter (#1168)
* fix regex for event filter

* make regex explicit

* add global flag again
2020-07-09 15:48:02 +02: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
Paolo D'Amico
582ca4eed4
Feat: Billing Message (#1158)
* feat(billing): show message when billing set-up is required

Redirect to Stripe Checkout to set up billing.

* fix(billing): updated copy on billing toolbar
2020-07-08 14:01:19 +02:00
Marius Andra
a256373526
Add Typescript Support (#1157)
* explicitly ignore some linting errors

* add typescript support and fix postcss dev warnings

* convert a few files to ".ts"

* fix return values
2020-07-08 09:45:23 +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
Tim Glaser
9a22495e5e
Update logo (#1111)
* Update logo in app

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

* authenticate text alignment

* drag only from the main toolbar button

* fix key errors

* support searching by text

* fade above the heatmap

* keep dock on top

* max height for toolbar block

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

* fix heatmap style

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

* add link to issue to provide feedback during the beta program
2020-07-01 16:05:02 +02:00
Marius Andra
8a9d7f620a
Toolbar Updates - Episode 3 (#1105)
* fix tab alignment

* fix button float color

* default color in float mode

* long press extends the toolbar

* add new logo

* also add logo without text

* add window values plugin

* refactor utils

* support x,y coords in circle

* show toolbar button in new style

* remove float mode

* draging doesn't trigger click

* improve rotation

* improve heatmap number

* position of the close button

* "dock" icons to button

* clarify my choice

* show heatmap in a window

* show heatmap with a border

* use new icons

* open actions tab

* remove unused prop

* move Fade into lib/components

* animate with fire

* fix heatmap icon bug

* don't show X, new stats icon

* heatmap window title

* dock and close also shrink

* flag animation and loading for actions

* dock actions to button when enabled

* actions window

* open actions in button window

* colors for indicators

* close buttons

* inspect X

* add stats view with info

* new icons for close & dock

* add/edit actions in button mode

* color code the different elements in select element view
2020-06-30 12:57:02 +02:00
Michał Matłoka
cfebe3e498
Fix chart sizing in Safari (solves #1045) (#1118)
* Fix styles

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

* Update operatorMap and add isOperatorNonparametric

* Add is_not_set to UI and update is_set behavior

* Update tests

* Revert "Update tests"

This reverts commit a63948bee2.

* Update tests

* Use more familiar terminology

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

* show property filters only in app
2020-06-29 10:53:29 +02:00
Marius Andra
561043e53a
Use new snippet for layout.html (#1104) 2020-06-26 15:56:35 +02:00
Tim Glaser
c4c52314ea
Closes #1096 add property filter to all action options (#1098) 2020-06-26 14:14:15 +02:00
Marius Andra
3130b967ee
Toolbar: fix gatsby body overflow (#1095)
* fix gatsby body overflow

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

* capture all scroll events
2020-06-25 20:53:25 +02:00
James Greenhill
1b689054bf
Fix cypress inconsistent tests with longer wait and purecomponents (#1078)
* Test lengthening the wait time for the toasts to see if they are less flakey

* use purecomponent hook to prevent unnecessary rerender

* test again

* test again x2

* change pagekey

* test x2

* test

* run on chrome

* remove chrome

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

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

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

* add migration

* fix test and remove setting

* add choices to toolbar setting

* fix latest_migrations.manifest

* update text

* add hint to restart the browser

* fix test now that the setting is gone

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

* get actions for elements

* show number of elements found

* fix bug with tooltip position

* clean up text and tooltip

* show labels for elements that have actions

* X button orientation + text color

* remove dashboards tab

* extract colors for elements

* hover styles also applied when selected

* form for new action

* improve ux

* section titles

* no tab animation

* show info on actions

* top align in dock mode

* element action flag mouse events

* very rough actions lists

* show action labels only if inspect active

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

* action new/edit interface

* remove old actions

* toolbar actions form, various ux fixes and refactoring

* tab refactor, keep element open on inspect

* form via kea, more space

* inpsect element for actions

* select the right fields by default

* action select logic

* highlight elements when creating actions

* highlight action elements when in the list

* remove debug

* select action to edit by clicking on heatmap

* save actions in db

* delete actions

* fix some interactivity

* actions list cleanup in element view

* toolbar ux and code cleanup

* float mode max height

* clarify code

* rename StepField

* try to justify the madness

* add shadow back to float toolbar

* add "dock" button to float mode

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

* align current page icon

* make the name of the action required

* hide heatmap/inspect when the toolbar is closed
2020-06-25 11:40:33 +02:00
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
Eric Duong
1aab7859d1
fixed start time (#1077) 2020-06-24 10:44:43 +02:00
Karl-Aksel Puulmann
5257c30ff1
Enable discarding of IP address data (#1081)
* Add migration to add `anonymize_ips` boolean field

Issue #947

* Add setting to not capture ip data

This solves issue 947
2020-06-24 10:38:45 +02:00
Eric Duong
d71805b5ca
1050 breakdown person props (#1070)
* add person props to breakdown filter

* fix frontend logic

* working filter by person properties

* run lint

* fix types

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

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

* Fix default filters

* Move decide to its own file

* Bump posthog-js 1.2.2

* Fix decide endpoint

* Add logic, update posthog-js

* yarn lock

* update snippet

* Add cypress tests

* Add example code

* Fix example code

* Add tests for query size

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

* Add explanation comment

* Fix cypress tests

* Do caching of teams in Team model

* Use <= instead of <

* Instrumentation and fix

* Fix ci test

* Add patch for team

* Debug test

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

* Clear results as a response to an action

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

* Automatically select hourly

* Backwards compatibility

* Add today/yesterday back in
'
2020-06-19 13:52:05 +02:00
Eric Duong
5f47e97df2
1041 paginate people modal (#1042)
* initial working

* add test

* fix test

* update paginating format

* merge master

* fix errors

* lint error

* use results instead of result

* more lint errors
2020-06-19 11:03:21 +02:00
Marius Andra
e4a9acced1
Show upgrade warning if using a really old browser (#1046) 2020-06-18 11:09:26 +02:00
Marius Andra
fb68c41afa
Fix Typo (#1032)
Solves https://sentry.io/organizations/posthog/issues/1729313973/?project=1899813&referrer=slack

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-06-17 21:27:35 +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
Marius Andra
aeed457909
Toolbar Heatmap (#974)
* Temporary Hack™ - allow access to the events API via the temporaryToken

* Consolidate small utility functions

* Heatmap [WIP]

* Let the mouse through

* adjust z-index

* no heatmap pointer events when inspecting

* bolder and more interactive toolbar button

* zoom and padding for float mode heatmap

* extend toolbar buttons from the mouse distance, add toggle for heatmap

* animated spinner when showing the heatmap

* add labels to circles

* fix distance bug

* more text shadow

* also highlight inspect element after something has been highlighted

* hover heatmap element

* highlight selected elements

* show metadata for heatmap

* reorder elements

* show inspect element box

* tiny "x" in magnifying glass

* close selected element metadata

* heatmap element click data

* add "add action" stub

* fix element selection logic ux inconsistencies, add esc support

* actionstep display

* move events around

* inspect element rect also via react

* extract element trim logic (path --> svg), add support for cursor:pointer click targets

* keep yellow markers in bounds, fix positions after a delay after scrolling

* get heatmap data from /api/element/stats/

* scale element metadata

* show ranking in metadata

* rename link to clickable

* remove posthog toolbar from clickable list

* move TemporaryTokenAuthentication to utils

* try to bust the cache

* use authentication screen to get temporaryToken, add toolbarLogic to store all props

* use button mode if not authenticated

* more control over animation

* can drag unauthenticated button

* hide heatmap when animating

* no need for cascading props

* call a width a width (radius was incorrect as it should be half that)

* clean toolbarButton code

* add 'userIntent' instead of 'defaultTab' to guide the user in adding an action

* enable heatmap in the float/dock toolbar

* re-request authentication on a 403

* small tweaks to scroll update delay and bust cache again

* double-space-cache-bust

* rotating text for logged out button

* split heatmap elements and labels into separate components

* heatmap with inspect element click targets

* also select all elements with cursor:pointer

* merge "inspectElement" and "heatmap" into "element", remove "inspect anything" mode

* fix element tooltip horizontal position

* escape class names in selector

* leave clues for the next time

* toolbar hello text update

* fix css escape issue on nth queries

* fix color in docusaurus v2 dark mode

* show element info window in sidebar in dock mode

* support ESC

* scrolling and animating won't conflict with each other in dock mode

* close button first unselects

* reverse elements if body is the last one returned

* click to select element in heatmap list

* only show element in toolbar in dock mode

* Order elements by order

* heatmap bottom position min and max heights

* keep window on screen

* remove element hack

* highlight element got stuck

* position heatmap info window better

* Fix tests

* remove selected element when disabling heatmap

* simple auth text

* 3 pixels lower

* center with flexbox

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-06-16 14:28:11 +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
f0d6db7714
1022 caching adjustments (#1023)
* refreshing spinner

* expire results that haven't been accessed in more than 7 days

* missing param
2020-06-15 22:41:28 +02:00
Eric Duong
43d3b632b0
Capitalize actions and cohorts buttons (#1019)
* capitalized

* one more title
2020-06-15 20:43:14 +02:00
Eric Duong
063d73953a
Use redis to cache results (#972)
* initial working

* small adjustments and make tests run

* working cache

* edited arg handling in actions

* caching dashboard trend items with periodic update

* funnel and trend cache working

* update intervals

* update tests

* updated types and funnel refersh logic

* refresh working

* refresh dashboart item logic

* refresh from dashboard working for trends components

* refresh from dashboard working for funnels and funnel refactored to hook

* dashboard item reload

* let deleted items run stale

* fix tests

* tweak decorator logic

* update datetime format and default expiry

* add team to cache signature

* make sure different workers pick up task

* use tooltip and change dashboard refresh order

* fix redundant calls and cache overwriting

* updated types

* Show tooltip when never refreshed

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-06-15 19:38:55 +02:00
Tim Glaser
2c8ee6213e
181 create actions from trends page (#990)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* WIP Closes #181 create actions from trends page

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Fix many nested selectors

* Don't use join field

* Remove other join field references

* Fix test

* Fix test

* Test unique order

* Remove debugging selector
2020-06-15 18:59:52 +02:00
Eric Duong
52cf0cced9
delete partial filter (#993) 2020-06-15 13:46:48 +02:00
Tim Glaser
7faa932c6c
Closes #1011 show current version in changelog modal (#1014) 2020-06-15 11:29:23 +02:00
Tim Glaser
78e5099ef1
Closes #982 y axis precision (#984) 2020-06-12 13:14:23 +02:00
Tim Glaser
4b1e896888
888 filter on elements (#986)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Don't use join field

* Remove other join field references

* Fix test

* Add endpoint to get stats on elements

* Add sensible limit

* Put migration back

* Pass team_id as property
2020-06-12 10:03:32 +02:00
James Greenhill
ec0c15d186
add carets to drop downs in trend page (#919)
* add carets to drop downs in trend page

* round out button for action selecton

* match dropdown icons to dropdown icons above the graph

* fix margins and spacing on trends sidebar

Co-authored-by: Eric <eeoneric@gmail.com>
2020-06-11 22:35:14 +02:00
Tim Glaser
646d854cc9
Revert "888 filter on elements (#981)" (#985)
This reverts commit a41ef7f7c2.
2020-06-11 16:59:05 +02:00
Tim Glaser
a41ef7f7c2
888 filter on elements (#981)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Don't use join field

* Remove other join field references

* Fix test

* Add endpoint to get stats on elements

* Add sensible limit

* Put migration back
2020-06-11 16:32:10 +02:00
Marius Andra
ca1ffe0cb0
Toolbar "button mode" (#925)
* longpress supports also clicks - presses that are just not long enough

* button mode for toolbar

* fix bug in zooming out, refactor and annotate some of the animation code

* toolbar button close/float tiny buttons

* fix inspect element in floating mode

* fix the fix :)

* remove console.log

* extract logo

* extract nestable circle component

* css animations for circles

* refactor toolbar to use circle code

* remove animation code

* style fixes

* annotate useLongPress

* clean styles

* show button always

* save drag position

* default to top-right

* add a bit of padding to have space for tooltips

* better padding for remembered width/height

* test recursive search for yarn.lock file

* fix merge

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2020-06-11 00:05:01 +02:00
Tim Glaser
37fa876732
Revert "Closes #888 filter on elements (#917)" (#968)
This reverts commit ac46f09429.
2020-06-09 17:58:18 +01:00
Tim Glaser
a1f236f5b1
Revert "181 create actions from trends page (#948)" (#967)
This reverts commit 172e7354f2.
2020-06-09 17:13:59 +01:00
Marius Andra
3ab8b73817
Upgrade to posthog-js 1.2.0 to support dynamic params. (#957)
* Refactor editor params. Specify default editor tab. Upgrade posthog-js.

* add backwards compatible 'token'

* fix test

* keep things simple
2020-06-09 10:55:56 +01:00
Tim Glaser
172e7354f2
181 create actions from trends page (#948)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* WIP Closes #181 create actions from trends page

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Fix many nested selectors

* Don't use join field

* Remove other join field references

* Fix test

* Fix test

* Test unique order

* Remove debugging selector
2020-06-09 10:10:27 +01:00
Tim Glaser
ac46f09429
Closes #888 filter on elements (#917)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Don't use join field

* Remove other join field references

* Fix test
2020-06-08 14:58:51 +01:00
Tim Glaser
34fbdbfd0d
Closes #943 dont rely on dollar sign to separate posthog events (#949)
* Closes #943 dont rely on dollar sign to separate posthog events

* update paths to not rely on $

Co-authored-by: Eric <eeoneric@gmail.com>
2020-06-08 14:41:32 +01:00
Tim Glaser
0845e77b5c
Closes #944 hide math selector on funnels (#950) 2020-06-08 14:05:24 +01:00
Marius Andra
11ff3787e3
PostHog Toolbar (#896)
* can zoom out toolbar

* refactor the look

* add kea localstorage plugin

* add test to see if user is logged in or not

* keep width when resizing window

* increase padding on larger screens

* floating box style

* toolbar close button

* show what's on the current page

* fix close and remove tags

* inspect element

* inspect element improvements

* show stats

* inspect element

* give jsURL to the editor in debug mode

* toolbar HMR

* move styles to CSS

* tabs on toolbar

* css for current page block

* links to dashboards and actions

* adjust the location of the X so that we don't always have a horizontal scrollbar

* clean up some css, incl renaming toolbar divs

* refactor webpack config to use a separate config for the editor chunk, in it include all CSS inside the JS

* load styles behind the shadow, render only once all CSS is loaded

* tolerable design for the floating view

* header block for float + css zindex fix

* fix height

* move toolbar to toolbar folder

* add back old toolbar folder

* load by default editor.js, move new toolbar to toolbar.js

* only open toolbar.js by default, not editor.js

* add comment for toolbar setting

* Updated Yarn lockfile

* fix test and rename is_authenticated -> isAuthenticated in json

* get mypy to play along

* refactor tab content into folders

* refactor code structure for toolbar

* simplify floating/docked/float/dock -> float/dock

* small refactor

* upgrade to posthog-js 1.1.0

* fix array copy code
2020-06-04 13:45:24 +02: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
d4d5ccd1b3
Fix temporary token issue (#909)
* Fix temporary token issue

* only pass params once
2020-06-02 16:28:47 +01:00
Tim Glaser
bcf427cb55
Webpack HMR, Add hashes to chunk filenames. (#878)
* Closes #877 chunk loading errors

* Closes #877 chunk loading errors

* add chunks to all webpack files, use webpack-html-plugin to make an index.html with the right names

* change to contenthash for better caching

* add dev server on a different port

* store loaded scenes in reducer

* add react-hot-loader

* add react-hot-loader to all code split points

* fix action pages HMR

* ignore cypress screenshots

* generate django login/signup page layout with webpack html plugin

* move to devDependencies

* expose webpack-dev-server ports

* run tests on the production docker image

* start webpack dev server on a custom host if requested

* revert e2e to dev dockerfile

* add test travis config

* add stages

* add travis conf

* cache node and pip

* node 11

* travis ci bump

* node via nvm

* install v12, disable cypress for a moment

* remove 2 commands, test cached build time

* try different yarn cache, add cypress

* add postgres 12

* migrate before cypress

* remove latest postgres for now

* createdb before cypress

* Try different port

* cull packages

* remove hash from main bundle filenames to not break anything

* cypress port 8000

* cypress tests with production docker

* don't use the /code path in e2e test, use docker image

* remove hash from css to work better with editor

* only one export from actions

* remove travis test

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-06-02 10:39:53 +01:00
Eric Duong
03db444bf0
Start point for paths (#897)
* initial working for current_url

* cleanup logic for screens and pageviews

* initial working for autocapture

* refactor propvalues to use hook

* all necessary start values

* add condition

* cache correctly

* fix linting error

* add test

* fix undefined on hover and repeat start points

* align dropdowns

* fix random start points

* fix input search
2020-06-01 18:32:52 +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
Marius Andra
5a60706a61
fix menu scrollbar when mouse connected (#900) 2020-06-01 15:33:42 +01:00
Tim Glaser
2c9b898e36
Better funnel empty state (#885) 2020-06-01 16:12:09 +02:00
Tim Glaser
72fe7e1c73
Fix selecting filters (#844)
* Fix selecting filters

* Test

* Handle case in urlToAction
2020-06-01 16:08:05 +02:00
Eric Duong
48dd7bc9e3
Refactor more classes to hooks (#898)
* refactor to hooks and bug fix

* refactor invite team

* remove modal and use antd

* refactor datefilter

* refactor dropdown

* remove unused variables

* fix dau

* Fix invite team styling

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-06-01 09:41:32 +01:00
Tim Glaser
ce00a3c66b
Add property key descriptions to breakdown filter (#886)
* Add property key descriptions to breakdown filter

* Change name in eventstable header

* Finish description

* Undo table
2020-05-29 16:32:57 -04:00
Eric Duong
3a42ce58c5
Cumulative Graphs (#862)
* initial working

* add people endpoint working for cumulative

* remove some magic trings and add test for cumulative

* add type map for dashboard items

* retain previous constant

* update labels

* remove unused variables

* reduce repeat
2020-05-29 08:56:58 -04:00
Eric Duong
36bf2913cf
Tweak action toolbar (#890)
* remove save & new action button, add view button on toolbar

* fix update broken and fix new action modal

* fix lint errors and modal function
2020-05-29 11:25:16 +02:00
Eric Duong
bee6ccc852
Tweak funnel prompt and spacing (#881)
* tweak funnel to be friendlier

* remove unused
2020-05-28 10:41:24 +01:00
Eric Duong
68b28bd38f
Custom Event link (#873)
* custom event prompt reformat

* change id
2020-05-28 10:28:19 +01:00
Eric Duong
ceadeb5bf7
Refactor Paths and add property filtering (#860)
* refactored paths to hook

* use kea

* add properties logic

* paths filter by properties

* change to Q

* add option for all events

* add test and make tweaks

* fix errors and add url saving on paths screen
2020-05-28 10:24:18 +01:00
Marius Andra
b68f7a6aae
787 mobile floating sidebar (#839)
* floating collapsible sidebar

* close sidebar with ESC

* don't close sidebar in full screen mode

* sidebar is static also in full reso

* get rid of tooltips when collapsing menu on mobile

* update sidebar open/closed default value based on resolution

* antd modals come on top of the sidebar, now below
2020-05-27 12:01:26 +01: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
Marius Andra
14251dd9bd
Update links to docs.posthog.com (#847)
* update links to docs

* replace all old doc linnks

Co-authored-by: Eric <eeoneric@gmail.com>
2020-05-26 11:20:21 -04:00
Eric Duong
4cbb388487
715 compare previous period (#824)
* initial working for trends

* session and trends working

* fixed types

* cleanup

* increase default timout

* cleanup and add people

* add test

* add parentheses

* add parentheses

* .

* adjust spacing

* update tests
2020-05-26 14:39:40 +01:00
Marius Andra
b59d0de260
move dashboard menu item up (#846) 2020-05-26 14:39:18 +01:00
Marius Andra
3a7f9dddb6
fix colored dashboard item table background (#838) 2020-05-25 16:59:28 +01:00
Tim Glaser
71603c9c76
Add property key explanations (#822)
* Add property key explanations

* Add propertykeyinfo.js
2020-05-25 15:51:29 +01:00
Eric Duong
d463f13040
disbale cohort create if no input (#827) 2020-05-25 15:39:19 +01:00
Eric Duong
4a39a7b05e
change info to icon and add info for datapoints (#830) 2020-05-25 15:35:43 +01:00
Eric Duong
63a0575630
Headers for all pages (#831)
* standardize headers and fix alignment

* don't show worker stats on hosted instance
2020-05-25 15:29:35 +01:00
Tim Glaser
84968a718f
Fix load suggestions error (#835) 2020-05-23 10:49:44 +01:00
Eric Duong
74025ffe60
add null check (#829) 2020-05-22 19:10:27 +01:00
Tim Glaser
7ea6b44afe
Fix property filter in cohort (#828) 2020-05-22 19:09:09 +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
5426c8706c
Closes #764 autodetect site urls (#815)
* Closes #764 autodetect site urls

* Add EditAppUrls

* Refactor imports

* Fix nits
2020-05-22 10:28:47 +01:00
Eric Duong
848085682d
change more dropdowns to antd (#814)
* change more dropdowns to antd

* action select

* eslint errors

* remove react-select

* restore lost properties

* add height
2020-05-21 20:33:29 +01:00
Tim Glaser
df48f475ba
Closes #790 opt out to boolean and allow anonymizing of data (#821)
* Closes #790 opt out to boolean and allow anonymizing of data

* Add deprecated note
2020-05-21 15:38:28 +01:00
Marius Andra
e9142de232
Use the correct $screen_name parameter for screen names (#806) 2020-05-20 21:47:46 +02: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
Tim Glaser
f78715b269
Fix change password form (#800) 2020-05-20 10:33:40 +01: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
Eric Duong
223f400e05
use antd for user dropdown (#801) 2020-05-19 19:04:32 +01:00
Marius Andra
212bae8ef8
use a menu divider that doesn't throw a million console errors, move some sidebar css closer to component (#798) 2020-05-18 22:31:37 +01:00
Eric Duong
0facaeb8cb
#448: Paths with events (#692)
* generalized path type

* generalized path type

* naive implementation

* ui

* add custom field

* moved function

* use lateral join for tag elements

* add regex for custom event condition

* add optional type

* add tests and make adjustments

* updated paths to use new paths query

* add full DOM display

* changed dom tree view to modal

* adjust modal settings
2020-05-18 22:21:50 +01:00
Marius Andra
dc447dc172
Touch dashboards (#775)
* more resize handles

* see-through loading overlay

* mobile mode, dragging dashboards, make panels wiggle, etc

* use long press and esc to control dragging

* clean up header

* disable dragging when clicking on the background

* clear toast on unmount, disable pointer events when dragging

* rearrange button

* clicking handles doesn't stop rearranging

* fix grid layout import

* fix header layout on mobile

* better alignment of version and worker info in responsive mode

* overflow fix

* pinned dashboards in sidebar

* more visible rearranging toast

* clear dom text selection after starting to resize panels

* add existing dahboard name in the "save to dashboard" modal

* add divider between pinned dashboards and the rest of the menu

* clarify how to exit drag mode

* dragging enabled by default, disabled if iOS or Android, long touch only to enable wobbly mode

* add margin under wobbly dragging mode to make it nicer to move the last item

* can drag panels from anywhere, except tables

* exclude tables from long pressing

* less padding in low resolutions
2020-05-18 20:48:24 +02:00
Marius Andra
f61c75bdb0
Different webhook message format for ms teams (#796)
* different webhook message format for ms teams

* Wording change

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-05-18 17:39:55 +01:00
Marius Andra
95430592e8
wildcard router for person (#795) 2020-05-18 13:08:37 +01:00
James Hawkins
f5cb8f6e09
changed setup links to new docs (#793)
* changed setup links to new docs

* changed worker update instructions link

* updated SendEventsOverly to new docs
2020-05-18 11:23:04 +01:00
Tim Glaser
fd6c6c7082
Support Microsoft teams (#784)
* Support Microsoft teams

* Fix typo
2020-05-15 20:35:25 +01:00
Eric Duong
e98d53449a
add null condition (#785) 2020-05-15 19:27:42 +01:00
Tim Glaser
85ead33258
Disable stickiness and breakdown (#774) 2020-05-15 18:34:39 +01:00
CaseGuide
13a73bb3e8
Update "See Documentation" URL in Actions (#783)
* Update "See Documentation" URL in Actions

Current URL 30X redirects to your github page. Actual URL seems like it should be: https://docs.posthog.com/#/features/actions

* Update with even newer new docs URL

Update per comment in #783
2020-05-15 13:10:18 -04:00
Eric Duong
cdb56c5560
Updated Actions to use antd (#757)
* converted actions table

* remove extraneous
2020-05-14 16:26:40 +01:00
Marius Andra
44f8c829e7
undefined fix (#771) 2020-05-14 12:12:42 +01:00
Marius Andra
2fc50688b4
Fix property filter array issue on events page (#769)
* fix property filter array issue on events page

* add comment
2020-05-14 12:11:21 +01:00
Marius Andra
95c76080f9
Black dashboard items and Full Screen (#753)
* add black color scheme

* support full screen dashboards

* stronger shadow when dragging

* fix eslint complaints

* can drag from links

* fix draggable link issue and flash of red

* white color fix

* table scroll fix

* copy, move and duplicate dashboard panels

* better tracking of dashboard item updates between dashboards

* add new items at the bottom

* defaults for layout, set as infinity if null

* copy panel text with link to dashboard

* smart algorithm to pack dashboard items at the lowest spot they fit in

* dropdown style fix

* antd modal style

* update trends on dashboards

* always add as new dashboard item for funnels

* default height as 5

* add more colors to the list
2020-05-14 11:52:12 +01:00
Tim Glaser
e0dd4b5879
Update worker stats modal (#763)
* Update worker stats modal

* make modal close with onCancel, fix dom issue, replace link text icon

* make workerstats ask every 30sec

* update changelog modal to antd

* convert header links to buttons

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-05-14 11:08:39 +01:00
Eric Duong
f862978b8f
Updated Funnels to use antd (#751)
* refactored

* resolve eslint errors
2020-05-13 20:54:08 +01:00
Marius Andra
b446731ced
add breakpoint (#754) 2020-05-13 10:02:01 -04:00
Tim Glaser
20fab5d5a2
Add ES Lint (#719)
* Add ES Lint

* Update lint.yml

* move lint file

* Add eslint to package

* use yarn

* Run ci/test only once

* Fix eslint errors

* Fix rest siblings

* precommit hooks

* Lint typo

* ESLint per file

* Eslint
2020-05-13 13:17:00 +01:00
Marius Andra
bc7eabc315
Resize dashboard items (#746)
* Fix Error404

* resize and drag dashboard items

* fix funnel resize issues

* store layouts in kea

* layouts for different breakpoints

* save layouts after updating

* colors in submenu, but disabled

* save item colors

* 1920-sidebar breakpoint

* add graph colors for graphs with backgrounds

* pie chart label color and z-index to put over the chart if a long number
2020-05-13 11:14:09 +01:00
Eric Duong
d72adfad3f
added conditions (#748) 2020-05-13 10:40:50 +02:00
Eric Duong
c0e59fa632
fixed undo bug (#750)
* fixed undo bug

* change to const

* remove creepover
2020-05-13 10:38:48 +02:00
Tim Glaser
80484e7bb6
Closes #714 allow multiple filters with same key (#738)
* Closes #714 allow multiple filters with same key

* New filters for events page

* Make funnels use filters

* Fix cohortgs

* Fix ordering

* Fixed filter on funnels
2020-05-12 13:59:22 +01:00
Marius Andra
aaea9bdfdb
Fix Error404 (#744) 2020-05-12 11:43:08 +01:00
Tim Glaser
8e6b4f56b5
Closes #169 break down by cohort (#690)
* Closes #169 break down by cohort

* Fix test

* Prettier breakdown filters

* Rerender each time it's opened

* Fix tests

* Add 'all users' option in breakdown

* Make people work with cohorts

* Precalculate cohorts

* Return last_calculation

* Show precalculation in the frontend

* Closes #675 fix icon alignment

* Frontend fixes, antd and more

* Make sure unsetting breakdown doesn't break things

* Semantic name for migration

* Separate data migration + cohort key bugfix

* Correctly filter people by event

* Typing
2020-05-11 22:06:35 +01:00
Marius Andra
c324582076
703 multiple dashboards (#740)
* create dashboard model

* add pinned dashboards to submenu

* rename "Default Dashboard" -> "Dashboard"

* refactor SaveToDashboard modal

* save onto right dashboard

* load and show dashboard data

* move logic to separate file

* dashboard selection

* prompt for name

* add promise cancellation for prompts, so that they close when we change the url

* show a global loading progress bar if it takes more than 500ms for any loader to work

* add dashboards on the dashboard page

* pin dashboards

* rename dashboard

* cut off text nicely in the sidebar

* delete dashboards

* dash item "more" link in antd style

* revert to ellipsis

* trigger by click, redirect well with delete

* remember last visited dash, update icons

* better view icons

* refactor Dashboard into subcomponents

* add a sad hedgehog for the 404 page

* fix loading keys

* add a few more overlay hedgehogs

* add new dashboard from "no dashboards" page

* use a hedgehog with a better license

* better redirect when deleting dashboard

* update dashboard items design

* dark sidebar

* make a few other scenes darker

* add a few styles that can be toggled

* add menu to change color of dashboard panel

* move to prompt logic

* new dashboard on dashboards page

* show success message in model

* refactor shared listeners

* rename dashboard item

* add new dashboard when adding to dashboards

* redirect after adding

* fix icon alignment

* undo deleting dashboards

* replace antd message with toast to close programmatically

* remove the style dropdown for now

* set the scene on a new "thread" to avoid react's reconciliation triggering logic building on the current run heap

* fix action run heap issue properly

* use table in dashboard list, link to all dashboards

* support links without hrefs

* empty dashboard style fix

* ignore type

* save created_by user

* remove nprogress spinner

* use antd table to render dashboards

* show "all dashboards" as the default when clicking the link

* pin dashboards automatically

* soft delete

* remove nprogress

* remove nprogress

* remove all caps

* export deleteWithUndo function

* add delete and pin links to dashboards list
2020-05-11 18:09:02 +02:00
ਜੁਝਾਰ ਸਿੰਘ
2c3c09beb4
Update Trends dotted line UX (#735)
* Update Trends dotted line UX

* Show dotted line only with isInProgress filter
2020-05-11 11:49:55 +01:00
Marius Andra
6aea09228c
Routing Refactor (#717)
* extract some components from EventsTable

* event table refactor

* move logic and load next events

* flip sort order

* eventSelected -> selectedEvent

* put all next fetching through the same fetchEvents action

* event polling

* onClick not needed

* refactor EventElements into separate file

* unique key for events table based on the view that is open

* disable filtering in actions page

* use <A> tag

* fix ===

* make property filter update the filter through the browser URL

* move from react-router to kea-router

* add root redirect

* fix dashboard urls

* remove <A /> tag, keep using <Link />

* load events before the scene opens

* rename ActionEvents -> LiveActions

* use eventsTableLogic for live actions

* when removing a filter, assure that there is a {} at the end

* save path so that we don't update anymore when we move off the page

* preload logic before scene

* better name for property filters

* fix default search input uncontrolled error

* set property filters through the url

* refactor some variable names

* clean active views and cached urls, add "order" to actions from url

* fix some linter errors

* build and pass logic

* turn actionFilterLogic into a controlled logic

* make it work

* small code improvements

* use properties from kea-router's search params

* upgrade kea-router

* use properties hash

* rename actionFilterLogic.js to entityFilterLogic.js and pass logic down in props

* more entityFilterLogic cleanup

* use new router for trends

* use objectsEqual instead of manual JSON.stringify comparison

* router.values.searchParams in propertyFilterLogic.js

* adding new entity type works

* always highlight something in the sidebar

* remove unused FilterLink.js

* refactor active submenu

* add query to link to /people

* funnels work again

* split property filters per id of funnel

* set $pageview or $screen as default action in /trends if just opening the URL, sparking loads of joy

* fix uncontrolled<->controlled input warning

* simpler loading, without breaking DOM rules

* cleaner loading screens

* fix uncontrolled to controlled warning

* do not show links to myself if showing events table under /person/:id

* uncontrolled - controlled input

* remove broken link to step event, fix duplicate key errors

* table loading as overlay if something in table

* show loading overlay only after 500ms

* undefined fix

* 2 more undefined fixes

* use kea-router's combineUrl instead of the homebrewn toParams()

* date filter returns dates as strings
2020-05-07 11:48:04 +02:00
Eric Duong
fb2ed12e3d
Better paths query (#729)
* add cron job that will keep partitions updated

* new paths query

* remove celery changes

* add test

* test should work now
2020-05-06 15:35:53 -04:00
Tim Glaser
47c8180cb9
Fix user page not loading (#723) 2020-05-05 17:17:33 +01:00
Tim Glaser
68622a5a49
Fix people in trends not loading (#721)
* Fix people in trends not loading

* Dont hide when loading
2020-05-05 16:43:58 +01:00
Tim Glaser
44794627fd
Fix delete person data not defined (#720) 2020-05-05 17:14:32 +02:00
Tim Glaser
1647406842
Speed up cohorts and use antd (#706)
* Speed up cohorts and use antd

* Fix search params

* Use propertiesTable

* Fix users not searching
2020-05-04 18:44:55 +01:00
Eric Duong
350ba840c8
#477 filter per entity (#671)
* remove excess dau prop

* remove unused function'

* initial working

* fixed stickiness

* integrate with funnel

* add test

* update UI

* made function readable

* add missing param and check

* optional type

* update key

* add filter symbols

* change null to exact

* test

* add null condition

* remove unnecessary push

* .

* return original line that was accidentally paved
2020-05-04 16:08:49 +01:00
Anoop G R
7743ee73cb
411 export cohort csv (#441)
* Add djangorestframework-csv external package

* Export a paginated csv at /api/person.csv

* Do not paginate when a when csv export is requested

* Add export button to download cohort as a csv file

* Fix styling errors caught by deepsource.io

* Suppress checks on an import that mypy is unable to follow

* Dynamically pick person properties including deep nested properties
2020-04-30 19:27:51 +01:00
Sanket Dasgupta
de0bf65ae7
AntD Refactor: Remaining components of Setup (#701) 2020-04-30 18:42:14 +01:00
Tim Glaser
4afcde50b3
Add noindex to login/signup screens (#702) 2020-04-30 18:03:12 +01:00
Tim Glaser
964d97ee4c
Closes #665 Allow editing of frontend elements on actions in app (#670)
* Closes #665 Allow editing of frontend elements on actions in app

* Keep selection when switching between tabs

* Keep url when switching between tabs
2020-04-30 13:58:21 +01:00
Marius Andra
571926a404
Add $screen to events table (#681)
* Add $screen to events table

* add "/ Screen" to table header
2020-04-29 22:08:33 +01:00
Eric Duong
d4df762506
Session time series (#659)
* initial commit

* initial working

* retrieving people

* updated tests

* updated people endpoint

* updated tests and session endpoint

* added types

* add label

* fix session bug calculation

* adjust labeling

* condense to 1 query

* remove statistics
2020-04-28 13:00:53 -04:00
Tim Glaser
f198b190b9
Put break down in Graph (#667)
* Put break down in Graph

* Remove unused function

* Order by count

* Order by pt 2

* Fix tests

* Filter people by selected breakdown value

* Fix test
2020-04-28 17:41:05 +01:00
Sachin Govind
0c521af7d8
added copy code to clipboard changes (#662)
* added copy code to clipboard changes

* added copy changes
2020-04-28 14:53:25 +01:00
Eric Duong
4361266f87
fixed redirect to be explicit (#676) 2020-04-28 09:29:36 +01:00
Sanket Dasgupta
5b6a9d3599
[Setup]; Fix Setup Page operations not working (#674)
Fixes https://github.com/PostHog/posthog/issues/627
2020-04-27 21:05:47 -04:00
Sanket Dasgupta
dee992b229
AntD Refactor: Setup Page (#621)
* AntD Refactor: [Setup] SlackIntegration

* AntD Refactor: [Setup] Change Password

* AntD Refactor: [Setup] InviteTeam

* AntD Refactor: [Setup] DeleteDemoData

* AntD Refactor: [Setup] SetupAppUrls

* AntD Refactor: [Setup] Add Divider b/w each sections

* SetupAppURLs: Add <br> when no URLs are present
2020-04-27 17:45:20 +01:00
Marius Andra
9134e13177
Kea 2 (beta) upgrade (#663)
* upgrade to kea2 beta

* remove empty createStore

* add yalc to .gitignore

* add kea 2 and babel-plugin-kea
2020-04-27 16:39:21 +01:00
Tim Glaser
0b8d8ff774
Allow wildcard filtering on action url (#653)
* Allow wildcard filtering on action url

* Add explanation of wildcard in ui

* Show wildcard matching instructions from start
2020-04-27 10:53:43 +01:00
Eric Duong
42be1ceff8
fix issue with default trends route (#658) 2020-04-24 13:19:09 -04:00
Raul Gallegos
451da21d05
Closes #476 set trends page as default for users (#656) 2020-04-24 13:25:37 +01:00
Tim Glaser
1c5387aedb
Warn instead of crash on invalid selector (#655) 2020-04-24 10:57:05 +01:00
Tim Glaser
08f9728049
Add useful hints to trends page (#632)
* Add useful hints to trends page

* Move filters to inside dropdown

* Place tooltips on the right
2020-04-24 10:42:13 +01:00
Eric Duong
9cc7d6e481
Antd trends updated layout (#648)
* initial reformat

* minor adjustments

* screen size adjustments

* fix breakdown button

* fix breakdown button

* session filter width

* adjust sizing

* removed minheight
2020-04-23 11:41:20 -04:00
Marius Andra
69d2e61123
fix random crash, possibly due to old/broken data (#652) 2020-04-23 11:03:40 +01:00
Solomon Nsubuga
379c467f9c
Sort events table by timestamp in reverse. (#626)
* Add sorting of events table by timestamp

* Disable events polling when ordering in reverse

* Fix: Check for empty ordering params
2020-04-23 10:30:49 +01:00
Eric Duong
a29917f3d7
null date bug (#649) 2020-04-23 10:01:53 +01:00
Tim Glaser
70f0fdcb9e
645 fix adding dashboarditem with set dates (#647)
* Closes #645 fix adding dashboarditem with set dates

* Adds to #645 fix 'val is not defined'
2020-04-22 19:20:12 +01:00
Tim Glaser
70ce87e02c
Closes #645 fix adding dashboarditem with set dates (#646) 2020-04-22 18:37:41 +01:00
Eric Duong
5640121fd5
Antd layout (#619)
* inital layout update

* coloring

* remove static

* remove extra code

* updated icons and tweaked colors

* remove unused styles

* prevent live actions from showing load on entire screen

* preserve content styling
2020-04-21 13:34:00 -04:00
Eric Duong
6bc87a61be
Updated Prop Filters to be "tokenized" (#616)
* initial commit

* formatting

* adjusted margins

* missing condition

* reused operatormap and fixed spacing

* check more specific key first

* reverse operator keys once
2020-04-20 12:18:06 -04:00
Eric Duong
84102209f8
Funnel prop filters (#628)
* initial commit

* initial commit

* updated test
2020-04-20 17:01:26 +01:00