0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
Commit Graph

33 Commits

Author SHA1 Message Date
Tim Glaser
bcf427cb55
Webpack HMR, Add hashes to chunk filenames. (#878)
* 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>
2020-06-02 10:39:53 +01:00
Tim Glaser
46eaf1b742
Fix babel errors (#861)
* Fix babel errors

* .

* Update lock file

Co-authored-by: Eric <eeoneric@gmail.com>
2020-05-26 20:14:46 +01:00
Eric Duong
848085682d
change more dropdowns to antd (#814)
* change more dropdowns to antd

* action select

* eslint errors

* remove react-select

* restore lost properties

* add height
2020-05-21 20:33:29 +01:00
Eric Duong
a012aa6723
Cypress tests (#789)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres
2020-05-19 14:48:10 -04:00
Marius Andra
dc447dc172
Touch dashboards (#775)
* more resize handles

* see-through loading overlay

* mobile mode, dragging dashboards, make panels wiggle, etc

* use long press and esc to control dragging

* clean up header

* disable dragging when clicking on the background

* clear toast on unmount, disable pointer events when dragging

* rearrange button

* clicking handles doesn't stop rearranging

* fix grid layout import

* fix header layout on mobile

* better alignment of version and worker info in responsive mode

* overflow fix

* pinned dashboards in sidebar

* more visible rearranging toast

* clear dom text selection after starting to resize panels

* add existing dahboard name in the "save to dashboard" modal

* add divider between pinned dashboards and the rest of the menu

* clarify how to exit drag mode

* dragging enabled by default, disabled if iOS or Android, long touch only to enable wobbly mode

* add margin under wobbly dragging mode to make it nicer to move the last item

* can drag panels from anywhere, except tables

* exclude tables from long pressing

* less padding in low resolutions
2020-05-18 20:48:24 +02:00
Marius Andra
b446731ced
add breakpoint (#754) 2020-05-13 10:02:01 -04:00
Tim Glaser
20fab5d5a2
Add ES Lint (#719)
* Add ES Lint

* Update lint.yml

* move lint file

* Add eslint to package

* use yarn

* Run ci/test only once

* Fix eslint errors

* Fix rest siblings

* precommit hooks

* Lint typo

* ESLint per file

* Eslint
2020-05-13 13:17:00 +01:00
Marius Andra
bc7eabc315
Resize dashboard items (#746)
* Fix Error404

* resize and drag dashboard items

* fix funnel resize issues

* store layouts in kea

* layouts for different breakpoints

* save layouts after updating

* colors in submenu, but disabled

* save item colors

* 1920-sidebar breakpoint

* add graph colors for graphs with backgrounds

* pie chart label color and z-index to put over the chart if a long number
2020-05-13 11:14:09 +01:00
Marius Andra
c324582076
703 multiple dashboards (#740)
* create dashboard model

* add pinned dashboards to submenu

* rename "Default Dashboard" -> "Dashboard"

* refactor SaveToDashboard modal

* save onto right dashboard

* load and show dashboard data

* move logic to separate file

* dashboard selection

* prompt for name

* add promise cancellation for prompts, so that they close when we change the url

* show a global loading progress bar if it takes more than 500ms for any loader to work

* add dashboards on the dashboard page

* pin dashboards

* rename dashboard

* cut off text nicely in the sidebar

* delete dashboards

* dash item "more" link in antd style

* revert to ellipsis

* trigger by click, redirect well with delete

* remember last visited dash, update icons

* better view icons

* refactor Dashboard into subcomponents

* add a sad hedgehog for the 404 page

* fix loading keys

* add a few more overlay hedgehogs

* add new dashboard from "no dashboards" page

* use a hedgehog with a better license

* better redirect when deleting dashboard

* update dashboard items design

* dark sidebar

* make a few other scenes darker

* add a few styles that can be toggled

* add menu to change color of dashboard panel

* move to prompt logic

* new dashboard on dashboards page

* show success message in model

* refactor shared listeners

* rename dashboard item

* add new dashboard when adding to dashboards

* redirect after adding

* fix icon alignment

* undo deleting dashboards

* replace antd message with toast to close programmatically

* remove the style dropdown for now

* set the scene on a new "thread" to avoid react's reconciliation triggering logic building on the current run heap

* fix action run heap issue properly

* use table in dashboard list, link to all dashboards

* support links without hrefs

* empty dashboard style fix

* ignore type

* save created_by user

* remove nprogress spinner

* use antd table to render dashboards

* show "all dashboards" as the default when clicking the link

* pin dashboards automatically

* soft delete

* remove nprogress

* remove nprogress

* remove all caps

* export deleteWithUndo function

* add delete and pin links to dashboards list
2020-05-11 18:09:02 +02:00
Marius Andra
6aea09228c
Routing Refactor (#717)
* extract some components from EventsTable

* event table refactor

* move logic and load next events

* flip sort order

* eventSelected -> selectedEvent

* put all next fetching through the same fetchEvents action

* event polling

* onClick not needed

* refactor EventElements into separate file

* unique key for events table based on the view that is open

* disable filtering in actions page

* use <A> tag

* fix ===

* make property filter update the filter through the browser URL

* move from react-router to kea-router

* add root redirect

* fix dashboard urls

* remove <A /> tag, keep using <Link />

* load events before the scene opens

* rename ActionEvents -> LiveActions

* use eventsTableLogic for live actions

* when removing a filter, assure that there is a {} at the end

* save path so that we don't update anymore when we move off the page

* preload logic before scene

* better name for property filters

* fix default search input uncontrolled error

* set property filters through the url

* refactor some variable names

* clean active views and cached urls, add "order" to actions from url

* fix some linter errors

* build and pass logic

* turn actionFilterLogic into a controlled logic

* make it work

* small code improvements

* use properties from kea-router's search params

* upgrade kea-router

* use properties hash

* rename actionFilterLogic.js to entityFilterLogic.js and pass logic down in props

* more entityFilterLogic cleanup

* use new router for trends

* use objectsEqual instead of manual JSON.stringify comparison

* router.values.searchParams in propertyFilterLogic.js

* adding new entity type works

* always highlight something in the sidebar

* remove unused FilterLink.js

* refactor active submenu

* add query to link to /people

* funnels work again

* split property filters per id of funnel

* set $pageview or $screen as default action in /trends if just opening the URL, sparking loads of joy

* fix uncontrolled<->controlled input warning

* simpler loading, without breaking DOM rules

* cleaner loading screens

* fix uncontrolled to controlled warning

* do not show links to myself if showing events table under /person/:id

* uncontrolled - controlled input

* remove broken link to step event, fix duplicate key errors

* table loading as overlay if something in table

* show loading overlay only after 500ms

* undefined fix

* 2 more undefined fixes

* use kea-router's combineUrl instead of the homebrewn toParams()

* date filter returns dates as strings
2020-05-07 11:48:04 +02:00
Marius Andra
9134e13177
Kea 2 (beta) upgrade (#663)
* upgrade to kea2 beta

* remove empty createStore

* add yalc to .gitignore

* add kea 2 and babel-plugin-kea
2020-04-27 16:39:21 +01:00
Tim Glaser
4931407da2
Closes #505 filter funnels by events as well as actions (#561)
* 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
2020-04-14 20:41:26 +01:00
Tim Glaser
76fa26a1a0
Fix event name test (#579) 2020-04-14 15:31:04 +01:00
Tim Glaser
4782d54d1f
Configure mypy (#562)
* server/mypy: Enable no_implicit_optional

no_implicit_optional Changes the treatment of arguments with a default value of None by not implicitly making their type Optional.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#none-and-optional-handling

* server/mypy: Enable warn_unused_ignores

warn_unused_ignores: Warns about unneeded # type: ignore comments.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings

It's best to exclude packages with no typing in mypy.ini rather than in
the code. This waym if tin the future these packages add types it's can
easily be disabled (by removing the exclusion in mypy.ini).

* api/user: Fix user password was not really validated

* api/test/base: Remove unreachable code

Team is created in setup, so no reason for it not to be there (unless
setUp is overriden by child, which as far as I can see is currently not
happening),

* server/mypy: Enable check_untyped_defs

check_untyped_defs: Type-checks the interior of functions without type annotations.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#untyped-definitions-and-calls

* server/mypy: Enable strict_equality

strict_equality: Prohibit equality checks, identity checks, and container checks between non-overlapping types.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#miscellaneous-strictness-flags

* server/mypy: Enable warn_unreachable

Added a fixme for a possible oversight in function that parses JSON.

warn_unreachable: Shows a warning when encountering any code
inferred to be unreachable or redundant after performing type
analysis.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings

* api/posthog: fix possible bug when batch is not a list

Current code assumes batch is a valid list. If batch is not a list, the
capture handling will cause a 500 error.

* fix stricter mypy

* Use response.json instead of .data

Co-authored-by: Haki Benita <hakibenita@gmail.com>
2020-04-14 11:05:45 +01:00
Eric Duong
848d5abf53
added babel plugin (#545) 2020-04-13 10:22:43 +01:00
Eric Duong
ecbec73ac7
Replace current Sidebar with Ant Design Sidebar (#530)
* initial commit for dropin

* remove console log

* inner menu item weirdness

* recover original styling of modal and invite buttons

* colors and styling

* remove parent props

* updated path comparison and squashed an previous error on inviteteam modal

* returned some of previous implementation for less diff
2020-04-10 14:42:31 -04:00
Tim Glaser
6f68b6a8ed
Adds to #533 use offset instead of timestamp of posthog-js to avoid w… (#535)
* Adds to #533 use offset instead of timestamp of posthog-js to avoid wrong user time

* Fix type error
2020-04-10 13:26:59 +01:00
Tim Glaser
8b4a1c2ab1
Bump posthog-js 1.0.6 (#529) 2020-04-09 17:14:00 +01:00
Tim Glaser
cb7dd2551e Fix npm command to copy array.js 2020-04-09 13:25:53 +01:00
Tim Glaser
70c8c71bd1
Use npm instead of yarn in copy command as Heroku doesnt have yarn (#520) 2020-04-09 13:22:48 +01:00
Tim Glaser
4223758d8b
Use posthog-js to get array.js (#518) 2020-04-09 12:58:45 +01:00
Marius Andra
448138beda add props to trendsLogic to split dashboard charts, reactor actions and properties into models, move "results" into a loader 2020-03-25 11:31:08 +01:00
Marius Andra
280384235d sue kea-loaders to fetch trends actions and properties in a controlled way 2020-03-25 10:28:33 +01:00
Marius Andra
bd34449087 move kea-router to deps 2020-03-21 16:26:06 +01:00
Marius Andra
9fce118cbe refactor Trends to functional component and store values in trendsLogic 2020-03-21 00:54:19 +01:00
Marius Andra
888cb3e251 fix rebase: update style and move package.json again 2020-03-18 13:45:06 +01:00
Marius Andra
de6ebca84d move package.json to the root folder 2020-03-18 13:41:46 +01:00
Tim Glaser
16958db9bc Update readme 2020-02-20 00:10:18 -08:00
Tim Glaser
7561597d8c Improve readme with production installation instructions 2020-02-09 14:39:05 -08:00
Tim Glaser
bbd67289d9 Nicer way of displaying elements 2020-02-08 16:00:17 -08:00
Tim Glaser
b5742e3b8a Add actions trends graph 2020-02-01 22:40:38 -08:00
Tim Glaser
5816fc98e3 Add actions view 2020-01-26 23:28:32 -08:00
Tim Glaser
7f911cddcc Events frontend 2020-01-24 15:57:57 -08:00