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

214 Commits

Author SHA1 Message Date
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
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
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
Paolo D'Amico
374d70cc14
Remove sessions insight frontend (#7912) 2022-01-06 18:53:20 -06:00
Michael Matloka
365d7b27fc
PostHog demo environment (#7824)
* Remove "Self-Hosted" from logo

* Add new env var-based setting `DEMO`

* Enable recordings in demo project by default

* Merge login and signup into "demo signin" when `DEMO` on

* Show `DEMO` announcement

* Update realm with option `demo`

* Update test_preflight.py

* Improve `realm` typing

* Update E2E test

* Address feedback

* Satisfy mypy
2022-01-03 19:40:52 +01:00
Tim Glaser
2adc6258d2
Run e2e with clickhouse (#7705)
* Run e2e with clickhouse

* Set kafka to /etc/hosts, and speed up waiting

* fix persons page

* Migrate clickhouse

* Update e2e-test-runner

* Fixes/improvements

* fingers x'ed

* fix

* revert url

* fix demo data

* fix test

* Run Redis in docker

* fix test

* fix redis

* trap

* fix e2e-test-runner

* try localhost instead of kafka

* Revert "try localhost instead of kafka"

This reverts commit 58869c96df.
2022-01-03 14:26:54 +00:00
Marius Andra
c156b0be5d
Replace old insight table with lemon table (#7817)
* replace old insight table with lemon table

* fix count

* Improve table UI further

* Fix sorting interfering with summary type dropdown

* Use a more appropriate loading state

* Update Cypress test

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-12-21 23:19:23 +01:00
Marius Andra
d6fc597f97
Throw when trying to save insight with empty filters (#7802)
* do not save insight if filters empty

* fix another test

* add second update guard

* fix errors

* fix test

* fix timezone-dependent test

* fix test

* fix save to dashboard test

* fix the fix
2021-12-21 16:54:42 +01:00
Michael Matloka
ebb75bd2fa
Unify "Hogflix" casing (#7700) 2021-12-14 15:34:01 +01:00
Michael Matloka
dcb1e31212
Always allow editing insight name (#7633)
* Always allow editing insight name

* Update dashboardLogic.tsx

* Add E2E test

* Run prettier

* Remove unused vars

* Fix infinite `loadDashboardItems` loop

* Fix insight<>dashboard state sync (#7635)

* Update dashboardLogic.tsx

* Add Cypress test

* Run prettier

* Rename "Add graph" to more accurate "New insight"

* Fix `AnnotationScope`
2021-12-10 17:15:37 +01:00
Harry Waye
79d02059b9
ci(e2e): improve debug logging for github action workflow (#7629)
* github action artifact cypress videos

* artifact logs

* Fix cypress video export

* Redirect all output

* wait for initial retention load

* specify retry in ci

* use bin/start instead of bin/docker-*

* capture django app output in gunicorn log

* use docker-worker and docker-server again

* Remove gunicorn capture output settings
2021-12-10 12:38:25 +00:00
Alex Gyujin Kim
5f80e24a34
Make compare previous better + new legend (#7510)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-12-09 05:54:32 +00:00
Michael Matloka
cc7d3ed3fc
Fix breadcrumbs and add some Cypress tests (#7533)
* Fix breadcrumbs and add some Cypress tests

* Update licenses.js
2021-12-07 10:58:28 +01:00
Paul D'Ambra
c26cda87ea
fixes for new short insight urls (#7460)
* fixes for new short insight urls

* add a test and a longer timeout to try and deflake a test

* Update frontend/src/lib/components/IntervalFilter/intervalFilterLogic.ts

Co-authored-by: Michael Matloka <dev@twixes.com>

* Update frontend/src/scenes/insights/InsightDateFilter/insightDateFilterLogic.ts

Co-authored-by: Michael Matloka <dev@twixes.com>

* use urls helper to generate test urls

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-12-01 14:56:36 +00:00
Michael Matloka
b1ae47b071
Refresh Actions page (#7397)
* Refresh Actions page

* fix feature flag test

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-11-30 09:38:05 +00:00
Michael Matloka
2e49f4ebde
Refresh cohorts list (#7381)
* Refresh cohorts list

* Tune page sizes

* Update cohorts.js

* Restore recordings link
2021-11-26 15:29:30 +01:00
Michael Matloka
6fffbaad16
Update properties table (#7377)
* Update properties table

* Fix E2E test
2021-11-26 13:00:37 +01:00
Paolo D'Amico
f27bc8c12b
Product cue to funnels (#7301) 2021-11-25 11:32:46 -08:00
Marius Andra
fbba78718c
Insight URL cleanup (#7201)
* insight route refactor, part 1

* add fromItem to get redirects

* fix some tests

* adjust many more paths

* fix test

* move new insight creation into insight logic

* fix a noisy test

* simplify one test

* open the url with the right filters

* null fix

* fix some more noisy tests

* move saved insights to `/insights`, fix logic tests

* fix cypress urls

* fix some tests

* fix even more insight urls

* wait a bit longer

* add old saved_insights redirect

* this might not be there yet

* rename newInsight -> insightNew

* rename Scene.Insights -> Scene.Insight

* also redirect old searches without fromItem

* fix link

* fix TS merge bugs

* fix import

* fix imports

* fix tests

* fix test

* Run prettier

* fix changes after merge

* switch to a simpler scene

* fix another test

* fix "save as" reset

* rerun tests

* Insight Short URLs (#7259)

* convert a bunch of things to user short_id instead of id

* fix more TS errors

* fix test

* fix jest tests

* various fixes

* add wise words

* type InsightShortId-s to make life easier

* reduce a bit of test noise

* use the InsightShortId in the URL

* fix type

* fix test

* fix insight url preloading

* pass dive dashboards as having insight short ids

* fix short url redirect

* mock scenelogic api

* better types and tests

* type fixes

* fix bug of linking to ourselves

* add back "id"

* get rid of some "getInsightId" calls

* two more

* few more

* refactor last usage of getInsightId

* move files around and improve errors

* make it simpler

* small fixes

* redirect to new url from old hashParam=42

* fix regression

* alert the user if we could not find an insight with the old ID format

* switch to a simpler scene

* fix another test

* Fix annotation creation

* Make short ID friendlier

* remove comments

* simplify insight links from dashboards and saved insights

* remove insight router

* fix TS

* Revert "remove insight router"

This reverts commit e52f474949.

Co-authored-by: Michael Matloka <dev@twixes.com>

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-11-25 15:39:49 +01:00
Karl-Aksel Puulmann
2d919d6120
Groups/Feature flags: Allow choosing to aggregate by groups in UI (#7322)
* Update breadcrumb text

According to https://www.figma.com/file/gQBj9YnNgD8YW4nBwCVLZf/PostHog-App?node-id=5346%3A28614

* Extract code snippets to their own files

* Start refactoring/rewording feature flags pages

* Play with spacing

* Tags, add new and margins

* Delete match group button + margin on save button

* Update UTM_TAGS import

* Add duplicate option

* Update spacing

* update some actions naming

* Show group type(s) selection when groups enabled

* Remove the slider

* Add a new color

* Add grey badges to feature flags page

* Grey badges on FF page

* Toggle taxonomic groups based on dropdown selection

* Reset filters when group type changes

* Update wording

* Handle key change

* More consistent update when Match By changes
2021-11-25 16:29:04 +02:00
Tim Glaser
e10ea61d63
Use normal filters person (#7325)
* Use normal filters for person

* Clean up is_identified

* fix jest stuff

* fix tests and nits

* types etc

* e2e test
2021-11-24 18:21:56 +01:00
Marius Andra
e5db2145a7
Activate turbo mode (#7254)
* activate turbo mode

* fix test

* remove comment

* reduce noise in tests

* fix missing var
2021-11-23 17:22:05 +01:00
Tim Glaser
950fc3bee8
Add save as button (#7174)
* Add save as button

* Dont use lemon button

* Commit file

* Fix eslint

* Fix issues

* fix

* fix typing

* fix tests

* Remove save and continue editing

* fix test

* Revert "Remove save and continue editing"

This reverts commit 5296f75b49.

* Revert "fix test"

This reverts commit 69b8cd9ae8.

* Copy changes

* Push instead of replace

* remove save new
2021-11-23 10:56:48 +01:00
Michael Matloka
12329333dc
Dashboards polishes (#7266)
* Fix Cypress test

* Improve pin alignment
2021-11-22 16:03:46 +00:00
Michael Matloka
2f1a6af0ef
Fresh table pilot (#7103)
* Add `LemonTable` base to Feature flags page

* Fix basic styling

* Rework more of the table

* Fix column `align`

* Update eventsListLogic.ts

* Align FF table columns with design

* Add pagination

* Add table loader

* Add `LemonTable` to Storybook

* Add sorting

* Increase feature flags page size to 50

* Add scroll indication

* Fix minor issues

* Fix typing

* Update E2E test

* Sort one column at a time

* Add default sorting

* Improve current page handling

* Use search params for current page state

* Don't mute disabled feature flags

* Add overlay for loading state

* Add profile picture to Created by and improve comments

* Fix `createdByColumn`

* Refactor the More button for reusability

* Fix content sizing (pagination/loader filling full width when scrolled)

* Remove need for `@ts-expect-error`
2021-11-19 17:50:43 +01:00
Marius Andra
9b14556ae4 this seems to take time 2021-11-18 23:36:01 +01:00