* 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
* add lottie-react
* test loading states
* add new animations
* adopt the laptophog as the loadinghog
* handle opacity via a class
* move all lottiefiles to lib/animations
* new animation component
* add storybook
* use sportshog and laptophog animations for loading
* jest also wants to ignore these files
* clarify text
* support canvas in jsdom / jest
* add width/height to animations
* clarify
* use a mocked canvas instead of installing new debian packages to get this to compile
* I posted a wrong answer on the internet
Co-authored-by: Michael Matloka <dev@twixes.com>
* 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
* 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>
* add @posthog/plugin-scaffold type to plugin editor, simplify plugin
* make functions async
* have same config type as config json
* ignore raw-loader ts errors
* remove monaco webpack plugin
* Add example `console.log` to `onEvent`
* Escape backticks inside backticks
Co-authored-by: Michael Matloka <dev@twixes.com>
* Revert "Hotfix SCSS for trend graphs (#4539)"
This reverts commit 545dc62ec6.
* Revert "Move history import to globals (#4531)"
This reverts commit 542be62053.
* Revert "@ import all scss in lib/components (#4530)"
This reverts commit 5e2a3290da.
* fix deduplicated css problem
* update lockfile
* dropdown and datepicker z-index
* remove dead code
* pass getPopupContainer to range picker
* make DateFilter's custom time range work in a shadow root
* close after selecting
* show date filter instead of date range
* skip updating url on date filter change in toolbar
* actually filter the dates
* fix flickering (always show map)
* refactor date filter component
* upgrade to webpack 5 and @posthog/react-rrweb-player module
* disconnect dashboardLogic from dateFilterLogic (remove broken url changes, etc)
* add bundle tracker
* remove react-hot-loader
* Revert "add bundle tracker"
This reverts commit e59bcfa8
* remove bundle tracker
* remove updatePath
* fix code quality complaints
* revert @cypress/webpack-preprocessor version
* try different cypress webpack plugin
* add crypto-browserify
* add crypto-browserify
* revert to webpack 4
* revert to webpack 4
* revert to webpack 4
* implement feedback and remove debug stuff
* move insights date filter logic out of lib/
* rename DateFilterComponent to DateFilter
* rename DateFilterCustom to DateFilterRange
* Remove hot from new code
* DashboardHeader to ts
* Convert files to typescript
* Use BindLogic instead of passing logics as arguments
* Improve typing for dashboards
* Fix DashboardHeader types
* Improve typing: DashboardItem
* Fix InsightHistoryPanel, SharedDashboard types
* Add WIP code for date ranges on dashboards
* DateFilter/dateFilterLogic to typescript
* Show 'Custom' daterange by default on a dashboard
* Border for dates in Dashboard
* Add dashboard.filters field
* Populate dashboard.filters, use it in code
* Fix some type errors in dashboardItemsModel
* Fetch dashboard items again on date change
* Make dashboard items refresh as dashboard gets updated
* Add refresh button to DashboardHeader
* Make saving dashboard items work again
* Update dashboard type
* Don't update URL in DateFilter
* Update selected time range on load
* Avoid flickering in DateFilter
* Only show 'Custom' in dashboards
* Show calendar icon next to date filter in dashboard
* Avoid double-loading results due to date change
* Kill some duplicated code
* Avoid cache when filters change
(datefilters on dashboard)
* Test individual update_cache method
* Add test for import_from and attributes being updated
* Fix typing errors
* Update api/dashboard tests
* Avoid redirects when changing date range for funnels or retention
Previously funnelLogic might be mounted in the background, causing a
reload
* Add a missing breakpoint
* Reformat with black
* WIP: get cypress something doing
* Get a test running
* Get css loading, stub posthog
* Move helpers to separate file
* Givens > given2
It plays nicer with beforeEach
* Test for session filters
* Test date navigation
* Test filtering
* Try keep old tests running
* Try get tests running under CI
* Prettify fixtures
* Cleanup, use cypress 6
* Add yarn build
* Fix e2e cypress tests
* given2 => givens
* Rename `frontend-test-runner` to `e2e-test-runner`
* Fix cypress test
* Add webpack-preprocessor as a devDependency
* Improve freezing time
* Make css inclusions automatic for component tests
* fix tsc error
* add plugin source, create plugin source version model, add plugin_type
* can create and save source plugins via the api
* make empty source plugins
* message if no config options available
* different image or tag for source plugins
* fix some types
* second drawer
* add fields into drawer
* add monaco editor
* refactor drawer
* save plugin and must be json
* close tab on save
* fix default code
* upgrade to plugin server 0.5.0 - with scheduled plugins
* less height
* upgrade to plugin server 0.5.1 - with posthog.capture
* remove minimap from editor
* upgrade to 0.5.1
* use enum
* reduce quirk
* must enter a name/url
* use the source
* simpler text
* sync image
* add link to docs
* add a link to the documentation inside the source code drawer
* text / ux simplifications
* nicer first plugin experience
* nicer django model choices
* improve "public" import paths
* fix `useOutsideClickHandler` firing an event on any click anywhere in the page
Co-authored-by: Michael Matloka <dev@twixes.com>
* add hotkey base
* add platform check
* Rename CommandBox to CommandPalette
* Add styled-components
* Restructure CommandPalette and add Esc handling
* Update utils.js
* add search box
* Add logic types
* Implement base logic
* Fix scroll prevention
* Update logic and add goto command base with Fuse fuzzy serach
* ux hotkey
* Implement command (de)registration
* minor fix
* base UI
* error message & hints
* command groups UI
* Add commands search
* Make commands work
* Prepare palette for fuzzy search and add basic labeling
* ui adjustments
* ui
* Improve colors
* switch to global command
* Optimize resolution
* global go to commands
* abstract item selection logic to command palette
* Update casing and types
* Add conditional useCommands
* Improve results
* keyboard nav
* keyboard nav fix
* removed double fuse (synonyms broken)
* Update style
* Fix highlighting
* Remove extra style
* conditional go to commands
* add mouse hover handling and rename functions
* remove mac check
* add more commands
* added insights stub pages
* Add command components
* refactor logic
* Update styling
* Remove extraneous `input`
* load custom dashboards to command palette
* Add input styling
* Add write icon
* Refactor results
* minor adjustments
* add person search
* remove papercups fully
* fix input indexing
* fix result executing empty
* Add command grouping and improve navigation
* add urls
* make logic explicit
* fix error with hadnler
* Remove redundant border-top
* add trend functions
* personal api key stub
* Add command palette toggle button
* Fix things
* fix personal api keys
* copy api key to clipboard
* Add toggle text
* Improve palette UX and perform refactoring
* Improve UX and add palette usage reporting
* tests refactor
* filter person list
* refactor api person tests
* add squeak
* deprecate by_distinct_id & by_email person endpoints
* Optimize squeak
* fix typegen error
* use new filters in frontend
* Optimize squeak
* key identifier refactor
* fix mypy
* removed unused code
* Make custom command UI more coherent
* Add calculator to palette
* Use equal sign
* Make palette button nicer
* Add lodash back officially and show palette suggestions
lodash is still used in a few places, but it was not in package.json. The reason this was working was that lodash is a dependency of some other depedencies, but this was fragile. It's still not ideal to use this, but at least this is now not a hack the way it was.
* Remove isHint
* Optimize graph time range command
* Move command results grouping to Kea logic
* Fix result focus autoshift
* Improve palette result focusing
* Adjust for window.posthog being optional
* add test for third-party person filters
* Remove styled-components in favor of .scss files
* Remove redundant container class
* Use insect (sic!) squeak instead of pig squeak
* Show only unique palette results
* Fix palette overlay
* Add powerful command building protocol CommandFlow
* Fix minor issues
* Always show scope when flow active
* Use custom label icon
* Add feedback sharing command
* block command input from being captured in screen recording
at least until we can figure out how to capture this info in a privacy-preserving way
* Hide palette button on narrow screens
* Improve responsiveness
* Fix palette feedback sending
* Fix Esc handling
* Add Message Sent info
* Fix Message Sent info
* Fix dashboard creation and null name handling
* Rename Cy tests to JS convention
* Add basic Cypress test
* Address feedback
Co-authored-by: Eric <eeoneric@gmail.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.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
* add test for caching funnels and refreshing
* Closes #1020 WIP shared dashboards
* Make webpack work
* Progress?
* Hash the entire filter and add share tokens
* Make webpack work properly
* Fix sentry error
* Tighten up the caching logic
* Correctly refresh items and show in frontend'
* Add some padding
* fix caching, update layout
* Add cypress tests
* Fix merge conflict mistake
* Convert share_token to boolean
* Hide text when small
* Redo tooltip for lock
* Remove move cursor when in shared mode
* Improve spacing
* Fix state being incorrect
* Use selectors instead of value
* Use const instead of let
* Fix type errors et al
* Increase cache size
* Fix dashboard tests
* Fix team tests
* Add wait time
* Fix tests
* Fix refreshing
* Fix dashboard tests
* Fix test
* Excluded deleted dashboard items and don't show refreshing
* Fix renaming issue
* Fix migrations and fix display of status change
* Use grid for responsive header
* Don't load annotations
* Eslint
* Fix variable naming
Co-authored-by: Eric <eeoneric@gmail.com>
* initial working
* add test
* fix test
* update paginating format
* merge master
* fix errors
* lint error
* use results instead of result
* more lint errors
* can zoom out toolbar
* refactor the look
* add kea localstorage plugin
* add test to see if user is logged in or not
* keep width when resizing window
* increase padding on larger screens
* floating box style
* toolbar close button
* show what's on the current page
* fix close and remove tags
* inspect element
* inspect element improvements
* show stats
* inspect element
* give jsURL to the editor in debug mode
* toolbar HMR
* move styles to CSS
* tabs on toolbar
* css for current page block
* links to dashboards and actions
* adjust the location of the X so that we don't always have a horizontal scrollbar
* clean up some css, incl renaming toolbar divs
* refactor webpack config to use a separate config for the editor chunk, in it include all CSS inside the JS
* load styles behind the shadow, render only once all CSS is loaded
* tolerable design for the floating view
* header block for float + css zindex fix
* fix height
* move toolbar to toolbar folder
* add back old toolbar folder
* load by default editor.js, move new toolbar to toolbar.js
* only open toolbar.js by default, not editor.js
* add comment for toolbar setting
* Updated Yarn lockfile
* fix test and rename is_authenticated -> isAuthenticated in json
* get mypy to play along
* refactor tab content into folders
* refactor code structure for toolbar
* simplify floating/docked/float/dock -> float/dock
* small refactor
* upgrade to posthog-js 1.1.0
* fix array copy code
* Closes #877 chunk loading errors
* Closes #877 chunk loading errors
* add chunks to all webpack files, use webpack-html-plugin to make an index.html with the right names
* change to contenthash for better caching
* add dev server on a different port
* store loaded scenes in reducer
* add react-hot-loader
* add react-hot-loader to all code split points
* fix action pages HMR
* ignore cypress screenshots
* generate django login/signup page layout with webpack html plugin
* move to devDependencies
* expose webpack-dev-server ports
* run tests on the production docker image
* start webpack dev server on a custom host if requested
* revert e2e to dev dockerfile
* add test travis config
* add stages
* add travis conf
* cache node and pip
* node 11
* travis ci bump
* node via nvm
* install v12, disable cypress for a moment
* remove 2 commands, test cached build time
* try different yarn cache, add cypress
* add postgres 12
* migrate before cypress
* remove latest postgres for now
* createdb before cypress
* Try different port
* cull packages
* remove hash from main bundle filenames to not break anything
* cypress port 8000
* cypress tests with production docker
* don't use the /code path in e2e test, use docker image
* remove hash from css to work better with editor
* only one export from actions
* remove travis test
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Closes #505 filter funnels by events as well as actions
* Simplify kea modules and store date_from directly against filter
* Use key on kea so the list doesn't get carried between funnels and trends
* Move filters to selector
* Remove useEffect
* Remove unused type: ignore
* Fix creating new funnel