* fix player close button position
* reduce player padding
* allow recording on seek bar
* remove skip inactivity toggle
* style fix
* update rrweb
* add svg for remvoed content
* add ts ignore to legacy files
* esbuild package
* almost get esbuild working
* fix react-virtualized imports
* add splitting
* fix funny import reorder bug
* fix squeakAudio referring to itself
* write index.html file
* fix some bad imports
* update antd paths
* remove raw-loader usage, it didn't work anyway
* refactor and copy public
* build app and toolbar
* get toolbar working, but without styles
* make toolbar and its styles work
* shared dashboards
* clean frontend build before rebuilding
* add watch mode
* reorder tasks
* revert js url
* incremental builds of app with debounced chokidar watching
* common build/watch script
* improve logs
* watch during firrst build
* fix toolbar url
* fix wrongly exported scene
* create sceneProxyLogic to untangle sceneLogic from all bundles
* disconnect sceneLogic and refactor setPageTitle
* live reloading server
* rename utils file
* only wait for /static
* fix encoding
* simplify
* add missing dayjs plugins
* fix pathless logics
* simplify options
* add jsx for webapck
* slight delay to catch changes
* a type is a type
* fix build
* esbuild in start
* funnelLogic path
* include all files with a "." (so .mjs, etc) in /frontend/ to docker
* rename to "utils.mjs", make "build.mjs" executable
* improve erroring
* revert some needless changes
* more reverts
* change some scripts
* remove setuff
* clarify function
* make "--host 0.0.0.0" work
* fix import order issue in webpack
* remove webpack css inlining for toolbar to simplify config
* make toolbar with external styles work in storybook
* move live server injection into django
* fix undefined bug
* simplify setup to work with injection directly in http://localhost:8000 (no proxying needed on :8234)
* add comments
* Fix `fse` usage
I was getting this otherwise:
$ node frontend/build.mjs
file:///Users/twixes/Developer/posthog/frontend/utils.mjs:46
fse.copySync(srcDir, destDir, { overwrite: true }, function (err) {
^
TypeError: fse.copySync is not a function
at copyPublicFolder (file:///Users/twixes/Developer/posthog/frontend/utils.mjs:46:9)
at file:///Users/twixes/Developer/posthog/frontend/build.mjs:5:1
at ModuleJob.run (internal/modules/esm/module_job.js:146:23)
at async Loader.import (internal/modules/esm/loader.js:165:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
* Mock `process` for VFile used by ReactMarkdown
I was getting this otherwise:
core.js:55 Uncaught ReferenceError: process is not defined
at new VFile (core.js:55)
at VFile (core.js:49)
at Function.parse (index.js:273)
at ReactMarkdown2 (react-markdown.js:42)
at renderWithHooks (react-dom.development.js:14803)
at mountIndeterminateComponent (react-dom.development.js:17482)
at beginWork (react-dom.development.js:18596)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
* Mock `process.env` for VFile used by ReactMarkdown
I was getting this otherwise:
platform.ts:73 Uncaught TypeError: Cannot read properties of undefined (reading 'ENABLE_VSCODE_BROWSER_CODE_LOADING')
at platform.ts:73
at platform.ts:79
at Function.r._invokeFactory (loader.js:1118)
at r.complete (loader.js:1128)
at r._onModuleComplete (loader.js:1754)
at r._resolve (loader.js:1714)
at r.defineModule (loader.js:1357)
at _ (loader.js:1804)
at numbers.ts:10
at fake:1
* pass the heavy appScenes to sceneLogic through props via App.tsx
* remove sceneProxyLogic
* remove exported variables
* fix sceneLogic test
Co-authored-by: Michael Matloka <dev@twixes.com>
* fix router redirect
* remove dependence on user var
* split scenes and sceneTypes out of sceneLogic
* rename LoadedScene type to SceneExport
* export SceneExport from most scenes
* use exported scene objects, warn if not exported
* fix type import bugs
* remove dashboard
* keep all loaded scene logics in memory
* fix sorting bugs
* support scenes with params, make it work with dashboards
* fetch result from dashboard if mounted
* fix mutations
* add lastTouch
* refactor scene parameters to include searchParams and hashParams
* add insights scene to scene router
* add insight router scene to scene router
* fix cohort back/forward bug
* this works
* bring back delayed loading of scenes
* set insight from dashboard also in afterMount
* split events, actions, event stats and properties stats into their own scenes
* refactor to options object for setInsight
* override filters
* clean filters for comparison
* fix cohort bug
* get a better feature flag
* make turbo mode faster by making non-turbo-mode slower
* less noise in failed tests
* fix tests
* flyby: add jest tests pycharm launcher
* clean up scenes
* add test for loading from dashboardLogic
* fix bug
* split test init code into two
* have the same data in the context and in the api
* add basic tests for sceneLogic
* run the latest and greatest
* fix menu highlight
* implement screaming snake
* only show scenes with logics
* Remove papercups widget
* remove unused import
* helper button in the nav bar
* post-merge fix
* extra fixes & improvements
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* saved insights url sync WIP
* sync filters with the url
* improve trend and date filters
* convert utils test to typescript
* create simple object shallow diff function
* only persist the difference from the default filters in the url
* add tests and simplify operations
* improve tests
* better load checking
* refactor(taxonomic-filter): add api mock functions
* chore: remove makeApi from storybook preview.js
* feat(correlation): add multiselect for property names
Previously we had a simple text input box that was splitting the input
to get a list of property names. This doesn't give the greatest user
experience.
Now we have a simple select box that includes:
1. search filtering for options
2. multiselecting options
3. a select $all, although this is pretty poorly implemented at the
moment, for instance you can select $all, at the same time as
selecting a subset of properties.
* add a little commentary around PropertyNamesSelect
* add deps to useEffect
* ignore return type eslint issues
* just use console.log instead of actions
* remove unused import
* chore: add error condition
* chore(correlation): update styling of property select
This puts it more in line with
https://www.figma.com/file/gQBj9YnNgD8YW4nBwCVLZf/PostHog-App?node-id=4200%3A30715
* Add no search results message
* input focus border
* fix type
* use onBlur
* make checkbox checked colour change
* make query bold in no results message
* add clear
* Implement search highlighting
* fix typing
* add regex split comment
* if no property names selected, default to $all
* typo
* Add test for selection component
* Add test highlighting onChange lag and clicking outside
* click out side should depend on hide
* make sure onChange triggered on clear or select all
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