* fix dayjs
* fix timeouts (we're not strictly speaking running in nodejs)
* export unexported type
* consolidate on a single FormInstance
* no need to rename
* fuse
* forminstance 2
* locationChanged
* BuiltLogic
* remove Type.ts exception
* fix duh
* playing with common apps
* playing with common apps
* fix some scss deprecations 🤷
* revert
* move packages/apps-common
* remove compiled json file
* build apps-common before other packages
* mkdirp, build types before running
* build types before the rest
* move imports json to packages folder
* mark some packages as external, saving 200kb
* revert nonsense
* remove ant dep
* make app source editor types optional for speed
* move dev server reloads to utils.mjs
* remove webpack start scripts (unused)
* refactor build/utils to support various dirs
* apps package
* revert some stuff
* yarn
* go back to the old location and commit packages.json in
* commit it in
* out of scope
* fix bad imports
* fix some postcss mess
* move to @posthog/apps-common
* add more stuff to apps
* include that in packages.json
* simple cjs build
* export everything
* simplify
* make separate package for lemonade
* more lemonade
* fix jest imports
* fix jest imports
* yarn as well
* src
* write types before building
* rename lemon-ui, part 1
* add readmes
* rename to lemon-ui, part 2
* this app source editor tsd is committed into the repo, so we don't need it before a build
* upgrade typegen
* fix all un-exported local types for typegen
* fix another bunch of TS errors
* target an even newer version of JS for string.replaceAll
* revert deleted comment
* add String.replaceAll warning
* create plugin source model
* edit source via plugin_source model
* deprecate "source"
* test plugin source updates
* add support for index.ts and index.js
* refactor plugin loading, support plugin sources from db
* fix source code in tests
* remove transpilation code
* reload plugin after saving
* store defaults in the db instead of persisting in form
* remove fields that don't exist
* feat(apps): transpile frontend.tsx
* update timestamp even if no local fields changed
* yarn.lock
* feat(apps): load apps with frontend.tsx in the frontend
* fix import
* reload apps, show if transpiling
* remove unused fields
* commit suggestion
* rename to PluginSourceFile
* rename to PluginSourceFile
* remove dead code
* cleaner types
* PluginSourceFile
* fix nag
* fix types
* one more merge conflict
* transpile when adding frontend
* fix test
* edit app from sidebar
* sneaky edit button
* fix code feedback
* add comments
* make it safer to call
* convert to upsert
* convert to upsert
* comment on the null
* revert plugin server changes
* get source from new model behind the scenes
* simplify
* revert accidental changes
* revert accidental changes
* remove defaults
* sync the old source field
* use the source model in the plugin server
* cache the source from pluginsourcefile
* test that getPluginSource gets data from the database
* safer null check that doesn't override `{}` in the db with `null`
* clarify origins
* use enum
* fix error from migration 0233 ([] is falsy in python!)
* fix merge
* error as null
* use the explicit "source__index_ts" field
* cache transpiled code
* remove unused type
* cleaner query
* remove extra line
* fix test
* improved error handling and run code through prettier
* new packages
* loading state in source editor
* kinder error
* sync plugin state if pluginsLogic, retry loading
* update snapshot after kea-forms update
* remove "updateAppConfig"
* add a query
* add examples to editor
* refactor sidebar
* add more lemons
* simplify app config
* rename action and add todo
* some helpful comments
* create appConfig if enabling a plugin and none was yet provided in django's app context
* re-enable app only if enabled
* fix last bug
* add back onInit and move types around
* show apps section header only if any link in the list
* remove dead code
* fix few errors, only allow editing of source apps
* stringify json
* completely bail out of apps if the flag is off
* Update snapshots
* fix broken link
* Update snapshots
* use new icon for "apps" now that it's not "plugins" any longer
* Update snapshots
* Update snapshots
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* rearrange stories
* fix bug in storybook with mock data
* convert to TS, fix static path deprecation
* wrap all scenes with KeaStory, deprecate getReduxState
* remove old text
* don't complain about postcss
* remove ApiSelector, revert to ".js" main
* preview ".ts"
* fix msw
* move kea story
* fix urls
* add /decide handler
* mount logics that are there on app
* reduce boilerplate
* refactor history list storybook api
* separate data
* Add /api/projects/@current/groups/property_definitions
To load property definitions for groups
* Add routes for fetching group types
* FE: Group analytics feature flag
* FE: Group analytics base types for properties
* FE: Initial implementation of fetching logics
* add group tabs to filter
* make sure group properties populate and refactor things
* prettier
* disable unused vars
* allow indexing objects by number
* mount group properties logic
Co-authored-by: Li Yi Yu <li@posthog.com>
* 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 multiple table bugs and standardize table overflows
* support more es2019 functions like Object.fromEntries
* simplify getting active breakout value
* unset maxWidth for resizable cols by default
* fix feature flag key cutoff and empty description bug
* ellipsify feature flag table
* labels or dates or days
* fix bugs; refactor table scroll
* fix double key and increase the width just a bit
Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
* improve "public" import paths
* fix `useOutsideClickHandler` firing an event on any click anywhere in the page
Co-authored-by: Michael Matloka <dev@twixes.com>
* Hide $session_id properties
* Exclude $snapshot events from event views
* Add end_time to sessions queries
This might be used by SessionRecording queries
* Add WIP way to return session recording
Note that this mutates existing responses - might not be the best way to
do this.
* Query for feature flags in a consistent way in frontend
* Improve documentation on featureFlagLogic
* Update frontend types
* Set up endpoint for querying event data for rrweb
* Sort snapshot data in BE before sending to FE
* Show sessions player in a drawer, load data from API
This makes for a smoother experience (IMO, will iterate). At the very
least, drawers enable us to have differing urls via kea
* Show loader while replay is loading
* Make player full-width
* Remove debug code
* Implement persistent URLs for sessions
This should make it possible to share recordings with team.
The URLs are currently quite long - perhaps we can get rid of
distinct_id long-term within it?
* Use only $session_id for filtering sessions
There's a small risk of collisions, but this cleans code up a lot
* WIP
* Add `array.flatMap` to tsconfig
* Add selectors for prev/next session recording
* Clean up whitespace
* Make next and previous buttons work
* Patch prev/next behavior when not visible in page
* Session recording query testing
* Fix typing errors
* Make Sessions queries work properly
It was previously overwriting things even in queries not returning a
list of sessions
* Blacklist browsers w/o flatMap (PR review)
* Close sessions player on back
* fix back button and small bugs
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* kea-typegen 0.2
* remove old Type.ts files
* more setup for typegen-0.2, update yarn scripts, remove webpackbar
* import types from the right paths
* update ENV in build script
* 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