0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-29 03:04:16 +01:00
Commit Graph

264 Commits

Author SHA1 Message Date
Michael Matloka
77621366de
Fix remaining TypeScript errors (#6436)
* Fix remaining TS errors and remove `.ts-strict-blacklist`

* Move `IGNORED_SPECS` to top
2021-10-14 15:08:42 +00:00
Marius Andra
d1caefb606
Refetch insight if id changes (#6368)
* refetch insight if id changes

* current project also ingested event

* upgrade kea and loaders

* do not load if sceneLogic is not mounted

* add test for url sync

* don't load results from the API if none in the insight

* avoid extra queries

* avoid loading the results twice

* update kea-loaders to get payload in async actions
2021-10-14 14:58:17 +00:00
Marius Andra
fc66fc953e
remove all dashboard animations in view mode (#6426) 2021-10-14 15:51:27 +01:00
Paolo D'Amico
44cb3c2d70
Updates storybook to 6.3.11 (#6399) 2021-10-13 11:25:56 +03:00
Harry Waye
88262c0e05
chore(correlation): funnel story with correlation events and properties (#6389)
* chore(correlation): funnel story with correlation events and properties

This commit:

 1. adds msw so we can easily mock the API requests
 2. starts msw on storybook page load
 3. adds the `mockServiceWorker.js` to storybook public folder so it can
    be loaded by the frontend
 4. adds a Funnel story that defines the funnel and correlation
    responses

Note that we also define types for requests and responses. These could
be shared with the actual application code, so we can explicitly couple
the application changes to updating storybooks, i.e. to help avoid
stories going stale.

The requests and responses are quite basic, but they are sufficient to
be able to easily see and make changes. It has a requirement that it
should be easy for anyone else who comes to the code to easily parse and
be able to make updates. We don't want these to be rotten stories but
*the place* that people go to first when making their changes.

Having simple handwritten request/responses also introduces the
stability needed to, for example, use regression tests. Changes are
deliberate.

* refactor(storybook): move funnel stories to their own file

This also does quite a bit of cleaning up of the storybook and funnel
story code. Trying to come down on an acceptable way to manage the
sample data.

* dev(storybook): specify public dir when building storybook

I'm hoping this means that chromatic will function properly 🙏

* chore: add back the withApi decorator

* setup msw first

* dev(storybook): Make posthogjs work in chromatic

* dont use as cast for response types

* make hot module reload work
2021-10-13 04:45:51 +00:00
PostHog bot
12ce2d61d0
Update posthog-js to 1.14.3 (#6393) 2021-10-12 18:11:04 +01:00
Li Yi Yu
c0d7f1e17d
Paths Viz: horizontal scroll, path card item display on link hover, adding typing (#6323)
* allow for horizontal scrolling on paths viz

* wip

* add axis lines

* move more paths util functions over

* do not shorten urls without parameters

* show hidden path cards on link hover

* convert file to typescript

* small fixes and prettier

* es lint fixes

* more typing fixes

* typing

* final fix
2021-10-11 20:30:25 -04:00
Marius Andra
00633412cc
Insight logic refactor version 1 - keyed insightLogic (#6310)
* kea test "toNotHaveDispatchedActions"

* fix dashboard logic test

* add props and key to insight logic (has no effect)

* inform about is_sample's uniqueness

* use common InsightLogicProps

* persist state via BindLogic and shared insightProps

* persist hashParams

* remove cached Urls

* upgrade new to saved logic

* upgrade typegen

* patch metadata logic

* always show title if saved insights active

* fix negative bug

* fix interval filter

* go to view mode after saving

* full reload when going from dashboard to insight

* use clean filter

* createInsight is no longer used

* fix tests

* fix setAllFilters

* clean retention table duplicate code, fix test

* scene has its own key

* unify insightLogicProps key logic

* consolidate logic fetching

* fix test

* fix reloads

* clears the scene funnel

* move setInsight to reducer

* stronger clicks on menu items

* remove wait

* clarify testcases
2021-10-08 12:13:23 +00:00
PostHog bot
5da276d849
Update posthog-js to 1.14.1 (#6274) 2021-10-06 11:43:43 +01:00
PostHog bot
e1a8a29d68
Update posthog-js to 1.14.0 (#6246) 2021-10-05 10:13:13 +01:00
PostHog bot
ff58d6277a
Update posthog-js to 1.13.17 (#6226) 2021-10-04 12:20:45 +01:00
PostHog bot
5223ea0aa0
Update posthog-js to 1.13.16 (#6222)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-10-04 10:12:40 +01:00
PostHog bot
707fc51bf1
Update posthog-js to 1.13.15 (#6174) 2021-09-29 12:24:11 +01:00
Guido Iaquinti
f4e47abb09
Bump prettier and eslint-config-prettier versions (#6167)
* Bump 'prettier' and 'eslint-config-prettier' version

* Run 'yarn prettier' with the new bumped version
2021-09-29 11:49:29 +01:00
Guido Iaquinti
085593d1cd
Edit 'prettier' command in package.json (#6147) 2021-09-28 14:11:12 +00:00
PostHog bot
9de0551285
Update posthog-js to 1.13.14 (#6143) 2021-09-28 11:36:54 +01:00
Marius Andra
ef70592603
Usable logic tests (works now!) (#5990)
* mockup usable logic tests

* actually filter

* a little verbosity never hurt anyone

* await

* sync toDispatchActions and toMatchValues working

* get at least one test working

* should await this

* better action awaiting

* cleanup

* smarter logic test action matching

* cleanup

* delete snapshots

* fix titles

* remove .run(), add .then-magic

* cleanup

* more cleanup

* refactor into multiple files

* refactor into multiple files WIP

* finish refactor

* make nodejs compatible

* funnel logic test WIP

* delay and printActions

* fix label

* add more mocks

* only call action if it makes sense

* fix reload issue with funnels and actions

* explicitly connect to this logic

* listener and mount functions for kea-test-utils

* improve tests

* mock out scss files

* rename antd es/ to lib/ for compatibility in jest

* add breakdown test

* funnel test updates

* set pointer to now if running a block with expectLogic

* fix mock

* more mock

* ignore if breakpoint

* reset window history and posthog-js with logic tests

* one more breakpoint

* add test mode ecxeptions

* update kea

* improve funnel test

* merge, but break

* add safeguard

* safer props

* fix test bugs

* clarify window.crypto polyfill

* simplify api.mock

* simple throw if unmocked api

* use a global actionMap pointer, so we could query between logics

* use the global querying

* remove "Scene" hack

* fix type bug

* clarify some variables
2021-09-21 13:39:05 +02:00
PostHog bot
085424a619
Update posthog-js to 1.13.12 (#5956) 2021-09-15 09:12:39 +01:00
PostHog bot
b1c6d51f03
Update posthog-js to 1.13.11 (#5939) 2021-09-14 11:50:53 +01:00
Marius Andra
9da6ee3b5f
ClickHouse M1 Docker (#5215)
* m1 clickhouse support

* add clickhouse arm64 compilation dockerfile

* use clang-12 and 2 parallel builds

* working clickhouse docker image

* this needs to be committed out for CH to work... a known issue. WIP

* move things around

* move things around again

* add arm64 build scripts

* comment out broken line in DEBUG mode, still make it break production builds

* update readme

* timeless text

* add issue in comment

* way way way too much white space

* zookeeper restarts sometimes needed
2021-09-13 13:01:24 +02:00
PostHog bot
fb66d49762
Update posthog-js to 1.13.10 (#5913) 2021-09-13 11:09:38 +01:00
PostHog bot
118100e56c
Update posthog-js to 1.13.9 (#5905) 2021-09-10 19:16:21 +01:00
PostHog bot
8a69d6a28f
Update posthog-js to 1.13.8 (#5885) 2021-09-09 20:42:28 +01:00
Tim Glaser
c151f76faa
Pull docker before starting (#5835) 2021-09-07 13:30:18 +02:00
PostHog bot
68e4407da2
Update posthog-js to 1.13.7 (#5811) 2021-09-06 10:30:07 +01:00
PostHog bot
7266e32e16
Update posthog-js to 1.13.3 (#5795)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-09-02 15:36:51 +02:00
PostHog bot
ec8fd48c31
Update posthog-js to 1.13.2 (#5789)
* Update posthog-js to 1.13.2

* update sentry to fix TS error

Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-09-02 11:22:49 +01:00
PostHog bot
a3c8143595
Update plugin-scaffold to 0.12.9 (#5751) 2021-08-26 10:00:16 +01:00
Marius Andra
365a0f68d4
Storybook (#5714)
* initial storybook setup

* fix storybook babel config

* add two stories

* don't load if loaded

* make sure preflightLogic is loaded

* more examples for propertyKeyInfo

* kea storybook provider

* expose getReduxState on dev instances to make stories fast

* history for kea story provider

* remove old kea provider

* stories for insights

* stories for events

* fix .mdx support

* fix preloadedState type
2021-08-25 10:38:33 +02:00
Marius Andra
b24463309f
Sourcemap for recorder.js (#5716) 2021-08-24 15:36:30 +02:00
PostHog bot
082162c32b
Update plugin-scaffold to 0.12.8 (#5656)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-08-20 11:10:18 +02:00
Paolo D'Amico
ad7866743d
Release Nailing Funnels (#5605)
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-08-18 08:44:28 -07:00
Michael Matloka
336fd16709
Fix issue with importing PropertyKeyInfo.scss in Jest test (#5577) 2021-08-13 00:45:19 +00:00
Alex Gyujin Kim
a2f48a873d
add docker compose down to remove network (#5555) 2021-08-11 17:25:12 -07:00
Tim Glaser
a6cc0f0aa7
Use official rrweb version again and update (#5004)
* Use official rrweb version again and update

* Bump rrweb to 1.0.2 (from 1.0.1)

* Use updated `@posthog/react-rrweb-player`

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-08-11 13:00:08 +02:00
Paolo D'Amico
0e13a1e597
Add clear-ch-dev command (#5525) 2021-08-10 15:08:50 -07:00
PostHog bot
1a8d14010a
Update posthog-js to 1.12.3 (#5446)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-08-04 19:34:03 +02:00
PostHog bot
7f82ebff51
Update posthog-js to 1.12.2 (#5408) 2021-08-02 12:54:56 +01:00
Marius Andra
535256cf69
Logic tests again (#5234)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-23 23:58:29 +00:00
Marius Andra
5245ee68ae
New filtering experience (#5189)
* the new filtering experience

* revert bug
2021-07-19 22:28:57 +00:00
Alex Gyujin Kim
d9973c7e5d
Add all steps option to time conversion funnel (#5142)
* add all steps option

* all steps working; add total and mean time to convert

* change display type checks to use enum

* kea types

* dangling console log

* Add average conversion time to time to convert results

* respond to feedabck

* responsive histogram sizes

* merged @Twixes backend changes; adjust data shape on frontend; add responsiveness to histogram

* add tooltip label

* adjust copy and tooltip

* minor tweaks

* respond to general feedback

* kea auto

* better empty state:

* error handling null time bins

* fix tests

Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-19 12:00:59 -07:00
Marius Andra
127e827894
Refactor taxonomic property filter logic (#5098)
* init TaxonomicPropertyFilter based on Tabbed variant

* InfiniteSelectResults

* infinite loader state mgmt

* set local state on select

* set by name, not id

* list and filter static values

* value search & loading anim

* allow selecting operator and value

* add cohorts support - WIP

* Fix cohort select

* default by opening to the correct tab

* extract feature flag

* add pagekey to taxonomic filter logic

* remove use of local state in taxon filter

* create keyed infiniteSelectResultsLogic

* not working: loading logic; need breakpoints and return Promise

* address minor changes

* move files to own folder

* TaxonomicPropertyFilter now controls activeTabKey

* wip: Load next chunk of results when list renders

* change pageKeys

* load initial results on mount

* set breakpoint and overscan count

* add a nextOffset state value rather than breakpt

* preserve scroll pos

* allow loading at arbitrary scroll positions

* styling

* minor cleanup

* wip: limit and offset via list accessors

* do a silly little array slice

* separate endpoint for paginated results

* use Fuse for static lists

* wip: tab titles

* counts update on search for both local and async properties

* revert changes to person.py

* minor improvements

* refactor taxonomic property filter logic WIP

* fix bugs, add search queries

* fix key error

* also show local items

* show counts

* add operator value select

* local search with fuse

* get rid of tabKey, select active tab based on filter

* various cleanup

* add simple api cache

* hide property popover -> make the popup usable

* create filter dropdown

* "add filter"

* show the right cohort

* better handling for when the filter is already in a popup

* move up/down

* keyboard up/down navigation

* select on enter

* preselect selected item, fix focus jank

* autofocus on other dropdowns as well

* improve style and refactor util

* fix dumb bug

* show cohorts full screen

* fix filter alignment, type and placeholder

* filter position and responsiveness

* reduce dependence on antd, fix various layout bugs

* fix responsiveness

* tooltip position

* pass on onComplete

* hide tooltip if switching tab

* search property filters also in EE

* add type, fix typegen write loop

* Minor copy adjustment

You're actually searching all at once

* fix outside click handler

* popups with popper

* add ant-select as exception for popup outside clicks

* simplify deps

* always highlight the first item

* use new popup with taxonomic filter

* fix PropertyFilterButton ref

* clear search on select

* placeholder for value input box

* add empty state

* only open filter downwards

* move listTooltip postition into useState

* list tooltip position after opening and resize events

Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-19 16:40:31 +00:00
PostHog bot
78aac36734
Update posthog-js to 1.12.1 (#5165) 2021-07-16 15:38:00 +01:00
PostHog bot
861059b38c
Update posthog-js to 1.12.0 (#5149) 2021-07-15 12:40:55 +01:00
Marius Andra
25c00acfdc
Abort trends requests & fix few bugs (#5136)
* don't end query if failed if new one came in already

* adjust breakpoints and end the query in the end

* abort trends fetch queries

* smaller delay

* fix entityFilter blinking bug and improve types

* new typegen

* remove second source of truth, change value to 300

* improve type accuracy

* log aborted queries

* report aborts in trendsLogic

* consolidate ViewType into types.ts

* one more

* and one more
2021-07-15 13:14:14 +02:00
Alex Gyujin Kim
44e6a74092
Add D3 Histogram for Time Conversion Histogram (#5094)
* add d3 histogram

* different layouts and fine tuning d3 histogram

* spacing math and comments

* row-align steps action dropdown and refactor

* cleanup

* hide time conversion behind ch flag and remove layout toggle

* remove animation and layout toggle

* revert fat finger

* erroneous type
2021-07-14 14:52:26 -07:00
Lleo Harress
3b21790027
Automatically add polyfills based on browser requirements (#5086)
* Latest browser’s versions and statistics

* Browserlists - Use "defaults" browser support

* Enable Babel polyfills based on usage

* Revert "Polyfill Object.fromEntries (for Safari <= 12) (#4999)"

This reverts commit ad63386a69.

* Different browser support for dev/prod for build performance
2021-07-13 10:01:04 +02:00
PostHog bot
7d1331f257
Update plugin-scaffold to 0.12.5 (#5085) 2021-07-12 18:08:55 +01:00
PostHog bot
e62e8e8e54
Update plugin-scaffold to 0.12.2 (#5079) 2021-07-12 16:06:56 +01:00
Tim Glaser
5f242b2bed
Solve ospath issue (#5014)
* Solve ospath issue

* try separate cypress cache

* Separate install

* ls

* try

* Try to put everything in same cache

* Remove cypress plugin snapshot

* fix cohorts and funnels
2021-07-07 14:04:39 +02:00