* fix property filter state; read from value not payload
* use fixed Col span instead of flex
* fix shadow variable
* PropertyFilters flexbox min and max widths
* explicitly reset property value input on change
* add title property to select options and recreate antd component
* tweak css
* eslint and ts fixes
* redo custom select component as modified Tag
* typing operatorvalueselect
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Put Team.plugins_opt_in out of use
* Put Plugins out of BETA
* Add attention-grabbing blip for Plugins in nav
* Add end of Plugins beta banner
* Refactor MenuItem highlighting
* Update Plugins page copy
* Prettier
* Add User.flags field and use it instead of posthog.persistence
* Fix User.flags API
* Update migration
* Update Plugins.tsx
* Roll back extraneous additions
* Roll back more
* Update code ordering
* round table sizes in system status
* fix typing
* Use compact_number/compactNumber across the board
* Update compact_number docstring
Co-authored-by: Michael Matloka <dev@twixes.com>
* WIP - new flow wired
* make everything square + add footer back in
* fix types
* logo cleanup + type fix
* store active tab
* delete old img
* rename files
* cleanup
* add a feat flag
* refactor
* cleanup sort
* use PH logo for default
* add flags constant
* add instrumentation
* replace style
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
* initial api update
* make api work
* frontend changes
* hello
* adjust trend payload
* prelim working
* fix bugs
* use offset in filters to_dict
* use different pagination check
* use offset in filters to_dict
* test
* extend range for pg
* update test
* remove print
* update test
* match limits
* add api test
* center button
* nits
* UI adjustment
* update comment
* fix type error
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* add `important_data_attributes`
* fix undefined bug
* important data attributes in setup
* add dashes
* remove dead code
* scarier exampe
* support multiple data attributes in the toolbar
* update to simmer that supports wildcards
* rename "important_data_attributes" -> "data_attributes", store as a json array
* update ts blacklist
* another one
* use a tag select for data attributes
* remove needless string serialization
* implement text feedback
* data attribute setup style improvement
* better default handling
* fix out of sync migration
* Set ACTION_EVENT_MAPPING_INTERVAL_SECONDS to 300, move to settings
* Add async warning
* Use smarter get_from_env
* Async event action mapping warning when creating a webhook
* Async event action mapping warning when editing an action
* remove top async warning
* Use common reworded notice component for async mapping
Co-authored-by: Michael Matloka <dev@twixes.com>
* Better handle extra info buttons during plugin reordering
* Fix UI bug in first time plugin enabling
* Give very new Cloud org config access to plugins
* Add migration
* Lower the bar to report bugs in plugins
* remove lingering space
* Fix PluginImage sizing
* Improve ordering tooltip clarity
* Use new ExtraPluginButtons component for About and Feedback
* Reduce large PluginImage size
Co-authored-by: Michael Matloka <dev@twixes.com>
* Fix SubtitleProps.buttons type
* Improve "Mark as global" styling
* Show globally managed plugins last in the installed disabled list
* Update InstalledTab.tsx
* Add Edit order tooltip
* Show notice if could not get a unique selector for the element
* Remove redundant value fallback
* Clarify tip
* Prettier
Co-authored-by: Michael Matloka <dev@twixes.com>
* 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
* WIP auto filter test accounts
* finish off
* Fix tests
* Non generic emails
* add list of generic emails
* Move location to below property filters
* Fix typescript errors
* as any
* fix tests
* filters
* fix tests
* Featureflag doesn't really makes sense for this feature
* fix tests
* fix test
* Add clickhouse + tests for each insight
* Fix lifecycle and paths
* Fix sessions
* Fix session tests
* fix sesisons test
* fix migrations
* fix migration chain
* refactor path & remove stale console.log
* adjust useAnchor & minor copy
* rename to avoid confusion with inline component
* test account filter tweaks
* fix filters
* hardcode
* Add tests for funnel trends
* Make generic emails super fast
* Fix migrations
* Default to false for now
* Default to false, remember a user's preference
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Add crypto-js for calculating MD5
* Add Gravatar support to profile picture
* Add title attribute to ProfilePicture img
* Optimize ProfilePicture
* Fix typing
* Show Gravatar in Members list
* Remove style from ProfilePictureProps
* Update title in ProfilePicture img
* Fix TS
* Show Gravatars in Invites
* Remove debug line
* Use nbsp in /.+ (At|By)/ table headers
* Remove user prefix from ProfilePicture props
* WIP Plugins secret config fields
* add comments
* Polish Secret Plugin Field (#3476)
* Replace warning with a button
* no matter what the value is -> a secret is a secret
* update text
* secret api changes
* check equality with secret string
* fix type
* add tests
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Add JSON view for events
* Extract sortedKeys to utils
* Don't wrap EventJSON CodeSnippet in extra div
Co-authored-by: Michael Matloka <dev@twixes.com>
* Add test for bar charts
Since our charts are rendered on a canvas we can't really interact well
with it. Instead, we take a screenshot now (new dependency).
* Debug error in CI
* Make sure images are the same size on CI and locally
This only "affects" our team and local development. I got tired of
needing to reload after toggling a feature flag locally. This makes it
so that the newly edited flag is applied immediately.
* base table legend
* toggle visibility logic
* colors working
* display data in legend
* clean up types and conditions
* review-points
* missing constant from merge
* Make the table small
* disabled when only 1 is left and add label clickable
* add better label handling
* fix test
Co-authored-by: Tim Glaser <tim@glsr.nl>
* Fix links to people from Retention modal and Funnels.
More details under issue https://github.com/PostHog/posthog/issues/3480
* Fix funnel calculations on self-hosted
Broken by renames within https://github.com/PostHog/posthog/pull/3301
* Handle cached calculations in e2e test runner
When executing e2e tests, celery tasks are evaluated immediately. Previously
due to the caching the funnels never loaded as we overwrite the results immediately.
* Add test for navigating to persons from funnels
* Test for retention visualization and person navigation
* Extract const for a frequent if-statement
* Show bar graph
* Show bar chart breaking down by value
* Don't show interval filter when non-time based visualization
* Set axis color as expected
* Add percentage of total to bar graph
* Include action info in tooltip for value graph
* Support DashboardItem
* Mark prop as optional
* Convert new file to typescript
* Disable bar value for stickiness
* Don't colorize sql for output
* Handle setting array props as values
* Handle arrays exact/is_not property filters
Also updates tests to use parameterization
* Avoid autoclosing PropertyFilter popup
As key changes, old one got removed from DOM
* Improve filter UX
Don't allow filter to become multi-line and keep inputs the same size.
Previous flex={1} was doing flex: 1 1 auto which was messing things up
* Fix typescript issue
* Handle array lookups in postgres
* Update types
* Fix fixture to recreate tables
* Make replace spaces logic consistent with what was there before
* Handle list filtering better in postgres
* Update frontend tests
* Handle edge case: Switching between multi operator and single operators
* Clarify what anonymize_ips does
* Hide IP before event ingestion, not during (hides it also from the task queues and plugins)
* flip it around
* add IPs to tests that expected them to be there
* "Discard"
* test that everything works when ip is none
* Refactor bulk invites to use OrganizationInviteViewSet
* Refactor BulkInviteModal
* Flyby utils fix
* Make invitation button nicer
* Fix dropdown Invite button
* Fix invites/bulk response status
* Update test_organization_invites.py
* Fix Formula typing
* Fix test_invites_are_create_atomically
* Fix typing
* Update comment
* The to each
* Address feedback and introduce optimizations
* Fix tests
* Polish
* use single invite on user dropdown if email is not available
* Add unit tests for pluralize
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Upload static cohort using CSV, closes #2868
* fix tests
* Fix tests
* Fix e2e test
* Avoid double inserts
* Speed up query
* Move to params
* fix tests
* initial cleanup
* initial scaffold for cohort static logic
* intiial frontend changes
* initial working
* fix error on iterable
* stickiness people func refactor
* Use JSON instead of protobuf
* stickiness working
* clickhouse route
* unused import
* move button
* make interface easier to user
* clickhouse support
* restore cache decorator
* endpoint adjustment
* adjust how clickhouse handles inserting for static cohorts
* split out processing into pg
* use worker for clickhouse querying too
* add pg test
* ee test
* add input for cohort naming
* add stickiness test
* condition for when to show save cohort
* fix types
* minor fix
* remove repeats
* remove hardcoded id
* add date handling to trends cohort func
* remove print
* add link on success creation
* cohort working
* fix backend test
* fix cohort typescript
* remove unnecessary kafka topic
* remove brackets
* shift default
* raise exceptions when debug or test is true
* remove test flag
* move trends insight related components to different folder
* change get_earliest_timestamp
* remove extraneous condition
* fix test call
* put behind ff
* fix test x2
* fix tests
* restore exceptions hog
* fix tests
* restore exceptions hog
* fix test x20
Co-authored-by: Tim Glaser <tim@glsr.nl>
* 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
* Remove deprecated Team.opt_out_capture
* Remove obsolete and unused Team.users
* Make Team.organization, api_token and name stricter
* Add migration
* Add Team.api_token min length
* Adjust 0124_stricter_team for opt_out_capture removal
* Don't remove Team fields
* Update migration
* Update migration
* Set org ID of orgless teams to first org instead of deleting
* Update migration
* Fix
* Ensure that each project has a name before migration
* Rename prepare_teams
You can now drag the whole "row" not just by the handle
distance now needs to be set not to interact badly with dropdown menus -
by default it would eat all the clicks.
Fixes #3410
* Return no data if invalid regular expression
This currently returns a 500. Fixes 3191 together with frontend
validation.
* Add browser validation
* Typing errors
* Formulas
* Add frontend for formulas
* fix type issues
* fix tests
* fixxx
* fix typing
* Add better tests
* Add more tests and fix various options
* fix pie and ui updates
* fix types
* fix lifecycle and table issues
* Regression test for %B in urls
* Add spec for being able to reach session recording to sessions page
* Add basic Person page component test
* Fix viewing session recorings on person page
I broke this in a recent PR by narrowing the URLs down too much to fix
another bug (logics clashing).
* Persons tests pass again
* redirect to "repository" tab if no plugins installed
* fix lone "." for empty descriptions
* sort repository alphabetically
* add WIP test to make sure plugins are separated by organisation
* org id can be str
* try to reset membership
* Add permission_classes to PluginSerializer
* don't show tabs if only one tab can be used
* sort installed plugins alphabetically
* don't check for updates if can't actually update
* hide some more information if can't install
* remove 'global' from plugin config
* deprecate unused 'error' field
* fix plugin permission_classes mishap
* fix test, 400 -> 403
* simplify test
* Simplify isinstance check
Co-authored-by: Michael Matloka <dev@twixes.com>
* base API invite signup
* prevalidate invites
* allowed signed in users to claim an invite
* add more test cases
* remove legacy invite signup
* add trailing slash to endpoint
* post merge cleanup
* bring back signup_to_organization_view to be able to split the PR
* another cleanup
* bring back signup to organization template
* mask_email_address util
* fix typing
* fix tests
* fix analytics metadata
* OrganizationSocialSignupSerializer
* support social auth
* rename company_name to organization_name
* final tweaks
* add organization_name to prevalidate response
* 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 devdependency
* add scaffold
* person test
* fix type
* fix check
* inline fixture
Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
* Improve entity rows layout
* adjust UI
* handle case where mathSelector is not available
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Update Project Danger Zone to Plugins standard
* Extract PinnedDashboards to own component
* Set default body background to white
* Fix JSBookmarklet note style
* Add project rename
* Expect data-attr in okButtonProps type error
* Rename project name section to "DIsplay Name"
* Use disabled and loading on projet DisplayName
* Add models-side Team.name min length requirement
* Make small fixes on Plugins pages
* Revert "Add models-side Team.name min length requirement"
This reverts commit 97874ed7c2.
* minor copy adjustments
* Make button "Rename Project" and improve interactivity
* Remove teamLogic.connect
* Add project rename success toast
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* 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
* Improve project deletion
I noticed that we immediately reload after project gets deleted - before
the actual request completes and any data is deleted, making it seem it
did not work.
This fixes that, showing a toast while the request is outgoing.
* Fix margin from CreateProjectModal error
Co-authored-by: Michael Matloka <dev@twixes.com>