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

275 Commits

Author SHA1 Message Date
Eric Duong
dcab55e3c3
refactor: Release cohort filters ff (#10422)
* refactor: release cohort filtering

* chort: empty

* sugar and unused components

* remove old cohort grouop tests

* add component data-attr

Co-authored-by: Alex Kim <alexgkim205@gmail.com>
2022-06-23 13:02:01 -07:00
Rick Marron
8a23be18dc
feat(session-analysis): Enable filtering by session length (#10356)
* it works

* add to group filters

* add feature flag

* add support for insight panels

* add backend tests

* add frontend tests

* Update snapshots

* type fixes

* fix cypress

* paramaterize team_id

* clean up FF

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 08:05:45 -07:00
Eric Duong
9430c258d3
fix: Change placeholder color to muted and make popup appear directly (#10394)
* fix: change color to muted and make popup appear directly

* fix: add active state when popup open

* fix: border width

* change title back

* adjust test
2022-06-22 19:50:33 -04:00
Paul D'Ambra
41dba04443
feat: toolbar side bar launching v2 (#10377)
* unique attribute on toolbar side action button

* remove sneaky it.only

* clicking add new URL moves to toolbar page and focusses the new url input

* refactor tests
2022-06-21 09:10:29 +02:00
Paul D'Ambra
023deb7693
feat: add toolbar launching from the side bar (#10354)
* feat: add toolbar launching from the side bar

* always have an add url button

* fix idiocy

* fix cypress tests

* fix cypress tests, ugh

* fix cypress tests, ugh

* add a toolbar launch button cypress test
2022-06-20 11:04:29 +02:00
Emanuele Capparelli
c57949a035
fix: person-events-table (#10342)
* fix: person-events-table

* add cypress test
2022-06-17 13:43:57 +02:00
Emanuele Capparelli
102e375878
feat: save default live events columns (#10293)
* feat: save default live events columns

* added column config logic test

* ran prettier

* Update snapshots

* fix api.mock.ts

* fixes after review

* fix test

* Update snapshots

* fixes after review

* fixes after review

* add migration

* fix black formatting

* fix cypress test

* remove items from lists after selection

* disable text selection in infinite lists

* fix bug

* fix nit

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-16 17:19:31 +02:00
Paul D'Ambra
d613f4bd06
chore: upgrade cypress to v10x (#9650)
* update cypress

* really click something that's actually there

* obey cypress and use done

* run cypress 9 in CI

* no need for before each when only one test

* no need to set window size to the default

* get tests passing file by file

* delay checking for a graph in a test

* be more specific cypress

* use cy command

* select text like a human

* silly cypress

* try and avoid cypress deciding that a visible field is not valid

* select delete button correctly

* find save button differently

* try and avoid not always typing the first character

* better trends selections

* use cy command to navigate

* conitnue trying to get tests to pass in CI

* another try at setting feature flag names in CI

* can CI find undo button without a wait?

* better assertion for cypress

* up to v10

* fix splitting specs with v10 path

* show cypress how to wait for the test to finish

* remove redundant file

* change return to satisfy new cypress

* move import
2022-06-09 11:14:21 +01:00
Paul D'Ambra
5fc251c006
feat: improve Insight Activity logs (#9892)
* same style error messages

* make tagged_item __str__ work

* first pass activity logging with tags

* update field exclusions for feature flag and person

* pluralize "Tag" correctly

* with working code

* prefetch tags so they are available for change detection when they're being deleted

* add a skipped test

* with some tests

* fix pluralization

* adding tests

* test drive insight descriptions - all but permissions

* insights don't log permissions or retention summary

* use dashboards model to load nmaes for insight descriptions

* Revert "use dashboards model to load nmaes for insight descriptions"

This reverts commit 3ac08ff4b0.

* allow activity log more control over how related items appear

* fix paging

* fxes tests

* no need to spread knowledge out to the models

* no need to check if a list is a list

* split cypress tests

* split cypress tests
2022-06-07 11:33:08 +01:00
Ben White
9f94b19c1d
fix: Allow search params to change on Insight editor (#10027)
* fix: Allow search params to change on Insight editor

* Try to add E2E test

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-05-27 15:10:05 +01:00
Ben White
57874f9db2
feat(exports): Dashboard / Insight exporting (#9830)
* Adds chromium / selenium for image exporting
* Added uploading of downloads folder to artefacts
* Adds ExportButton to generate desired asset
2022-05-27 14:31:17 +02:00
Neil Kakkar
d5e473bc17
chore: enable universal search for everyone (#9984)
* chore: enable universal search for everyone

* no search box button for command palette

* click save
2022-05-25 14:39:14 +00:00
Paul D'Ambra
29bd14385b
fix: remove only from cypress test (#9982)
* fix: remove only from cypress test

* don't care if it browser in first row
2022-05-25 13:09:52 +01:00
Paul D'Ambra
d482bb7dec
chore: enable multi dashboard insight flag for self host (#9968)
* chore: enable multi dashboard insight flag for self host

* oh cypress

* like this cypress?

* just click the first regardless of text
2022-05-25 11:31:58 +01:00
Eric Duong
0138a23047
chore: remove and-or-filtering flag (#9970)
* chore: remove flag

* chore: empty

* chore: one more flag

* update cypress tests

* fix name
2022-05-24 22:56:38 -04:00
Paul D'Ambra
b31dcbde7f
feat: many to many insights and dashboards 💖 turbo mode (#9604)
* add a m2m aware insight move behind feature flag

* update insight's dashboard list when we know it has changed

* slightly better failing test

* fix the mock

* first pass at caching different dashboard contexts separately

* Remove unnecessary

* add cypress test for multi dashboard addition

* don't register feature flag for all tests

* correct mock structure

* Update frontend/src/models/insightsModel.tsx

Co-authored-by: Marius Andra <marius.andra@gmail.com>

* simplify move to dashboard signature

* don't filter items in the items reducer

* update entire insight whenever the updateDashboardItem action is called

* fix trends cypress tests

* remove unused import

* remove unnecessary todo

* not passing a dashboard means don't filter by dashboard

* no need to send null anymore

* only let dashboard update an insight if it is in dashboard context

* skip the cypress test

* don't fight cypress, for now

* slightly better

* don't load any old version of an insight if it happens to be pressent on another dashboard

* read dashboard id from props when looking up matching insights

* try looking up insight in dashboardModel as well

* change to insight scene logic has no effect

* fix test setup

* slightly better namne

* expand the tests

* refactor tests

* try and trick cypress into passing in CI the same way it passes locally

* move info out of my brain and into the code

* try and trick cypress into passing in CI the same way it passes locally

* rename method and file

* one fewer thing to think about

* rename refactor

* complete file rename

* resolve naming nit

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2022-05-17 13:24:31 +01:00
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