diff --git a/cypress/e2e/a11y.cy.ts b/cypress/e2e/a11y.cy.ts index 3ee87daf2a107..87b87d1e6bb0e 100644 --- a/cypress/e2e/a11y.cy.ts +++ b/cypress/e2e/a11y.cy.ts @@ -16,9 +16,7 @@ describe('a11y', () => { 'experiments', 'events', 'datamanagement', - 'persons', - 'cohorts', - 'annotations', + 'personsmanagement', 'apps', 'toolbarlaunch', 'projectsettings', diff --git a/cypress/e2e/annotations.cy.ts b/cypress/e2e/annotations.cy.ts index 5300b376a6559..90db053326770 100644 --- a/cypress/e2e/annotations.cy.ts +++ b/cypress/e2e/annotations.cy.ts @@ -1,10 +1,10 @@ describe('Annotations', () => { beforeEach(() => { - cy.clickNavMenu('annotations') + cy.clickNavMenu('datamanagement') + cy.get('[data-attr=data-management-annotations-tab]').click() }) it('Annotations loaded', () => { - cy.get('h1').should('contain', 'Annotations') cy.get('h2').should('contain', 'Create your first annotation') cy.get('[data-attr="product-introduction-docs-link"]').should('contain', 'Learn more about Annotations') }) diff --git a/cypress/e2e/cohorts.cy.ts b/cypress/e2e/cohorts.cy.ts index 267b579e79021..1c7e3be39865d 100644 --- a/cypress/e2e/cohorts.cy.ts +++ b/cypress/e2e/cohorts.cy.ts @@ -1,17 +1,22 @@ describe('Cohorts', () => { + const goToCohorts = (): void => { + cy.clickNavMenu('personsmanagement') + cy.get('[data-attr=persons-management-cohorts-tab]').click() + } + beforeEach(() => { - cy.clickNavMenu('cohorts') + goToCohorts() }) it('Cohorts new and list', () => { // load an empty page - cy.get('h1').should('contain', 'Cohorts') - cy.title().should('equal', 'Cohorts • PostHog') + cy.get('h1').should('contain', 'People') + cy.title().should('equal', 'Cohorts • People • PostHog') cy.get('h2').should('contain', 'Create your first cohort') cy.get('[data-attr="product-introduction-docs-link"]').should('contain', 'Learn more about Cohorts') // go to create a new cohort - cy.get('[data-attr="create-cohort"]').click() + cy.get('[data-attr="new-cohort"]').click() // select "add filter" and "property" cy.get('[data-attr="cohort-selector-field-value"]').click() @@ -34,7 +39,7 @@ describe('Cohorts', () => { cy.get('[data-attr=success-toast]').contains('Cohort saved').should('exist') // back to cohorts - cy.clickNavMenu('cohorts') + goToCohorts() cy.get('tbody').contains('Test Cohort') cy.get('h2').should('not.have.text', 'Create your first cohort') @@ -69,7 +74,7 @@ describe('Cohorts', () => { // delete cohort cy.get('[data-attr="more-button"]').click() cy.get('.Popover__content').contains('Delete cohort').click() - cy.clickNavMenu('cohorts') + goToCohorts() cy.get('tbody').should('not.have.text', 'Test Cohort (dynamic copy) (static copy)') }) }) diff --git a/cypress/e2e/insights-unsaved-confirmation.cy.ts b/cypress/e2e/insights-unsaved-confirmation.cy.ts index 6257fc264e20f..9d64c3d93df41 100644 --- a/cypress/e2e/insights-unsaved-confirmation.cy.ts +++ b/cypress/e2e/insights-unsaved-confirmation.cy.ts @@ -38,11 +38,9 @@ describe('Insights', () => { const insightName = randomString('to save and then navigate away from') insight.create(insightName) - cy.get('[data-attr="menu-item-annotations"]').click() + cy.get('[data-attr="menu-item-dashboards"]').click() - // the annotations API call is made before the annotations page loads, so we can't wait for it - cy.get('[data-attr="annotations-content"]').should('exist') - cy.url().should('include', '/annotations') + cy.url().should('include', '/dashboard') }) it('Can keep editing changed new insight after navigating away with confirm() rejection (case 1)', () => { diff --git a/cypress/e2e/person.cy.ts b/cypress/e2e/person.cy.ts index a4af1f83e9f40..5a5b1d2856e32 100644 --- a/cypress/e2e/person.cy.ts +++ b/cypress/e2e/person.cy.ts @@ -1,8 +1,8 @@ describe('Person Visualization Check', () => { beforeEach(() => { - cy.clickNavMenu('persons') + cy.clickNavMenu('personsmanagement') cy.location('pathname').should('eq', '/persons') - cy.get('.ant-spin-spinning').should('not.exist') // Wait until initial table load to be able to use the search + cy.wait(1000) cy.get('[data-attr=persons-search]').type('deb').should('have.value', 'deb') cy.contains('deborah.fernandez@gmail.com').should('not.exist') cy.contains('deborah.fernandez@gmail.com').click() diff --git a/cypress/e2e/persons.cy.ts b/cypress/e2e/persons.cy.ts index 79765fcf8c875..1492c6077465a 100644 --- a/cypress/e2e/persons.cy.ts +++ b/cypress/e2e/persons.cy.ts @@ -1,10 +1,10 @@ describe('Persons', () => { beforeEach(() => { - cy.clickNavMenu('persons') + cy.clickNavMenu('personsmanagement') }) it('All tabs work', () => { - cy.get('h1').should('contain', 'Persons') + cy.get('h1').should('contain', 'People') cy.get('[data-attr=persons-search]').type('marisol').type('{enter}').should('have.value', 'marisol') cy.wait(200) cy.get('[data-row-key]').its('length').should('be.gte', 0) diff --git a/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png b/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png index 29f658fac2fb8..b49b6fc4bd341 100644 Binary files a/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png and b/frontend/__snapshots__/layout-navigation--app-page-with-side-bar-shown.png differ diff --git a/frontend/__snapshots__/posthog-3000-navigation--dark-mode.png b/frontend/__snapshots__/posthog-3000-navigation--dark-mode.png index 80acd540123ce..11b06e1c7556d 100644 Binary files a/frontend/__snapshots__/posthog-3000-navigation--dark-mode.png and b/frontend/__snapshots__/posthog-3000-navigation--dark-mode.png differ diff --git a/frontend/__snapshots__/posthog-3000-navigation--light-mode.png b/frontend/__snapshots__/posthog-3000-navigation--light-mode.png index dfa4e5819c3c2..678543a30f547 100644 Binary files a/frontend/__snapshots__/posthog-3000-navigation--light-mode.png and b/frontend/__snapshots__/posthog-3000-navigation--light-mode.png differ diff --git a/frontend/__snapshots__/posthog-3000-navigation--navigation-3000.png b/frontend/__snapshots__/posthog-3000-navigation--navigation-3000.png index 4164e2d6ec68f..b6f723c5ac043 100644 Binary files a/frontend/__snapshots__/posthog-3000-navigation--navigation-3000.png and b/frontend/__snapshots__/posthog-3000-navigation--navigation-3000.png differ diff --git a/frontend/__snapshots__/posthog-3000-navigation--navigation-base.png b/frontend/__snapshots__/posthog-3000-navigation--navigation-base.png index b2697e16b93fa..91d15be692849 100644 Binary files a/frontend/__snapshots__/posthog-3000-navigation--navigation-base.png and b/frontend/__snapshots__/posthog-3000-navigation--navigation-base.png differ diff --git a/frontend/__snapshots__/scenes-app-annotations--annotations.png b/frontend/__snapshots__/scenes-app-annotations--annotations.png index b04aef3ec2f31..1d0a33cc15c08 100644 Binary files a/frontend/__snapshots__/scenes-app-annotations--annotations.png and b/frontend/__snapshots__/scenes-app-annotations--annotations.png differ diff --git a/frontend/__snapshots__/scenes-app-apps--installed.png b/frontend/__snapshots__/scenes-app-apps--installed.png index 34ae3b5167bb3..ca7fff9f98e95 100644 Binary files a/frontend/__snapshots__/scenes-app-apps--installed.png and b/frontend/__snapshots__/scenes-app-apps--installed.png differ diff --git a/frontend/__snapshots__/scenes-app-batchexports--create-export.png b/frontend/__snapshots__/scenes-app-batchexports--create-export.png index aaa0d622855be..5812443d7cc01 100644 Binary files a/frontend/__snapshots__/scenes-app-batchexports--create-export.png and b/frontend/__snapshots__/scenes-app-batchexports--create-export.png differ diff --git a/frontend/__snapshots__/scenes-app-batchexports--exports.png b/frontend/__snapshots__/scenes-app-batchexports--exports.png index 105535afdb5cc..673b04e0d721e 100644 Binary files a/frontend/__snapshots__/scenes-app-batchexports--exports.png and b/frontend/__snapshots__/scenes-app-batchexports--exports.png differ diff --git a/frontend/__snapshots__/scenes-app-batchexports--view-export.png b/frontend/__snapshots__/scenes-app-batchexports--view-export.png index d46d231d06a04..f6551bc248623 100644 Binary files a/frontend/__snapshots__/scenes-app-batchexports--view-export.png and b/frontend/__snapshots__/scenes-app-batchexports--view-export.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--list.png b/frontend/__snapshots__/scenes-app-dashboards--list.png index f7ed888ae6bf3..527d891a4f182 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--list.png and b/frontend/__snapshots__/scenes-app-dashboards--list.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--new-select-variables.png b/frontend/__snapshots__/scenes-app-dashboards--new-select-variables.png index 4e53d35d1dffa..c4d3fc8fb4f30 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--new-select-variables.png and b/frontend/__snapshots__/scenes-app-dashboards--new-select-variables.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--new.png b/frontend/__snapshots__/scenes-app-dashboards--new.png index 66b685f868517..58ca8d61687d2 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--new.png and b/frontend/__snapshots__/scenes-app-dashboards--new.png differ diff --git a/frontend/__snapshots__/scenes-app-data-management--database.png b/frontend/__snapshots__/scenes-app-data-management--database.png index ff22ffdb8d467..deb2115180341 100644 Binary files a/frontend/__snapshots__/scenes-app-data-management--database.png and b/frontend/__snapshots__/scenes-app-data-management--database.png differ diff --git a/frontend/__snapshots__/scenes-app-data-management--ingestion-warnings.png b/frontend/__snapshots__/scenes-app-data-management--ingestion-warnings.png index 52b29a9abf121..03287eac29f23 100644 Binary files a/frontend/__snapshots__/scenes-app-data-management--ingestion-warnings.png and b/frontend/__snapshots__/scenes-app-data-management--ingestion-warnings.png differ diff --git a/frontend/__snapshots__/scenes-app-events--event-explorer.png b/frontend/__snapshots__/scenes-app-events--event-explorer.png index a41b3e31d7ca8..4ed82b3bdbbdd 100644 Binary files a/frontend/__snapshots__/scenes-app-events--event-explorer.png and b/frontend/__snapshots__/scenes-app-events--event-explorer.png differ diff --git a/frontend/__snapshots__/scenes-app-experiments--experiment-not-found.png b/frontend/__snapshots__/scenes-app-experiments--experiment-not-found.png index 3332b4e9b583f..422655b2bf360 100644 Binary files a/frontend/__snapshots__/scenes-app-experiments--experiment-not-found.png and b/frontend/__snapshots__/scenes-app-experiments--experiment-not-found.png differ diff --git a/frontend/__snapshots__/scenes-app-experiments--experiments-list-pay-gate.png b/frontend/__snapshots__/scenes-app-experiments--experiments-list-pay-gate.png index 36ad5c81084e2..fd9d704276d4c 100644 Binary files a/frontend/__snapshots__/scenes-app-experiments--experiments-list-pay-gate.png and b/frontend/__snapshots__/scenes-app-experiments--experiments-list-pay-gate.png differ diff --git a/frontend/__snapshots__/scenes-app-experiments--experiments-list.png b/frontend/__snapshots__/scenes-app-experiments--experiments-list.png index 35578f8df9b47..9261742d1d8e2 100644 Binary files a/frontend/__snapshots__/scenes-app-experiments--experiments-list.png and b/frontend/__snapshots__/scenes-app-experiments--experiments-list.png differ diff --git a/frontend/__snapshots__/scenes-app-experiments--view-experiment-pay-gate.png b/frontend/__snapshots__/scenes-app-experiments--view-experiment-pay-gate.png index dbfa94be817be..e4572b8da8409 100644 Binary files a/frontend/__snapshots__/scenes-app-experiments--view-experiment-pay-gate.png and b/frontend/__snapshots__/scenes-app-experiments--view-experiment-pay-gate.png differ diff --git a/frontend/__snapshots__/scenes-app-feature-flags--feature-flag-not-found.png b/frontend/__snapshots__/scenes-app-feature-flags--feature-flag-not-found.png index 3848b31fa78a8..143d99730cbf9 100644 Binary files a/frontend/__snapshots__/scenes-app-feature-flags--feature-flag-not-found.png and b/frontend/__snapshots__/scenes-app-feature-flags--feature-flag-not-found.png differ diff --git a/frontend/__snapshots__/scenes-app-feature-flags--feature-flags-list.png b/frontend/__snapshots__/scenes-app-feature-flags--feature-flags-list.png index 6231ed9ab28e7..eaaba388c9c59 100644 Binary files a/frontend/__snapshots__/scenes-app-feature-flags--feature-flags-list.png and b/frontend/__snapshots__/scenes-app-feature-flags--feature-flags-list.png differ diff --git a/frontend/__snapshots__/scenes-app-features--features-list.png b/frontend/__snapshots__/scenes-app-features--features-list.png index b18cd979d9480..0cfa6720e1859 100644 Binary files a/frontend/__snapshots__/scenes-app-features--features-list.png and b/frontend/__snapshots__/scenes-app-features--features-list.png differ diff --git a/frontend/__snapshots__/scenes-app-features--new-feature-flag.png b/frontend/__snapshots__/scenes-app-features--new-feature-flag.png index 1e8c4ac19a5b5..9ad9250549df8 100644 Binary files a/frontend/__snapshots__/scenes-app-features--new-feature-flag.png and b/frontend/__snapshots__/scenes-app-features--new-feature-flag.png differ diff --git a/frontend/__snapshots__/scenes-app-features--not-found-early-access.png b/frontend/__snapshots__/scenes-app-features--not-found-early-access.png index 9cb4f72d11d6e..b25a28b0fd025 100644 Binary files a/frontend/__snapshots__/scenes-app-features--not-found-early-access.png and b/frontend/__snapshots__/scenes-app-features--not-found-early-access.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends--webkit.png index 60774c6d19344..5d9b07803bd26 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends.png b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends.png index e7ae0a9602d9c..53cb826a62a1c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends.png and b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert--webkit.png index ad0d74d3d35ac..7d3fa0e935dfc 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert.png b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert.png index d3c5a1c7e9457..3e3b254a5e43a 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert.png and b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png b/frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png index e73a067a7514f..be116ff8b3ba0 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png and b/frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--lifecycle.png b/frontend/__snapshots__/scenes-app-insights--lifecycle.png index 738d5ec8994c5..8fda2317ec4d0 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--lifecycle.png and b/frontend/__snapshots__/scenes-app-insights--lifecycle.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png b/frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png index 8c33b18f5d894..bcf04c038e70b 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png and b/frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--stickiness.png b/frontend/__snapshots__/scenes-app-insights--stickiness.png index 8a6be5ba22fdc..de3afbf8cc7af 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--stickiness.png and b/frontend/__snapshots__/scenes-app-insights--stickiness.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-number--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-number--webkit.png index b118e92405c22..17a8821fb39ed 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-number--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-number--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-number.png b/frontend/__snapshots__/scenes-app-insights--trends-number.png index 932161c2835e5..48d95207dd24d 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-number.png and b/frontend/__snapshots__/scenes-app-insights--trends-number.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-table--webkit.png index 0cd8bfe68f2d7..2ba75da1d8204 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-table--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown--webkit.png index 45b723002a54e..063e78dd5feaf 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown.png b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown.png index fb9e049372866..a3a2a9a805370 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-table-edit--webkit.png index e0ad1fcf31097..fb0e1de7e7310 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-table-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-table-edit.png index b7e8cedbda6c6..4ca89e34bfd22 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-table-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table.png b/frontend/__snapshots__/scenes-app-insights--trends-table.png index 53b2b12ca2cf5..e36f384700aee 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table.png and b/frontend/__snapshots__/scenes-app-insights--trends-table.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--bullet-list.png b/frontend/__snapshots__/scenes-app-notebooks--bullet-list.png index 295d07af47a71..d196998a7e56f 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--bullet-list.png and b/frontend/__snapshots__/scenes-app-notebooks--bullet-list.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--empty-notebook.png b/frontend/__snapshots__/scenes-app-notebooks--empty-notebook.png index 4ffe557aaf74a..2086ed0aa90aa 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--empty-notebook.png and b/frontend/__snapshots__/scenes-app-notebooks--empty-notebook.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--headings.png b/frontend/__snapshots__/scenes-app-notebooks--headings.png index 0554493976818..3186fed28fd49 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--headings.png and b/frontend/__snapshots__/scenes-app-notebooks--headings.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--notebook-not-found.png b/frontend/__snapshots__/scenes-app-notebooks--notebook-not-found.png index dc8cdf401a6f4..0df1f64e9ec3c 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--notebook-not-found.png and b/frontend/__snapshots__/scenes-app-notebooks--notebook-not-found.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--notebooks-list.png b/frontend/__snapshots__/scenes-app-notebooks--notebooks-list.png index a2a7a11db4cc9..c9f29c566c2c6 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--notebooks-list.png and b/frontend/__snapshots__/scenes-app-notebooks--notebooks-list.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--numbered-list.png b/frontend/__snapshots__/scenes-app-notebooks--numbered-list.png index b9da335cd61d7..cbe5aefd199ed 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--numbered-list.png and b/frontend/__snapshots__/scenes-app-notebooks--numbered-list.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--recordings-playlist.png b/frontend/__snapshots__/scenes-app-notebooks--recordings-playlist.png index 234a80e2649d7..4e0b8532abe35 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--recordings-playlist.png and b/frontend/__snapshots__/scenes-app-notebooks--recordings-playlist.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--text-formats.png b/frontend/__snapshots__/scenes-app-notebooks--text-formats.png index 8c133958b39cc..aa872f0a5cfe9 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--text-formats.png and b/frontend/__snapshots__/scenes-app-notebooks--text-formats.png differ diff --git a/frontend/__snapshots__/scenes-app-notebooks--text-only-notebook.png b/frontend/__snapshots__/scenes-app-notebooks--text-only-notebook.png index a803eed954067..f0ea3f9550997 100644 Binary files a/frontend/__snapshots__/scenes-app-notebooks--text-only-notebook.png and b/frontend/__snapshots__/scenes-app-notebooks--text-only-notebook.png differ diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-filtering-page.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-filtering-page.png index 57b43ed4238ff..a13107e8bbaa8 100644 Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-filtering-page.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-filtering-page.png differ diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-landing-page.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-landing-page.png index 854c2468d8cfc..c51a24f39fa18 100644 Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-landing-page.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-landing-page.png differ diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-transformations-page.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-transformations-page.png index 4cf705d0bb98b..dd103d2f11446 100644 Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-transformations-page.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-transformations-page.png differ diff --git a/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png b/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png index 142d66d3f95df..c4c27f4db817a 100644 Binary files a/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png and b/frontend/__snapshots__/scenes-app-recordings--recordings-play-lists.png differ diff --git a/frontend/__snapshots__/scenes-app-saved-insights--empty-state.png b/frontend/__snapshots__/scenes-app-saved-insights--empty-state.png index 76d3085776638..86a13a05a8926 100644 Binary files a/frontend/__snapshots__/scenes-app-saved-insights--empty-state.png and b/frontend/__snapshots__/scenes-app-saved-insights--empty-state.png differ diff --git a/frontend/__snapshots__/scenes-app-saved-insights--list-view.png b/frontend/__snapshots__/scenes-app-saved-insights--list-view.png index 45cbb37f481dd..68b73d4906ad2 100644 Binary files a/frontend/__snapshots__/scenes-app-saved-insights--list-view.png and b/frontend/__snapshots__/scenes-app-saved-insights--list-view.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey-appearance-section.png b/frontend/__snapshots__/scenes-app-surveys--new-survey-appearance-section.png index 73966cfe59303..a86eba79b8ac0 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey-appearance-section.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey-appearance-section.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--survey-not-found.png b/frontend/__snapshots__/scenes-app-surveys--survey-not-found.png index a19faf8440760..711d125b3d17e 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--survey-not-found.png and b/frontend/__snapshots__/scenes-app-surveys--survey-not-found.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--survey-view.png b/frontend/__snapshots__/scenes-app-surveys--survey-view.png index 1fedb0eef095e..115efcf6e29af 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--survey-view.png and b/frontend/__snapshots__/scenes-app-surveys--survey-view.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--surveys-list.png b/frontend/__snapshots__/scenes-app-surveys--surveys-list.png index 2561db683b5f7..012692ee2758d 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--surveys-list.png and b/frontend/__snapshots__/scenes-app-surveys--surveys-list.png differ diff --git a/frontend/src/layout/navigation-3000/components/NavbarButton.tsx b/frontend/src/layout/navigation-3000/components/NavbarButton.tsx index c6dc5479055b8..72e07508a9ebf 100644 --- a/frontend/src/layout/navigation-3000/components/NavbarButton.tsx +++ b/frontend/src/layout/navigation-3000/components/NavbarButton.tsx @@ -4,6 +4,7 @@ import { Tooltip } from 'lib/lemon-ui/Tooltip' import clsx from 'clsx' import { useValues } from 'kea' import { sceneLogic } from 'scenes/sceneLogic' +import { SidebarChangeNoticeContent, useSidebarChangeNotices } from '~/layout/navigation/SideBar/SidebarChangeNotice' import { navigation3000Logic } from '../navigationLogic' import { LemonTag } from '@posthog/lemon-ui' import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' @@ -63,29 +64,46 @@ export const NavbarButton: FunctionComponent = React.forwardR } } + const buttonContent = ( + setHasBeenClicked(false)} + onClick={() => { + setHasBeenClicked(true) + onClick?.() + }} + className={clsx('NavbarButton', isUsingNewNav && here && 'NavbarButton--here')} + fullWidth + {...buttonProps} + > + {content} + + ) + + const [notices, onAcknowledged] = useSidebarChangeNotices({ identifier }) + return (
  • - - setHasBeenClicked(false)} - onClick={() => { - setHasBeenClicked(true) - onClick?.() - }} - className={clsx('NavbarButton', isUsingNewNav && here && 'NavbarButton--here')} - fullWidth - {...buttonProps} + {notices.length ? ( + } + placement={notices[0].placement ?? 'right'} + delayMs={0} + visible={true} + > + {buttonContent} + + ) : ( + - {content} - - + {buttonContent} + + )}
  • ) }) diff --git a/frontend/src/layout/navigation-3000/navigationLogic.tsx b/frontend/src/layout/navigation-3000/navigationLogic.tsx index 48f14cf59fd20..8d07a1843eaaa 100644 --- a/frontend/src/layout/navigation-3000/navigationLogic.tsx +++ b/frontend/src/layout/navigation-3000/navigationLogic.tsx @@ -19,9 +19,7 @@ import { IconHome, IconLive, IconPeople, - IconPerson, IconPieChart, - IconQuestion, IconRewindPlay, IconTestTube, IconToggle, @@ -32,8 +30,6 @@ import { IconChat, } from '@posthog/icons' import { urls } from 'scenes/urls' -import { annotationsSidebarLogic } from './sidebars/annotations' -import { cohortsSidebarLogic } from './sidebars/cohorts' import { dashboardsSidebarLogic } from './sidebars/dashboards' import { dataManagementSidebarLogic } from './sidebars/dataManagement' import { experimentsSidebarLogic } from './sidebars/experiments' @@ -322,33 +318,12 @@ export const navigation3000Logic = kea([ to: isUsingSidebar ? undefined : urls.eventDefinitions(), }, { - identifier: Scene.Persons, - label: 'People and groups', - icon: , + identifier: Scene.PersonsManagement, + label: 'People', + icon: , logic: isUsingSidebar ? personsAndGroupsSidebarLogic : undefined, to: isUsingSidebar ? undefined : urls.persons(), }, - { - identifier: Scene.Cohorts, - label: 'Cohorts', - icon: , - logic: isUsingSidebar ? cohortsSidebarLogic : undefined, - to: isUsingSidebar ? undefined : urls.cohorts(), - }, - { - identifier: Scene.Annotations, - label: 'Annotations', - icon: , - logic: isUsingSidebar ? annotationsSidebarLogic : undefined, - to: isUsingSidebar ? undefined : urls.annotations(), - }, - { - identifier: Scene.ToolbarLaunch, - label: 'Toolbar', - icon: , - logic: isUsingSidebar ? toolbarSidebarLogic : undefined, - to: isUsingSidebar ? undefined : urls.toolbarLaunch(), - }, ], [ { @@ -415,6 +390,13 @@ export const navigation3000Logic = kea([ icon: , to: urls.projectApps(), }, + { + identifier: Scene.ToolbarLaunch, + label: 'Toolbar', + icon: , + logic: isUsingSidebar ? toolbarSidebarLogic : undefined, + to: isUsingSidebar ? undefined : urls.toolbarLaunch(), + }, ], ] }, diff --git a/frontend/src/layout/navigation/Breadcrumbs/breadcrumbsLogic.test.ts b/frontend/src/layout/navigation/Breadcrumbs/breadcrumbsLogic.test.ts index 04e0abc6fd424..dd49842bc5fa7 100644 --- a/frontend/src/layout/navigation/Breadcrumbs/breadcrumbsLogic.test.ts +++ b/frontend/src/layout/navigation/Breadcrumbs/breadcrumbsLogic.test.ts @@ -7,7 +7,7 @@ import { sceneLogic } from 'scenes/sceneLogic' import { Scene } from 'scenes/sceneTypes' const blankScene = (): any => ({ scene: { component: () => null, logic: null } }) -const scenes: any = { [Scene.Annotations]: blankScene, [Scene.Dashboards]: blankScene } +const scenes: any = { [Scene.SavedInsights]: blankScene, [Scene.Dashboards]: blankScene } describe('breadcrumbsLogic', () => { let logic: ReturnType @@ -24,9 +24,9 @@ describe('breadcrumbsLogic', () => { logic.mount() // test with .delay because subscriptions happen async - router.actions.push(urls.annotations()) - await expectLogic(logic).delay(1).toMatchValues({ documentTitle: 'Annotations • PostHog' }) - expect(global.document.title).toEqual('Annotations • PostHog') + router.actions.push(urls.savedInsights()) + await expectLogic(logic).delay(1).toMatchValues({ documentTitle: 'Insights • PostHog' }) + expect(global.document.title).toEqual('Insights • PostHog') router.actions.push(urls.dashboards()) await expectLogic(logic).delay(1).toMatchValues({ documentTitle: 'Dashboards • PostHog' }) diff --git a/frontend/src/layout/navigation/SideBar/PageButton.tsx b/frontend/src/layout/navigation/SideBar/PageButton.tsx index f76b535ddc74e..1e8fafeca07de 100644 --- a/frontend/src/layout/navigation/SideBar/PageButton.tsx +++ b/frontend/src/layout/navigation/SideBar/PageButton.tsx @@ -6,6 +6,7 @@ import { Scene } from 'scenes/sceneTypes' import { LemonButton, LemonButtonProps, LemonButtonWithSideAction, SideAction } from 'lib/lemon-ui/LemonButton' import { sceneConfigurations } from 'scenes/scenes' import { LemonTag } from 'lib/lemon-ui/LemonTag/LemonTag' +import { SidebarChangeNoticeTooltip } from '~/layout/navigation/SideBar/SidebarChangeNotice' export interface PageButtonProps extends Pick { /** Used for highlighting the active scene. `identifier` of type number means dashboard ID instead of scene. */ @@ -32,48 +33,51 @@ export function PageButton({ title, sideAction, identifier, highlight, ...button return (
  • - {sideAction ? ( - - {title} - - ) : ( - - {title} - {highlight === 'alpha' ? ( - - Alpha - - ) : highlight === 'beta' ? ( - - Beta - - ) : highlight === 'new' ? ( - - New - - ) : null} - - )} + + {sideAction ? ( + + {title} + + ) : ( + + {title} + {highlight === 'alpha' ? ( + + Alpha + + ) : highlight === 'beta' ? ( + + Beta + + ) : highlight === 'new' ? ( + + New + + ) : null} + + )} +
  • ) } diff --git a/frontend/src/layout/navigation/SideBar/SideBar.tsx b/frontend/src/layout/navigation/SideBar/SideBar.tsx index dce2dbf9936ac..d5b53b5e31991 100644 --- a/frontend/src/layout/navigation/SideBar/SideBar.tsx +++ b/frontend/src/layout/navigation/SideBar/SideBar.tsx @@ -7,7 +7,6 @@ import { IconApps, IconBarChart, IconCohort, - IconComment, IconDatabase, IconExperiment, IconFlag, @@ -15,7 +14,6 @@ import { IconLive, IconMessages, IconOpenInApp, - IconPerson, IconPinOutline, IconPipeline, IconPlus, @@ -39,7 +37,6 @@ import { AvailableFeature } from '~/types' import './SideBar.scss' import { navigationLogic } from '../navigationLogic' import { FEATURE_FLAGS } from 'lib/constants' -import { groupsModel } from '~/models/groupsModel' import { userLogic } from 'scenes/userLogic' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { SideBarApps } from '~/layout/navigation/SideBar/SideBarApps' @@ -60,7 +57,6 @@ function Pages(): JSX.Element { const { hideSideBarMobile, toggleProjectSwitcher, hideProjectSwitcher } = useActions(navigationLogic) const { isProjectSwitcherShown } = useValues(navigationLogic) const { pinnedDashboards } = useValues(dashboardsModel) - const { showGroupsOptions } = useValues(groupsModel) const { hasAvailableFeature } = useValues(userLogic) const { preflight } = useValues(preflightLogic) const { currentTeam } = useValues(teamLogic) @@ -222,10 +218,10 @@ function Pages(): JSX.Element { to={urls.eventDefinitions()} /> } - identifier={Scene.Persons} + icon={} + identifier={Scene.PersonsManagement} to={urls.persons()} - title={`Persons${showGroupsOptions ? ' & Groups' : ''}`} + title="People" /> } identifier={Scene.Pipeline} to={urls.pipeline()} /> @@ -239,8 +235,6 @@ function Pages(): JSX.Element { highlight="beta" /> - } identifier={Scene.Cohorts} to={urls.cohorts()} /> - } identifier={Scene.Annotations} to={urls.annotations()} /> {canViewPlugins(currentOrganization) || Object.keys(frontendApps).length > 0 ? ( <>
    Apps
    diff --git a/frontend/src/layout/navigation/SideBar/SidebarChangeNotice.tsx b/frontend/src/layout/navigation/SideBar/SidebarChangeNotice.tsx new file mode 100644 index 0000000000000..5c09034b53815 --- /dev/null +++ b/frontend/src/layout/navigation/SideBar/SidebarChangeNotice.tsx @@ -0,0 +1,130 @@ +import { IconCheck } from '@posthog/icons' +import { LemonButton, LemonDivider, Tooltip, TooltipProps } from '@posthog/lemon-ui' +import { useValues } from 'kea' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' +import posthog from 'posthog-js' +import React, { Fragment, useState } from 'react' +import { Scene } from 'scenes/sceneTypes' + +export type SidebarChangeNoticeProps = { + identifier: string | number +} + +export type SidebarChangeNoticeTooltipProps = SidebarChangeNoticeProps & { + children: TooltipProps['children'] +} + +/** + * Used in combination with a feature flag like: + * + * sidebar-notice-annotations-2023-10-30 + * matching: + * properties: + * sidebar_notice/annotations-2023-10-30: doesn't equal true + * joined_at: before 2023-10-30 + * + */ + +const NOTICES: { + identifier: Scene + description: React.ReactNode + placement: TooltipProps['placement'] + flagSuffix: string +}[] = [ + { + identifier: Scene.DataManagement, + description: ( + <> + Annotations have moved here! +
    + You can now find them in Data Management + + ), + placement: 'rightBottom', + flagSuffix: 'annotations-2023-10-30', + }, + { + identifier: Scene.PersonsManagement, + description: ( + <> + Cohorts have moved here! +
    + You can now find them in People + + ), + placement: 'rightTop', + flagSuffix: 'cohorts-2023-10-30', + }, +] + +export function SidebarChangeNoticeContent({ + notices, + onAcknowledged, +}: { + notices: typeof NOTICES + onAcknowledged: () => void +}): JSX.Element | null { + return ( +
    +
    + {notices.map((notice, i) => ( + + {notice.description} + {i < notices.length - 1 && } + + ))} +
    + + } /> +
    + ) +} + +export function useSidebarChangeNotices({ identifier }: SidebarChangeNoticeProps): [typeof NOTICES, () => void] { + const { featureFlags } = useValues(featureFlagLogic) + const [noticeAcknowledged, setNoticeAcknowledged] = useState(false) + + const notices = NOTICES.filter((notice) => notice.identifier === identifier).filter( + (notice) => featureFlags[`sidebar-notice-${notice.flagSuffix}`] + ) + + const onAcknowledged = (): void => { + notices.forEach((change) => { + posthog.capture('sidebar notice acknowledged', { + change: change.flagSuffix, + $set: { + [`sidebar_notice/${change.flagSuffix}`]: true, + }, + }) + setNoticeAcknowledged(true) + }) + } + + return [!noticeAcknowledged ? notices : [], onAcknowledged] +} + +export function SidebarChangeNoticeTooltip({ identifier, children }: SidebarChangeNoticeTooltipProps): JSX.Element { + const [notices, onAcknowledged] = useSidebarChangeNotices({ identifier }) + + if (!notices.length) { + return <>{children} + } + + return ( + } + > + {React.cloneElement(children as React.ReactElement, { + onClick: () => { + onAcknowledged() + if (React.isValidElement(children)) { + children.props.onClick?.() + } + }, + })} + + ) +} diff --git a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss index 096cd7198b5d8..1f49b28943c5b 100644 --- a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss +++ b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss @@ -256,6 +256,19 @@ } } + .ant-tooltip & { + // Buttons have an overriden style in tooltips, as they are always dark + &:hover { + background: rgba(255, 255, 255, 0.15) !important; + } + &:active { + background: rgba(255, 255, 255, 0.2) !important; + } + .LemonButton__icon { + color: #fff !important; + } + } + .posthog-3000 & { font-size: 0.8125rem; border: none !important; // 3000 buttons never have borders diff --git a/frontend/src/lib/lemon-ui/Link/Link.tsx b/frontend/src/lib/lemon-ui/Link/Link.tsx index c1571716d37f0..0e3bad276c1a4 100644 --- a/frontend/src/lib/lemon-ui/Link/Link.tsx +++ b/frontend/src/lib/lemon-ui/Link/Link.tsx @@ -134,10 +134,7 @@ export const Link: React.FC> = Reac {targetBlankIcon && target === '_blank' ? : null} ) : ( - {disabledReason} : undefined} - > + {disabledReason} : undefined}>