0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
Commit Graph

259 Commits

Author SHA1 Message Date
Rick Marron
685ab3685b
feat(onboarding): new preflight and updated signup screen (#9585)
* stlye sign up page

* add welcome hedgehog

* Preflight check

* move stuff to the logic

* style fix

* add some more checks

* update event service health check

* new preflight flow

* update tests

* reuse existing health checks

* rework preflight checks

* update icons

* update icons

* tweaks

* some typing

* add some tests

* add some more tests

* update cypress

* run prettier

* typescript fix

* validated -> running

* move to shadow-elevation

* clean up expand close button

* move divider to new style

* vertical divider

* move to BEM

* divider style

* move copy

* update copy

* update preflight states

* remove LemonRow changes

* update divider storybook

* fix tests
2022-05-05 08:14:39 -07:00
Alex Gyujin Kim
535b209498
refactor(cohort): cohort detail page revamp (kea forms and UI refresh) (#9434) 2022-04-22 01:01:44 -04:00
Alex Gyujin Kim
9d13dc2df3
refactor(cohort-filtering): replace cohort drawer with detail page (#9401) 2022-04-14 14:05:10 -04:00
Michael Matloka
cca71901a6
feat(insights): Warn before leaving insight with unsaved changes (#9091)
* Add confirmation prompt on full page navigation

* Add confirmation prompt on internal navigation

* Improve code

* Handle insight ID changes and auto-discard

* Address feedback

* Fix tests

* Update insightSceneLogic.tsx

* Update insightSceneLogic.tsx

* Remove `featureFlagLogic` from `insightSceneLogic`

* Fix `getCurrentTeamId`

* Restore `cleanFilters.ts` from `master`

* Only require discard confirmation in edit mode

* Refactor `beforeunload` hook into `useUnloadConfirmation`

* Remove duplicate import

* Use `insightChanged` instead of `filtersChanged`

* Fix edge cases

* Add Cypress test

* Update insights.js

* Try approach with `useEffect`

* Update insights.js

* Improve code clarity

* Remove flaky test
2022-04-07 17:56:43 +00:00
Michael Matloka
426d36e16b
refactor: LemonButtons in most places (#9246)
* refactor: `LemonButton`s in most places

* Update more

* Fix test instrumentation
2022-04-04 20:50:33 +02:00
Paul D'Ambra
4519ffb295
chore(cypress): remove component tests (#9323)
* remove tests that have been off for a year

* remove component tests that are covered by main cypress tests

* remove a bunch of component based test setup and upgrade cypress

* get tests running but not all passing on Cypress 9

* don't upgrade yet

* don't upgrade yet
2022-04-02 17:35:14 +01:00
Marius Andra
678b4d6df5
feat(insights): remove insight hotkey support and dead code (#9309) 2022-03-31 13:26:15 +00:00
Paul D'Ambra
2f587d1835
chore(property-filtering): removes the datetime property filter flag (#9252)
* chore(property-filtering): removes the datetime property filter flag

* fixes tests
2022-03-28 07:13:37 +00:00
Paolo D'Amico
125486140f
feat(sso): SSO enforcement (#9208) 2022-03-23 18:58:08 +01:00
Michael Matloka
7759947e4c
chore: Apply PERSISTED_FEATURE_FLAGS always, everywhere (#9200)
* refactor: Apply PERSISTED_FEATURE_FLAGS always, everywhere

* Don't use fetched feature flags in self-hosted

* Do use fetched feature flags in development

* Fix Jest tests

* Try to fix Events E2E tests
2022-03-23 15:59:48 +01:00
Marius Andra
126f9ce6fb
chore(property-filters): remove "stale-events" and "unseen-event-properties" flags (#9211)
* remove "stale-events" and "unseen-event-properties"

* click "show unseen properties" link manually

* "proper" fix
2022-03-23 14:30:22 +01:00
Michael Matloka
d065f7643c
fix(insights): Recognize metadata changes in edit mode (#9171)
* fix(insights): Recognize metadata changes in edit mode

* Improve edge cases

* Fix typing
2022-03-22 17:30:43 +00:00
Marius Andra
d5e5e96420
feat(insights): /new without saving an empty insight (#9143)
* feat(insights): /new without saving an empty insight

* run reportInsightCreated when clicking "new"

* remove "doNotPersist", refactor new flow

* save and continue editing

* urls.insightNew()

* fix types

* keep ?dashboard in url

* reset filters in new insight

* fix unintended combineUrl mock

* fix one test

* support old old url params, load results after start

* hackity hack

* not needed

* some comments

* try to avoid double query

* don't write TRENDS in default new urls

* better change detection

* small cleanup

* Hide "Save & continue editing" when there are no changes

* Add comment on fields to send to the API

* Update insights.js

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-03-22 10:25:10 +00:00
Michael Matloka
67f3f37614
feat(dashboards): "Add Insight" flow (#9045)
* Remove useless `addGraph` action from `savedInsightsLogic`

* Pass `from_dashboard` from `addGraph` to `insightSceneLogic`

* Fix flow so that the draft insight only appears on the dashboard after saving

* Fix newly-created insight not appearing on dashboard

* Address feedback

* Update `LemonSpacer` opacity

* Fix `LemonButton` edge cases

* "New" to "Add"

* Fix E2E tests

* Add new Cypress test
2022-03-21 21:55:16 +01:00
Marius Andra
715056ab69
refactor(frontend): several tiny refactors (#9126)
* thrown an explicit error if can't render react app (shown on the toolbar authorize scene)

* remove reverse logic connection

* upgrade kea, remove deprecated code

* don't permanently auto-connect this logic

* add few direct connections

* remove automatic mount

* fix few extra setState calls

* improve howto create stories

* refactor new dashboard form

* use new form component for flags

* new flag story

* refactor scene stories to use <App />

* add even more default mocks

* fix two bugs

* fix more test issues

* increase the quality of mocked data

* fix new dashboard redirect logic, simplify code even further

* fix test

* update docs
2022-03-21 13:45:10 +01:00
Michael Matloka
500d4623ba
refactor: Yeet PRIMARY_DB (#9017)
* refactor: Yeet `PRIMARY_DB`

* Remove `db_backend`

* Eliminate "Analytics database in use"

* Satisfy mypy
2022-03-21 13:15:50 +01:00
Rick Marron
8f1aca1ae8
chore: remove homepage ff (#9071)
* chore: remove homepage ff

* add skeleton to primary dash title
2022-03-17 17:06:57 +00:00
Marius Andra
20ebfd6b75
feat(storybook): cleanup volume 5 (#9078)
* fix toolbar multiple errors, rearrange mdx stories

* tweak some stories

* add "how to create stories" and "how to mock requests"

* move from __stories__ folders to just __mocks__

* how to build a form and how to use components

* how to build a scene

* fix unrenamed logic
2022-03-17 12:02:19 +01:00
Alex Gyujin Kim
eb59685b7f
refactor(d-m): rename events & actions to data management (#8996) 2022-03-14 18:31:59 +00:00
Marius Andra
55213f32a5
fix(insights): separate scene logic, remove filters from url (#8967)
* replace insightRouter with a redirect

* cmd click on a tab in insight edit mode clones insight

* create separate insight scene

* filters and urls do not sync (part 1)

* use the full scene

* use the right insightMode

* fix tests

* remove itemMode and syncWithUrl from insightLogic

* fix edit links

* fix insightLogic.test.ts

* insight numeric id

* better action to url

* refactor cachedResults and filters to cachedInsight, refactor ChartParams, deprecate color on graphs

* fix test

* avoid flicker in url

* fix insight id check

* fix super high steps

* move mock

* fix one test

* fix typo

* load correlations only when component is rendered

* also load property correlations only if table is shown

* skip two tests and trigger correlations loading from the view layer

* skip one more

* auth test

* get mounted insight in insightSceneLogic, move breadcrumbs to insight scene

* this is no longer technically correct

* fix insight copy name

* keep loading if 404 to pass cypress test

* one more cypress fix

* remove //

* don't load fake insight with id "new"

* fix funnel experiments

* Make layout transition from insight skeleton to scene more seamless

* Adjust `InsightSkeleton` a bit more

* remove dead code

* clarify filtersKnown

* simplify link

* move reliance on entityFilterLogic into async

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2022-03-11 15:06:23 +01:00
Li Yi Yu
db6ce773e3
feat(or filtering properties)!: FE implementation of new properties and backwards compatibility (#8797)
* wip

* trends tab to use property groups too

* add util methods for backwards compatibility

* add property groups to retention and paths

* leave events table alone

* fix typescript errors

* fix e2e tests

* fix type

* flatten property groups in places

* typing

* clean up ui

* recurse property groups, handle empty groups, and clean up

* prettier

* fix typing

* data attr

* make space on insights layout for new filters

* remove clone library and unmutate states

* remove redundant isPropertyGroup checks

* feature flag it again and style cleanup

* fix global filters title

* filter duplication and test account filters styling

* e2e tests and style clean up

* prettier

* funnel layout fix with filters

* fix logical operator dropdown default value bug
2022-03-09 17:20:21 -05:00
Michael Matloka
88764daea9
feat(toasts): Toasts overhaul (#8710)
* Upgrade `react-toastify` to latest version (from 5.5.0 to 8.2.0)

* Use team ID in `switched_team` instead of just a bool

* Update base toast style

* Adjust toast width

* Reduce toast `autoClose` to 6 seconds

* Update ALL the toasts

* Fix typing, improve wording

* Update `[data-attr=success-toast]` selectors

* Address feedback and update Cypress tests

* Remove useless snapshot test

* Fix leftover ` expect(toast)`

* "Fix" the problem with tests

* Update featureFlags.js

* Fix comment

* Update featureFlags.js

* Update featureFlags.js

* Remove `helpButtonLogic` import
2022-03-09 12:36:57 +01:00
Alex Gyujin Kim
031099ff09
Icons in taxonomic filter (#8934) 2022-03-09 07:52:39 +00:00
Paolo D'Amico
9496394952
Remove & clean onboarding-2822 (#8707) 2022-02-23 08:22:01 +01:00
Marius Andra
afeeceddfd
Expand taxonomic filter infinite lists, hide properties not seen on event (#8444)
* option to expand taxonomic filter infinite lists

* make the button blue, update copy

* remove duplicate

* test for is_event_property filter

* fix test

* refactor fetching

* test expandable infinite list

* fix clicking on "$time" in event prop cypress

* remove debug

* fix data-attr

* clean up shared attrs

* test with flag

* use "scoped endpoint" instead of "extended"

* don't click on skeleton

* describe scoped endpoint

* Revert "describe scoped endpoint"

This reverts commit 8450b66ef5.

* describe scoped endpoint

* remove comment

* type div props

* pluralize list

* cleaner variable names

* make sure there's something there

* pluralize some more

* don't tab if we can select something in the list
2022-02-21 08:11:47 +01:00
Michael Matloka
bfd6af772b
Always remove trailing slash via sceneLogic (#8693)
* Always remove trailing slash via `sceneLogic`

* Update Cypress suite

* Use `replace` instead of `slice`

* Ignore root path
2022-02-18 19:56:07 +01:00
Alex Gyujin Kim
d7a0c10e32
Part 2: Deprecate old tags and upgrade to new tags Backend (#8529) 2022-02-18 08:47:05 -08:00
Paolo D'Amico
15ce33e668
Instance status configuration (#8096)
Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-17 12:42:43 -07:00
Michael Matloka
ff43428650
Add some error states to InsightCard (#8524)
* Add some error states to `InsightCard`

* Clean up the empty states

* Fix `isDashboard` leftover props

* Improve wording

* Reword and center single step state

* Address feedback
2022-02-16 21:14:43 +00:00
Michael Matloka
1f74f4b0f7
Make dashboard redesign final (#8496)
* Remove flag `dashboard-redesign` and purge old code

* Update dashboard.js Cypress suite partially

* Reflect #8493 in moved DashboardHeader

* Make diff saner by not renaming `LemonDashboardHeader.tsx` yet

* Make editing dashboard grid react faster

* Remove redundant CSS

* Update dashboard.js Cypress suite completely

* Update insights.js

* Update EditableField.scss

* Use `Insight.last_modified_at` instead of `updated_at`

* Deprecate `Insight.updated_at`
2022-02-14 15:05:18 +01:00
Tim Glaser
6d13d58cd6
Revert "Adds reserved properties for filtering property definitions (second attempt) (#8349)" (#8485)
This reverts commit 3491b161ad.
2022-02-08 13:49:11 +00:00
Paul D'Ambra
3491b161ad
Adds reserved properties for filtering property definitions (second attempt) (#8349)
* Revert "Revert "Adds reserved properties for filtering property definitions (#8291)" (#8340)"

This reverts commit cb6839fe21.

* limit reserved properties to events table, include this in unit tests

* add api level tests for datetime and reserved word filtering of trends

* remove unused constant

* make the cypress test even looser

* delete file that is no longer in master

* extract a query object

* implement reserved attribute querying for date filters

* update datetime cypress test

* separate and clarify tests and ensure date queries only use reserved attributes on event filters

* delete file that isn't in master
2022-02-08 14:25:39 +01:00
Alex Gyujin Kim
c12179b5ba
Give actions descriptions (#8272)
* add description to action

* update tests

* no limit to description and use pageheader

* add ee_action

* add description as global relationship:

* fix tests

* revert to using descriptions

* revert to using descriptions

* allow description to be null

* fix tests

* persist mode

* fix e2e

* Address review points, clean up some margins

* Clean up the way editing state is determined

* Restore default description value and improve typing

* Fix typing better

* Update sql.ts

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-02 15:50:28 +01:00
Paul D'Ambra
5db28bbec2
Allows date equality checking in property filters (#8352)
* allow datepicker in date only mode

* allow exact date matching in property filters

* marks is_date_after as a date operator

* the date picker needs to work with null/undefined as well as string

* remove unused relative date parsing and fix date only is_date_exact property filters

* default to dates without times matching exactly

* make datetime filters by second work on date values that include milliseconds

* fix TS error

* correct insight url cypress test

* replace useMemo with useEffect

* be more specific in regex date match

* spacing under the quick choices

* when checking after a date for a date only filter check against that day at 23:59:59

* remove redundant text

* add test case and fix is_date_after query
2022-02-02 12:29:59 +01:00
Paul D'Ambra
5f7d3c566d
Deprecates property_type_format (#8292)
* remove property_type_format concept

* remove nulls from tests

* deprecate not remove (and see what tests fail)

* plugin server tests care about property_type_format

* fix tests
2022-02-01 14:08:55 +00:00
Michael Matloka
89f756b255
ShareModal redesign (#8346)
* Update switch style

* Update dashboard embed snippet wording

* Improve dashboard item dragging

* Rework `ShareModal` for new design

* Update E2E test

* Fix mispaste

* Update dashboard.js

* Update dashboard.js
2022-01-31 16:07:24 +01:00
Karl-Aksel Puulmann
cb6839fe21
Revert "Adds reserved properties for filtering property definitions (#8291)" (#8340)
This reverts commit a6ff568d11.
2022-01-28 15:51:54 +02:00
Paul D'Ambra
a6ff568d11
Adds reserved properties for filtering property definitions (#8291)
* wip

* wip

* wip

* can filter events by reserved words - distinct_id, created_at, and timestamp - in the backend

* add reserved properties when showing property definitions

* capitalise name of property

* properties not reserved words

* get cypress working and make search work with reserved properties

* update event/values endpoint to use property_string_expr and so work with reserved properties

* remove created at from reserved words

* test fix

* fix test

* loosen cypress assertion

* exclude specific properties from the taxonomic property filter

* remove FE property definition fangling

* exclude $time and $timestamp property definitions from the backend

* add reserved properties in the API not the FE using a CTE

* use SQL comments in SQL strings

* remove mypy error

* fix enterprise property definitions

* fix tests and improve comment

* exclude materialised column rows with no values when getting event property definitions

* fix cypress test setup

* clean up dead code

* un-remove some not actually dead code

* correct cypress assertion

* try and fix a cypress test
2022-01-28 12:19:17 +00:00
Paul D'Ambra
7f4a8a11e0
Make the time filtering of the events tables explicit (#8247)
* add a pinned time filter to events table without changing any behaviour

* resolve tsc errors

* add commented out test that appears to fail because of  vs timestamp

* more clarity from tests around API interactions and simplify event logic API after param

* add comment explaining why we assert on the API mock expectations

* move the last test that asserts on API into the commented describe block

* makes property pills grey

* skip test instead of commenting

* rename away from tunnel vision about one year ago

* Add a tooltip to the pinned filter on events table

* remove pinned filters in favour of page-level description

* remove more pinned filter code

* avoid the page header wrap around
2022-01-25 22:34:34 +00:00
Paul D'Ambra
7c3e6fb53b
Allow trends to do maths with page performance (#8255)
* allow trends to do maths with page performance

* try forcing a click in cypress test

* copy passing test from another branch

* copy passing test from another branch

* copy passing test from another branch
2022-01-25 16:25:20 +00:00
Michael Matloka
6df66208e3
UI enhancements (around dashboards) (#8227)
* Fix EditableField textarea width

* Make it clearer when a LemonButtonWithPopup is open

* Improve resizing dashboard items in mobile layout

* Add enter/exit animation to `Popup`

* Tune `ShareButton`

* Rotate `Popup` a bit less

* Improve style edge cases

* Use period instead of exclamation mark

* Update InsightsTable.tsx

* Align shadows with design

* Align modal shadow with design

* Update shadow opacity

* Use `perspective-origin: top`

* Rename `held` to `active`

* Update events.js
2022-01-25 11:29:03 +00:00
Michael Matloka
1bce7effaa
New DashboardHeader and better EditableField (#8146)
* Reimplement `EditableField` to be seamless

* Implement base of `LemonDashboardHeader`

* Get rid of `controlledMode`

* Make in-progress dashboard updates tentatively apply in local state

* Add `sharedDashboard` to `urls`

* Complete new `DashboardHeader`

* Iterate on `EditableField`

* Use simpler terms for editing layout

* Update dashboardPremium.js

* Fix saving tags

* Improve EditableField sizing

* Reposition Popup on size change

* Remove LemonButton-in-Popup magic

* Remove `updateDashboard` pre-saving

* Use muted color only for the placeholder

* Add payment gate to descriptions

* Update LemonDashboardHeader.tsx

* Update dashboard.js

* Revert "Update dashboard.js"

This reverts commit 50cf72d549.
2022-01-22 01:27:30 +01:00
Michael Matloka
b1f304754f
Redesigned person & group pages (#7988)
* Implement new person page layout

* Simplify default 404 page similar to person 404

* Set page headings to weight 600 instead of 700 to align with design

* Fix style of person loading state and page title

* Don't use deprecated `substr`

* Rework `LemonRow` compact mode

* Rework group page too

* Update group 404 message

* Fix `personsLogic`

* Add comment

* Fix type name conflict

* Update Person.cy-spec.js

* Update person.js

* Update Person.cy-spec.js

* Fix display of extra person IDs

* Update Person.cy-spec.js

* Improve property key/value sizing

* Update person.js

* Optimize personsLogic's urlToAction

* Put property deletion button in its own rightmost column

* Add `SessionRecordingsTable` empty state

* Use `IconDeleteForever` instead of `IconClose` for deletion

* Update person.js

* Fix sync of person and cohorts

* Fix "Should merge person"
2022-01-18 21:24:19 +01:00
Eric Duong
a71e899605
Yeetcode (#7830)
* remove django query tests

* remove funnel and caching check

* remove ee available var

* remove is_clickhouse_enabled

* remove abstract tests

* change primary db

* missing func

* unnecessary test

* try new e2e ci

* func arg

* remove param

* ci

* remove plugins in docker

* background

* change ur;

* add kafka url

* add step

* update docker

* primary docker file

* mount volumes correctly

* one more

* remove postgres tests

* remove foss

* remove all  is_clickhouse_neabled

* remove irrelelvant test

* remove extra arg

* remove var

* arg

* add foss comment

* add foss comment

* plugin server config

* Update posthog/utils.py

Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>

* migrate commands

* comment

* add clickhouse to pg tests

* change script

* change ordering

* deepsource

* restore foss tests

* test remove KAFKA_ENABLED from CI

* always wait

* up proper resources

* use one conftest

* restore

* remove unnecessary tests

* remove more pg

* log event tests

* fix more tests

* more tests

* type

* fix more tests

* last test

* typing

* account for shared class setup

* temp test cloud

* restore cloud master checkout

* adjust contexts

* backwards

Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2022-01-18 14:32:28 -05:00
Tim Glaser
da63a728c5
E2E don't login before each test (#8111)
* E2E don't login before each test

* fix
2022-01-18 16:16:44 +01:00
Michael Matloka
a217d4c18c
Revert "Collaboration Taxonomy - New FF + New Page (#7938)" (#8070) 2022-01-14 18:34:24 +01:00
Paolo D'Amico
644efe0667
Team member invite improvements (#7993)
* refactor entire invite logic

* use lemon table for invites

* update no email warnings

* additional redirection

* Simplify `.info-message`

* Use muted styling for all LemonTable empty states

* Use common `EmailUnavailableMessage`

* Refactor for a global <InviteModal/>

* Update invite deletion button for new style

* Bring columns in line with other LemonTables and add invitee name

* Hide invite modal when location changes

* Align details to existing Cypress test

* Update invitesMembers.js

* Add data-attrs

* Fix invite deletion Cypress

* Update wording

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-01-14 12:33:18 +01:00
Paul D'Ambra
1974cbb3d2
Remove hard-coded DateTime knowledge from Property Filter UI (#7892)
* wip

* display known unix timestamps as date strings in property filter select box

* show selected unix timestamp property as a datetime string in the property filter

* remove console.log

* update test to construct property definition correctly

* correct another test

* dates have different operators

* format property filter values for display in Select boxes and the PropertyValue component

* fix typescript error

* it _is_ a type, I don't need to say it is

* don't have before and after for unmatched types of operators

* separate the current applicable operators and the operator to display mapping, and add cypress tests for before and after operator visibility

* correct cypress test

* remove unused method

* remove dangling comment

* why does test fail in CI but not locally

* why does test fail in CI but not locally

* why does test fail in CI but not locally

* log values of operator options, why does this fail in CI but not locally

* why does test fail in CI but not locally

* intercept more decide calls to try and set feature flags from cypress test

* why does test fail in CI but not locally

* Remove cypress install

* add a readme for how to test feature flags so it isn't lost if there are no tests currently testing feature flags
2022-01-13 20:10:39 +00:00
Paolo D'Amico
d5c25c6522
Fix flaky breadcrumbs test (#8039) 2022-01-13 12:56:08 -06:00
Alex Gyujin Kim
7166ada694
Collaboration Taxonomy - New FF + New Page (#7938)
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2022-01-12 18:57:04 +00:00