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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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>
* 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>