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

273 Commits

Author SHA1 Message Date
Harry Waye
f06e0b4c51
dev(react): add react hook eslint rules, as warnings (#6571)
Here I have installed react-hooks eslint rules. See
https://reactjs.org/docs/hooks-rules.html#eslint-plugin for reference.

The specific trigger for this was [this
fix](abdbe54663)
I put in for a bug, which would have been caught by the
`react-hooks/exhaustive-deps` rule.

I've added these both as warnings as there are currently 69 😏
problems:

```
$ yarn eslint
...
✖ 69 problems (6 errors, 63 warnings)
```

At least this will highlight in editors that support it. We can make
these errors in a follow up PR, but this is valuable in itself without
getting into some yak shaving.
2021-10-20 14:40:06 +01:00
Guido Iaquinti
8b0ba34689
package.json: restrict node engines to < 17 (#6569) 2021-10-20 12:28:38 +02:00
Alex Gyujin Kim
ba33121d33
Move rrweb player into repo (#6505)
* rename sessionRecording to session-recording

* logic for new player

* move rrweb-player into repo

* remove awkward wrapper and fix time not updating bug

* chunk load meta timing

* fix duration setting bug

* update icons and styling for controller

* styling icons

* slider styling

* ugly slider

* remove consoles

* sonarqube

* typescript

* typescript

* remove hardcode

* Fix icon from merge

* move report usage back to sessionsplaylogic

* add comments back

* bug fix

Co-authored-by: Rick Marron <rcmarron@gmail.com>
2021-10-19 21:33:43 -07:00
PostHog bot
f0e6776807
Update posthog-js to 1.15.3 (#6533) 2021-10-19 10:04:13 +01:00
PostHog bot
a86fdeb895
Update posthog-js to 1.15.1 (#6525) 2021-10-18 21:05:25 +01:00
PostHog bot
d976fc8deb
Update posthog-js to 1.14.5 (#6507) 2021-10-18 10:20:12 +01:00
Alex Gyujin Kim
074d633c53
Make Sessions Recording faster!! (#6270)
* paginate session recording events api

* code quality

* don't rerender replayer every time events get loaded

* refactor session recordings, make it backwards compatible, add bunch of tests

* move limit and offset to after decompress

* change limit

* add caching of recording

* add duration

* fix a few tests

* fix api tests

* add partial chunk test

* fix default limit test

* code quality

* typing

* fix backend tests

* mypy fixes and signature

* remove circular dependency

* mypy and sessionsplaylogic tests

* fix migration

* make single migration

* revert mypy typing

* remove require react resolve

* fix loading state to persist across multi chunks and add test'

* cleanup

* duration to ms

* fix duration tests

* remove require react resolve

* fix test

* bump rrweb player

* change cache behavior plus more

* fix frontend tests and make duration calculation more robust

* fix timestamp in ms bug in tests

* fix duration 0 test

* fix compatibility with rrweb-player

* update lockfile

* yarn unlink

* resolve kea-test-utils changes

* another one

* remove caching for now (leave as todo) and change limit to 100
2021-10-15 02:41:47 +00:00
Marius Andra
72da684f8a
extract kea-test-utils (#6425) 2021-10-14 17:17:42 +00:00
PostHog bot
ce1dabb1a4
Update posthog-js to 1.14.4 (#6445) 2021-10-14 18:08:39 +01:00
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