* style(frontend): Round by 6px by default
* Silence `buildResponse` destructuring error
The destructuring fails when a previously imported .scss file can't be found, e.g. after switching branches - but in that case there already is an actually helpful error in the logs, so we don't need this destructuring noise.
* Update UI snapshots for `chromium` (2)
* Maybe fix wrong story
* Update UI snapshots for `chromium` (2)
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* upgrade storybook
* flip the "legend" option, enable by default on png exports
* noHeader sharing mode for insights
* fix storybook 6.5 issue
* split exporter component and rendering
* remove `fitScreen` from options - it was not used anywhere from what I can tell
* storybook with no data
* get an actual iframe into storybook
* export insight
* dashboard mock
* load dashboard directly, not via window
* add dashboard story
* tweaks
* code fixes
* fix type
* move everything under src/exporter
* use a common exporter entrypoint
* fix styles for image exports
* add styles
* move embed info out of the frontend
* unify whitelabel
* remove "?." to tree-shake it away
* load dashboards in a bit cleaner way
* consolidate
* typing
* 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
* wait close to 2min
* add Link to exports
* export kea stuff
* prettier options
* add typing support for react
* export types automatically
* update export
* use chunked entrypoints when possible
* shared dashboard entrypoints
* refactor createHashlessEntrypoints
* extract parallel building logic
* clean html writing function
* improve clarity
* preload chunks when loading esbuild scenes
* fix TS error
* fix license title
* fix scene identifiers in menu
* lowercase data-attr
* make the events menu have the old data-attr
* change var name to clarify its usage
* 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>