diff --git a/cypress/e2e/insights-navigation-open-directly.cy.ts b/cypress/e2e/insights-navigation-open-directly.cy.ts index 406445d9f6636..4eec9fcd7aba7 100644 --- a/cypress/e2e/insights-navigation-open-directly.cy.ts +++ b/cypress/e2e/insights-navigation-open-directly.cy.ts @@ -30,7 +30,7 @@ describe('Insights', () => { describe('opening a new insight directly', () => { it('can open a new trends insight', () => { insight.newInsight('TRENDS') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') cy.get('tr').should('have.length.gte', 2) }) @@ -52,12 +52,12 @@ describe('Insights', () => { it('can open a new stickiness insight', () => { insight.newInsight('STICKINESS') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') }) it('can open a new lifecycle insight', () => { insight.newInsight('LIFECYCLE') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') }) it('can open a new SQL insight', () => { diff --git a/cypress/e2e/insights-navigation-open-sql-insight-first.cy.ts b/cypress/e2e/insights-navigation-open-sql-insight-first.cy.ts index ca286d2e7c765..2b03880515ece 100644 --- a/cypress/e2e/insights-navigation-open-sql-insight-first.cy.ts +++ b/cypress/e2e/insights-navigation-open-sql-insight-first.cy.ts @@ -42,7 +42,7 @@ describe('Insights', () => { it('can open a new trends insight', () => { insight.clickTab('TRENDS') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') cy.get('tr').should('have.length.gte', 2) cy.contains('tr', 'No insight results').should('not.exist') }) @@ -65,12 +65,12 @@ describe('Insights', () => { it('can open a new stickiness insight', () => { insight.clickTab('STICKINESS') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') }) it('can open a new lifecycle insight', () => { insight.clickTab('LIFECYCLE') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') }) it('can open a new SQL insight', () => { diff --git a/cypress/e2e/insights-navigation.cy.ts b/cypress/e2e/insights-navigation.cy.ts index 7adf79c284cba..a3526833bee81 100644 --- a/cypress/e2e/insights-navigation.cy.ts +++ b/cypress/e2e/insights-navigation.cy.ts @@ -62,7 +62,7 @@ describe('Insights', () => { cy.get('.DataTable tr').should('have.length.gte', 2) insight.clickTab('TRENDS') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') cy.get('tr').should('have.length.gte', 2) cy.contains('tr', 'No insight results').should('not.exist') @@ -73,7 +73,7 @@ describe('Insights', () => { cy.get('.DataTable tr').should('have.length.gte', 2) insight.clickTab('TRENDS') - cy.get('.trends-insights-container canvas').should('exist') + cy.get('.TrendsInsight canvas').should('exist') cy.get('tr').should('have.length.gte', 2) cy.contains('tr', 'No insight results').should('not.exist') }) diff --git a/frontend/__snapshots__/components-cards-insight-card--insight-card.png b/frontend/__snapshots__/components-cards-insight-card--insight-card.png index 3c8919af6eeb8..eaa0ed7df25ed 100644 Binary files a/frontend/__snapshots__/components-cards-insight-card--insight-card.png and b/frontend/__snapshots__/components-cards-insight-card--insight-card.png differ diff --git a/frontend/__snapshots__/components-cards-text-card--template.png b/frontend/__snapshots__/components-cards-text-card--template.png index 4eee8836ab698..3c045b8354ba6 100644 Binary files a/frontend/__snapshots__/components-cards-text-card--template.png and b/frontend/__snapshots__/components-cards-text-card--template.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight.png b/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight.png index cf79e173859f2..f0559ae34642d 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight.png and b/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-breakdown-insight.png index 38244e35ae9d8..aa5a9eab7354f 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-insight.png b/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-insight.png index 4a04621ca44de..dd92bf6b0ef79 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-insight.png and b/frontend/__snapshots__/exporter-exporter--funnel-left-to-right-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-time-to-convert-insight.png b/frontend/__snapshots__/exporter-exporter--funnel-time-to-convert-insight.png index c403c659e15df..e97ac272bc3b5 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-time-to-convert-insight.png and b/frontend/__snapshots__/exporter-exporter--funnel-time-to-convert-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-breakdown-insight.png index ec9d14b04e8ca..20d72c16238e4 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-insight.png b/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-insight.png index 6f5b39c1f9d3e..c7f2676ae1bf2 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-insight.png and b/frontend/__snapshots__/exporter-exporter--funnel-top-to-bottom-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--lifecycle-insight.png b/frontend/__snapshots__/exporter-exporter--lifecycle-insight.png index fdcbbd24236f1..49e132b82db76 100644 Binary files a/frontend/__snapshots__/exporter-exporter--lifecycle-insight.png and b/frontend/__snapshots__/exporter-exporter--lifecycle-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--retention-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--retention-breakdown-insight.png index 082bdb9907417..7185efea76ab6 100644 Binary files a/frontend/__snapshots__/exporter-exporter--retention-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--retention-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--retention-insight.png b/frontend/__snapshots__/exporter-exporter--retention-insight.png index c62fc70ac088b..e91b842102b86 100644 Binary files a/frontend/__snapshots__/exporter-exporter--retention-insight.png and b/frontend/__snapshots__/exporter-exporter--retention-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--stickiness-insight.png b/frontend/__snapshots__/exporter-exporter--stickiness-insight.png index 1c1e95908112f..3fc3e03143c98 100644 Binary files a/frontend/__snapshots__/exporter-exporter--stickiness-insight.png and b/frontend/__snapshots__/exporter-exporter--stickiness-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-area-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--trends-area-breakdown-insight.png index 24ffc71713a28..7de2045284f44 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-area-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-area-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-area-insight.png b/frontend/__snapshots__/exporter-exporter--trends-area-insight.png index 56ac86a94a237..41d262d023141 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-area-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-area-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-bar-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--trends-bar-breakdown-insight.png index 3c95a30cc395a..e197249c208ce 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-bar-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-bar-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-bar-insight.png b/frontend/__snapshots__/exporter-exporter--trends-bar-insight.png index 56ac86a94a237..41d262d023141 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-bar-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-bar-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-line-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--trends-line-breakdown-insight.png index 3c95a30cc395a..e197249c208ce 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-line-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-line-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-line-insight.png b/frontend/__snapshots__/exporter-exporter--trends-line-insight.png index 56ac86a94a237..41d262d023141 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-line-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-line-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-line-multi-insight.png b/frontend/__snapshots__/exporter-exporter--trends-line-multi-insight.png index 75529341446f0..93c140d75f49a 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-line-multi-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-line-multi-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-number-insight.png b/frontend/__snapshots__/exporter-exporter--trends-number-insight.png index ec6d628426da3..e661eaa4de199 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-number-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-number-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-pie-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--trends-pie-breakdown-insight.png index 7a1f9dfceee8c..61ac574a3c443 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-pie-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-pie-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-pie-insight.png b/frontend/__snapshots__/exporter-exporter--trends-pie-insight.png index 825a772994d7d..03e5f0a529a8a 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-pie-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-pie-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-table-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--trends-table-breakdown-insight.png index 036f84e322323..282daf6b30543 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-table-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-table-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-table-insight.png b/frontend/__snapshots__/exporter-exporter--trends-table-insight.png index 21d2a42f9eaf2..5223b75398630 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-table-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-table-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-value-breakdown-insight.png b/frontend/__snapshots__/exporter-exporter--trends-value-breakdown-insight.png index 3fff287337545..3575438a7ad30 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-value-breakdown-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-value-breakdown-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-value-insight.png b/frontend/__snapshots__/exporter-exporter--trends-value-insight.png index 56ac86a94a237..41d262d023141 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-value-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-value-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--trends-world-map-insight.png b/frontend/__snapshots__/exporter-exporter--trends-world-map-insight.png index d4b629b6536ad..7654fa3f75324 100644 Binary files a/frontend/__snapshots__/exporter-exporter--trends-world-map-insight.png and b/frontend/__snapshots__/exporter-exporter--trends-world-map-insight.png differ diff --git a/frontend/__snapshots__/exporter-exporter--user-paths-insight.png b/frontend/__snapshots__/exporter-exporter--user-paths-insight.png index 79f1711336dbf..19977a7a1bd22 100644 Binary files a/frontend/__snapshots__/exporter-exporter--user-paths-insight.png and b/frontend/__snapshots__/exporter-exporter--user-paths-insight.png differ diff --git a/frontend/__snapshots__/insights-insightstable--embedded.png b/frontend/__snapshots__/insights-insightstable--embedded.png index 3f9234e5b9d3a..180bab30a3d06 100644 Binary files a/frontend/__snapshots__/insights-insightstable--embedded.png and b/frontend/__snapshots__/insights-insightstable--embedded.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--edit.png b/frontend/__snapshots__/scenes-app-dashboards--edit.png index 6389702cb99c5..ca634e775f0d7 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--edit.png and b/frontend/__snapshots__/scenes-app-dashboards--edit.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--show.png b/frontend/__snapshots__/scenes-app-dashboards--show.png index 4aaadd263a2a6..0bac6702636e7 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--show.png and b/frontend/__snapshots__/scenes-app-dashboards--show.png differ diff --git a/frontend/__snapshots__/scenes-app-experiments--complete-funnel-experiment.png b/frontend/__snapshots__/scenes-app-experiments--complete-funnel-experiment.png index 8feeeb95edc07..b954a89c3fe4f 100644 Binary files a/frontend/__snapshots__/scenes-app-experiments--complete-funnel-experiment.png and b/frontend/__snapshots__/scenes-app-experiments--complete-funnel-experiment.png differ diff --git a/frontend/__snapshots__/scenes-app-experiments--running-trend-experiment.png b/frontend/__snapshots__/scenes-app-experiments--running-trend-experiment.png index aab6a5a84f625..34fc0266e6ee9 100644 Binary files a/frontend/__snapshots__/scenes-app-experiments--running-trend-experiment.png and b/frontend/__snapshots__/scenes-app-experiments--running-trend-experiment.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 015ec328151a8..ff8d20c392180 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-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit--webkit.png index dd9c31998e7e4..f46520b2f73dc 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit.png index 50f36a4871650..d3727abe59c66 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit.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 edc1d0829245e..7f8fbe65c33f4 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-left-to-right--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png index 73ef96ff35115..7f37b4f88ea9e 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png index 47ef343bc3320..52b192f0436ff 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--webkit.png index 83e9c3fa63d99..9aa218739300b 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit.png index e379604a2591b..f7301be8fcc9b 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png index 7cd7d0f64cc9a..2426224527e72 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit--webkit.png index e06956a47c809..3f938630e0cee 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit.png index 07f7cfe1b6935..97c300aec44da 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png index db6f0a7f56163..451a3e13a2d4f 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.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 226edac304a58..2cd74f758f4f0 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-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit--webkit.png index 656cf46515e6e..5e437308fefd9 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit.png index 486d89f6bd7ca..3ac105cb27e6c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit.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 036c2bc3b587d..0c68ed20b354c 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--funnel-top-to-bottom--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png index 69d5bf0584241..b93219c3d0204 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png index d26c9a76aad35..a03a837b14ca3 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png index 59d35f7d7b1da..57c8868d90d40 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png index db0e0dc5d29be..41354872d146c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png index f4bdbb0d8c2cb..0c51f972a0c9e 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png index ad94cc04a4881..1bc80b159fcf0 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png index 896a7623a9071..1fceceed5b2ba 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png index fbdf18896ae06..7f8d3f622e01d 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png b/frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png index ee1307cd8d1ba..91f6f6e560edd 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-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--lifecycle-edit--webkit.png index 373e3e0e19c98..bd131be5920a7 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--lifecycle-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--lifecycle-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--lifecycle-edit.png b/frontend/__snapshots__/scenes-app-insights--lifecycle-edit.png index 15c56dfa56a59..38cb27172dece 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--lifecycle-edit.png and b/frontend/__snapshots__/scenes-app-insights--lifecycle-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--lifecycle.png b/frontend/__snapshots__/scenes-app-insights--lifecycle.png index 8fda2317ec4d0..89b738cf06472 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--retention--webkit.png b/frontend/__snapshots__/scenes-app-insights--retention--webkit.png index 87c46c2fab5ab..38102732ee359 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention--webkit.png and b/frontend/__snapshots__/scenes-app-insights--retention--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--retention-breakdown--webkit.png index fd40f5ea3d016..cb52e0f1495f4 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--retention-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--webkit.png index f599ea59d602b..ee03a7556c872 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit.png index 97fa118d79f56..1e71a2fc11b12 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention-breakdown.png b/frontend/__snapshots__/scenes-app-insights--retention-breakdown.png index 121d0b324adcd..3e2ab6d65836f 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--retention-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--retention-edit--webkit.png index c8ede7b9fd30c..9d791a3259380 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--retention-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention-edit.png b/frontend/__snapshots__/scenes-app-insights--retention-edit.png index ae71eec088987..45c2836c18811 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention-edit.png and b/frontend/__snapshots__/scenes-app-insights--retention-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--retention.png b/frontend/__snapshots__/scenes-app-insights--retention.png index e90937f466eef..9a7251ee3698d 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--retention.png and b/frontend/__snapshots__/scenes-app-insights--retention.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png b/frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png index 4125f299a358e..b1f44c1341ec3 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-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--stickiness-edit--webkit.png index 8eefb8a637100..fc56f416a79ff 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--stickiness-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--stickiness-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--stickiness-edit.png b/frontend/__snapshots__/scenes-app-insights--stickiness-edit.png index 29db39c34e2c8..3cc58acbcacee 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--stickiness-edit.png and b/frontend/__snapshots__/scenes-app-insights--stickiness-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--stickiness.png b/frontend/__snapshots__/scenes-app-insights--stickiness.png index de3afbf8cc7af..e3a0289b2bde0 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-area--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-area--webkit.png index 21aa9bc7551f8..d3ad0d0416ed0 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-area--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown--webkit.png index b5c8307dea666..8f14499429e91 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--webkit.png index 9905ed61d7a89..a2d3654a7b019 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit.png index 18e8183ddefb1..eacd277f8c466 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown.png b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown.png index f412b05f949a1..d2c34da43a597 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--trends-area-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-area-edit--webkit.png index 1c9bae1872eee..bccdd29949efa 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-area-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-area-edit.png index 2513bc614a783..689dcd9839e8d 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-area-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-area.png b/frontend/__snapshots__/scenes-app-insights--trends-area.png index 693bb117d362c..bc2055bb61140 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-area.png and b/frontend/__snapshots__/scenes-app-insights--trends-area.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-bar--webkit.png index 029db225e47ab..9348697847367 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown--webkit.png index 7a047299abaef..6542e66ded261 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--webkit.png index aa1a85fbbf26f..9bfb5ce522765 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit.png index 42115a622a205..c0c5a2092f525 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown.png b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown.png index b76b6e7a17d98..1f0039036ffa4 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-bar-edit--webkit.png index adb88102026c6..b854c985c0849 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-bar-edit.png index 1b81ed4977ff1..932b2d3d43abc 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-bar.png b/frontend/__snapshots__/scenes-app-insights--trends-bar.png index cb863bb9c9bb6..e6b4d9722076b 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-bar.png and b/frontend/__snapshots__/scenes-app-insights--trends-bar.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line--webkit.png index 8aed583ad4064..b3a5b20f6394c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown--webkit.png index a57438bd749a9..5a1d695b843d6 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--webkit.png index 2779891938055..9d275c34efbf3 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit.png index 370cd4a4c10a2..e308b6b409e0d 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-labels--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-labels--webkit.png new file mode 100644 index 0000000000000..e2d82fc57c0e0 Binary files /dev/null and b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-labels--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-labels.png b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-labels.png new file mode 100644 index 0000000000000..066c2201792a3 Binary files /dev/null and b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-labels.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown.png b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown.png index 1ec537b3468ad..0ac5093e23ca3 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-edit--webkit.png index e14d719a073e2..1990ae3d264c0 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-edit.png index fbeb271f50cf0..b3d789e752710 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-multi--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-multi--webkit.png index 6015dabcec713..42561f322039c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-multi--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-multi--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit--webkit.png index 3f2231d07737c..8a47ca33b0fd2 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit.png index 649c945bdf267..2788c12f3b2c7 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-multi-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-multi.png b/frontend/__snapshots__/scenes-app-insights--trends-line-multi.png index 9fc201861aa47..939ae1dea2f56 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-multi.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-multi.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line.png b/frontend/__snapshots__/scenes-app-insights--trends-line.png index e1b4848578966..975132fef1b19 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line.png and b/frontend/__snapshots__/scenes-app-insights--trends-line.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 17a8821fb39ed..f3161e700a738 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-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-number-edit--webkit.png index 796e6548e08c8..20c2074825f8e 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-number-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-number-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-number-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-number-edit.png index 25d7659b28b81..80c580574079c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-number-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-number-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-number.png b/frontend/__snapshots__/scenes-app-insights--trends-number.png index 48d95207dd24d..baf47a94ff5db 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-pie--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie--webkit.png index 846479f3753fe..93b7e9b656117 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown--webkit.png index 983851141af8d..d33d21c2387f1 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--webkit.png index 5163ac5fdb238..e11265b7a23c5 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit.png index e020cb76a7760..f83b718feeb79 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-labels--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-labels--webkit.png new file mode 100644 index 0000000000000..6e89f0b8e8683 Binary files /dev/null and b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-labels--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-labels.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-labels.png new file mode 100644 index 0000000000000..6177698ddf6dc Binary files /dev/null and b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-labels.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown.png index e396c60572415..dcb273e64439b 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-edit--webkit.png index af5c8b64103fe..a5b457de916b1 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-pie-edit.png index 0a8ebe4751399..c80f95a6464a1 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-pie.png b/frontend/__snapshots__/scenes-app-insights--trends-pie.png index 5f83bed8ef407..bea0f178cf14c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-pie.png and b/frontend/__snapshots__/scenes-app-insights--trends-pie.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 2ba75da1d8204..106f7b70d1f54 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 063e78dd5feaf..ff41c7540bfcf 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-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--webkit.png index 4196d96dfbd67..2d1533eb70717 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit.png index 8ae256c8199bf..2f708f79c912c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit.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 a3a2a9a805370..18487bb88d559 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 fb0e1de7e7310..38c6892a0c112 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 4ca89e34bfd22..4a6fe4f1a4daf 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 e36f384700aee..bab2405d9ac61 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-insights--trends-value--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-value--webkit.png index a350461bf3689..f6af074e96923 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-value--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown--webkit.png index 8af97f329f0d5..979febee96067 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--webkit.png index c626cb8402ae2..d3a3dec473f0b 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit.png index f45c73c45217e..fb29412159cd5 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown.png b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown.png index 98d682c860521..7f099baaf9eab 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown.png and b/frontend/__snapshots__/scenes-app-insights--trends-value-breakdown.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-value-edit--webkit.png index 48b1f53b59bfb..362964c3bcf89 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-value-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-value-edit.png index bdb269d4562ee..91225e794f2b4 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-value-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-value.png b/frontend/__snapshots__/scenes-app-insights--trends-value.png index 24e25225e9902..94177c7f28870 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-value.png and b/frontend/__snapshots__/scenes-app-insights--trends-value.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-world-map--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-world-map--webkit.png index 1ae8bc9fccb15..25eaf83180416 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-world-map--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-world-map--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit--webkit.png index 709a2698bae3b..5ecbf86975a4f 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit.png b/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit.png index 0462e9cfedd78..4afd8b0955fbd 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit.png and b/frontend/__snapshots__/scenes-app-insights--trends-world-map-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--trends-world-map.png b/frontend/__snapshots__/scenes-app-insights--trends-world-map.png index e76857963a4de..0050ed308e178 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-world-map.png and b/frontend/__snapshots__/scenes-app-insights--trends-world-map.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths--webkit.png b/frontend/__snapshots__/scenes-app-insights--user-paths--webkit.png index b9c66a90f49b9..c2354f8a1112d 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths--webkit.png and b/frontend/__snapshots__/scenes-app-insights--user-paths--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--webkit.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--webkit.png index 0db6e20f49afb..a09292dd4f0cb 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--webkit.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit.png index df710f4dd46da..7199f4a937fbc 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths.png b/frontend/__snapshots__/scenes-app-insights--user-paths.png index 255f096d534c3..2d4d7040cd6f6 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths.png and b/frontend/__snapshots__/scenes-app-insights--user-paths.png differ diff --git a/frontend/__snapshots__/scenes-app-project-homepage--project-homepage.png b/frontend/__snapshots__/scenes-app-project-homepage--project-homepage.png index fe614866ab3d3..55081c3b37420 100644 Binary files a/frontend/__snapshots__/scenes-app-project-homepage--project-homepage.png and b/frontend/__snapshots__/scenes-app-project-homepage--project-homepage.png differ diff --git a/frontend/__snapshots__/scenes-app-saved-insights--card-view.png b/frontend/__snapshots__/scenes-app-saved-insights--card-view.png index df6c09ca18009..8c6d47aa79795 100644 Binary files a/frontend/__snapshots__/scenes-app-saved-insights--card-view.png and b/frontend/__snapshots__/scenes-app-saved-insights--card-view.png differ diff --git a/frontend/src/exporter/ExportedInsight/ExportedInsight.scss b/frontend/src/exporter/ExportedInsight/ExportedInsight.scss index cab975ef99ae8..bb643d8f0d3a9 100644 --- a/frontend/src/exporter/ExportedInsight/ExportedInsight.scss +++ b/frontend/src/exporter/ExportedInsight/ExportedInsight.scss @@ -8,6 +8,8 @@ background: var(--bg-light); display: flex; flex-direction: column; + height: 100%; + flex: 1; .ExportedInsight__header { padding: 1rem; @@ -25,23 +27,19 @@ flex: 1; position: relative; z-index: 1; + display: flex; + flex-direction: column; - .FunnelBarChart { - min-height: 50vw; + .LemonTable { + border: none; + border-radius: 0; + background: none; } - .InsightViz { - position: relative; - display: flex; + .InsightCard__viz { + // We can't use the viewport height, as the screenshotter will resize the height of the window to capture the full content + // Instead we try to make it roughly rectangular min-height: 50vw; - - > * { - flex: 1; - } - - .ActionsPie { - position: absolute; - } } } @@ -56,31 +54,4 @@ margin: 0.25rem; } } - - &.ExportedInsight--fit-screen { - height: 100vh; - max-height: 100vh; - - .ExportedInsight__content { - display: flex; - flex-direction: column; - - .FunnelBarChart { - height: 100%; - max-height: 100%; - min-height: auto; - flex: 1; - } - - .InsightViz { - flex: 1; - min-height: 100px; - max-height: 100%; - } - - &.ExportedInsight__content--with-watermark { - padding-top: 1rem; - } - } - } } diff --git a/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx b/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx index 24bfe97cab377..c75e6306f9ef8 100644 --- a/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx +++ b/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx @@ -91,11 +91,7 @@ export function ExportedInsight({ ) ) : ( - + )} {showLegend ? (
diff --git a/frontend/src/exporter/Exporter.scss b/frontend/src/exporter/Exporter.scss index 17fb7a4e4b3e5..f861f282a2926 100644 --- a/frontend/src/exporter/Exporter.scss +++ b/frontend/src/exporter/Exporter.scss @@ -2,6 +2,9 @@ .Exporter { padding: 1rem; + min-height: 100vh; + display: flex; + flex-direction: column; &--recording { height: 100vh; @@ -50,11 +53,6 @@ html.export-type-embed { .Exporter { padding: 0; - - // Insights can resize to fit any height, whereas dashboards cannot - &--insight { - height: 100vh; - max-height: 100vh; - } + min-height: 100vh; } } diff --git a/frontend/src/lib/components/Cards/CardMeta.scss b/frontend/src/lib/components/Cards/CardMeta.scss index 779e07abfc0d5..2272b7acb2f78 100644 --- a/frontend/src/lib/components/Cards/CardMeta.scss +++ b/frontend/src/lib/components/Cards/CardMeta.scss @@ -35,18 +35,23 @@ } .CardMeta { - position: absolute; - top: 0; - left: 0; display: flex; + position: relative; + flex-shrink: 0; flex-direction: column; width: 100%; max-height: calc(100% - 2rem); background: var(--bg-light); z-index: 101; // Elevate above viz - overflow: hidden; border-radius: var(--radius); + &--with-details { + .CardMeta__top { + // Reduced height so that, considering the padding set above, CardMeta__top doesn't have too much margin + height: 1.5rem; + } + } + h5 { color: var(--muted); line-height: 1.5rem; @@ -62,44 +67,54 @@ font-weight: 600; margin-bottom: 0.125rem; } -} - -.CardMeta--with-details { - padding: 1rem; - .CardMeta__top { - // Reduced height so that, considering the padding set above, CardMeta__top doesn't have too much margin - height: 1.5rem; + .CardMeta__primary { + display: flex; + width: 100%; + padding: 1rem; } -} -.CardMeta--expansion-enter-active, -.CardMeta--expansion-exit-active, -.CardMeta--expansion-enter, -.CardMeta--expansion-exit { - transition: box-shadow 200ms ease, height 200ms ease; -} + .CardMeta__divider { + margin: 0 1rem; + height: 1px; + background: var(--border); + opacity: 0; + transition: opacity 200ms ease; + } -.CardMeta--expansion-exit.CardMeta--expansion-exit-active, -.CardMeta--expansion-exit-done, -.CardMeta--expansion-enter { - box-shadow: none; -} + .CardMeta__details { + position: absolute; + left: 0; + right: 0; + top: 100%; + max-height: 18rem; + margin-top: -1px; // To cause overlap with the divider when closed + border-bottom-width: 1px; + background: var(--bg-light); + transition: box-shadow 200ms ease, height 200ms ease, margin 200ms ease; + overflow-y: auto; + + .CardMeta__details__content { + pointer-events: none; + overflow-y: auto; + } + } -.CardMeta--expansion-enter.CardMeta--expansion-enter-active, -.CardMeta--expansion-enter-done, -.CardMeta--expansion-exit { - box-shadow: var(--shadow-elevation); -} + &.CardMeta--details-shown { + .CardMeta__details { + box-shadow: var(--shadow-elevation); + margin-top: 0; -.CardMeta--expansion-enter-done { - overflow: auto; -} + .CardMeta__details__content { + opacity: 1; + pointer-events: all; + } + } -.CardMeta__primary { - display: flex; - width: 100%; - margin-bottom: 0.5rem; + .CardMeta__divider { + opacity: 1; + } + } } .CardMeta__ribbon { diff --git a/frontend/src/lib/components/Cards/CardMeta.tsx b/frontend/src/lib/components/Cards/CardMeta.tsx index 7692089baeca9..4cb6b83e6a129 100644 --- a/frontend/src/lib/components/Cards/CardMeta.tsx +++ b/frontend/src/lib/components/Cards/CardMeta.tsx @@ -1,13 +1,11 @@ -import React, { useEffect } from 'react' import clsx from 'clsx' import { useResizeObserver } from 'lib/hooks/useResizeObserver' -import { CSSTransition, Transition } from 'react-transition-group' import { InsightColor } from '~/types' -import { LemonDivider } from 'lib/lemon-ui/LemonDivider' import { LemonButton } from 'lib/lemon-ui/LemonButton' import { IconSubtitles, IconSubtitlesOff } from 'lib/lemon-ui/icons' import { More } from 'lib/lemon-ui/LemonButton/More' import './CardMeta.scss' +import { Transition } from 'react-transition-group' export interface Resizeable { showResizeHandles?: boolean @@ -15,7 +13,6 @@ export interface Resizeable { } export interface CardMetaProps extends Pick, 'className'> { - setPrimaryHeight?: (primaryHeight: number | undefined) => void areDetailsShown?: boolean setAreDetailsShown?: React.Dispatch> ribbonColor?: InsightColor | null @@ -31,7 +28,6 @@ export interface CardMetaProps extends Pick } export function CardMeta({ - setPrimaryHeight, ribbonColor, showEditingControls, showDetailsControls, @@ -44,76 +40,65 @@ export function CardMeta({ className, samplingNotice, }: CardMetaProps): JSX.Element { - const { ref: primaryRef, height: primaryHeight, width: primaryWidth } = useResizeObserver() + const { ref: primaryRef, width: primaryWidth } = useResizeObserver() const { ref: detailsRef, height: detailsHeight } = useResizeObserver() - useEffect(() => { - setPrimaryHeight?.(primaryHeight) - }, [primaryHeight]) - - const foldedHeight = `calc(${primaryHeight}px ${ - showDetailsControls ? '+ 2rem /* margins */' : '' - } + 1px /* border */)` - const unfoldedHeight = `calc(${primaryHeight}px + ${ - detailsHeight || 0 - }px + 3.5rem /* margins */ + 3px /* border and spacer */)` - const transitionStyles = primaryHeight - ? { - entering: { - height: unfoldedHeight, - }, - entered: { - height: unfoldedHeight, - }, - exiting: { height: foldedHeight }, - exited: { height: foldedHeight }, - } - : {} - const showDetailsButtonLabel = !!primaryWidth && primaryWidth > 480 return ( - - {(transitionState) => ( -
-
- {ribbonColor && - ribbonColor !== - InsightColor.White /* White has historically meant no color synonymously to null */ && ( -
+
+
+ {ribbonColor && + ribbonColor !== + InsightColor.White /* White has historically meant no color synonymously to null */ && ( +
+ )} +
+
+
{topHeading}
+
+ {showDetailsControls && setAreDetailsShown && ( + : } + onClick={() => setAreDetailsShown((state) => !state)} + type="tertiary" + status="muted" + size="small" + > + {showDetailsButtonLabel && `${!areDetailsShown ? 'Show' : 'Hide'} details`} + )} -
-
-
{topHeading}
-
- {showDetailsControls && setAreDetailsShown && ( - : } - onClick={() => setAreDetailsShown((state) => !state)} - type="tertiary" - status="muted" - size="small" - > - {showDetailsButtonLabel && `${!areDetailsShown ? 'Show' : 'Hide'} details`} - - )} - {samplingNotice ? samplingNotice : null} - {showEditingControls && } -
-
- {meta} + {samplingNotice ? samplingNotice : null} + {showEditingControls && }
- - -
{metaDetails}
-
+ {meta}
- )} - +
+ +
+
+ {/* By using a transition about displaying then we make sure we aren't rendering the content when not needed */} + +
+ {/* Stops the padding getting in the height calc */} +
{metaDetails}
+
+
+
+
) } diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss b/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss index 8ab685214c862..2dbb9042ea037 100644 --- a/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss +++ b/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss @@ -8,6 +8,8 @@ border: 1px solid var(--border); z-index: 3; background: var(--bg-light); + display: flex; + flex-direction: column; &--highlighted { border-color: var(--primary); @@ -21,20 +23,17 @@ } } -.InsightViz { - position: absolute; - bottom: 0; - left: 0; +.InsightCard__viz { + position: relative; + flex: 1; display: flex; - align-items: center; - justify-content: center; - min-height: 0; + flex-direction: column; width: 100%; overflow: auto; .LineGraph, .AnnotationsOverlay { - padding: 1rem; + padding: 0.5rem; } .insight-empty-state { @@ -44,12 +43,10 @@ padding-bottom: 0; } - > :first-child { - margin-top: auto; - } - - > :last-child { - margin-bottom: auto; + .LemonTable { + border: none; + border-radius: 0; + background: none; } } diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx index 7b1195510fab4..29a4a050d3d55 100644 --- a/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx +++ b/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx' import { BindLogic, useValues } from 'kea' -import React, { useEffect, useState } from 'react' +import React, { useState } from 'react' import { Layout } from 'react-grid-layout' import { FunnelInvalidExclusionState, @@ -35,13 +35,7 @@ import { WorldMap } from 'scenes/insights/views/WorldMap' import { LemonBanner } from 'lib/lemon-ui/LemonBanner' import { BoldNumber } from 'scenes/insights/views/BoldNumber' import { SpinnerOverlay } from 'lib/lemon-ui/Spinner/Spinner' -import { - isFilterWithDisplay, - isFunnelsFilter, - isPathsFilter, - isRetentionFilter, - isTrendsFilter, -} from 'scenes/insights/sharedUtils' +import { isFilterWithDisplay, isFunnelsFilter, isPathsFilter, isRetentionFilter } from 'scenes/insights/sharedUtils' import { Resizeable } from 'lib/components/Cards/CardMeta' import { Query } from '~/queries/Query/Query' import { QueriesUnsupportedHere } from 'lib/components/Cards/InsightCard/QueriesUnsupportedHere' @@ -180,7 +174,6 @@ export function FilterBasedCardContent({ insightProps, loading, setAreDetailsShown, - style, apiErrored, timedOut, empty, @@ -197,25 +190,10 @@ export function FilterBasedCardContent({ cachedResults: getCachedResults(insightProps.cachedInsight, query), doNotLoad: insightProps.doNotLoad, } - useEffect(() => { - // If displaying a BoldNumber Trends insight, we need to fire the window resize event - // Without this, the value is only autosized before `metaPrimaryHeight` is determined, so it's wrong - // With this, autosizing runs again after `metaPrimaryHeight` is ready - if ( - // `display` should be ignored in non-Trends insight - isTrendsFilter(insight.filters) && - insight.filters.display === ChartDisplayType.BoldNumber - ) { - window.dispatchEvent(new Event('resize')) - } - }, [style?.height]) - return (
{ @@ -299,7 +277,6 @@ function InsightCardInternal( loading = true } - const [metaPrimaryHeight, setMetaPrimaryHeight] = useState(undefined) const [areDetailsShown, setAreDetailsShown] = useState(false) const canMakeQueryAPICalls = @@ -327,7 +304,6 @@ function InsightCardInternal( rename={rename} duplicate={duplicate} moveToDashboard={moveToDashboard} - setPrimaryHeight={setMetaPrimaryHeight} areDetailsShown={areDetailsShown} setAreDetailsShown={setAreDetailsShown} showEditingControls={showEditingControls} @@ -335,17 +311,7 @@ function InsightCardInternal( moreButtons={moreButtons} /> {insight.query ? ( -
+
{insight.result ? ( ) : canMakeQueryAPICalls ? ( @@ -364,13 +330,6 @@ function InsightCardInternal( empty={empty} tooFewFunnelSteps={tooFewFunnelSteps} invalidFunnelExclusion={invalidFunnelExclusion} - style={ - metaPrimaryHeight - ? { - height: `calc(100% - ${metaPrimaryHeight}px - 2rem /* margins */ - 1px /* border */)`, - } - : undefined - } setAreDetailsShown={setAreDetailsShown} /> ) : ( diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx index 73d5b42ac3841..129a365f6d84c 100644 --- a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx +++ b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx @@ -42,11 +42,6 @@ interface InsightMetaProps | 'showDetailsControls' | 'moreButtons' > { - /** - * Optional callback to update height of the primary InsightMeta div. Allow for coordinating InsightViz height - * with InsightMeta in a way that makes it possible for meta to overlay viz in expanded (InsightDetails) state. - */ - setPrimaryHeight?: (primaryHeight: number | undefined) => void areDetailsShown?: boolean setAreDetailsShown?: React.Dispatch> } @@ -62,7 +57,6 @@ export function InsightMeta({ rename, duplicate, moveToDashboard, - setPrimaryHeight, areDetailsShown, setAreDetailsShown, showEditingControls = true, @@ -91,13 +85,11 @@ export function InsightMeta({ return ( } meta={ <> diff --git a/frontend/src/lib/components/Cards/TextCard/TextCard.scss b/frontend/src/lib/components/Cards/TextCard/TextCard.scss index f88af17286e05..c927ce873d37b 100644 --- a/frontend/src/lib/components/Cards/TextCard/TextCard.scss +++ b/frontend/src/lib/components/Cards/TextCard/TextCard.scss @@ -2,10 +2,8 @@ background: var(--bg-light); } -.TextCard-Body { - position: absolute; - bottom: 0; - left: 0; +.TextCard__body { + flex: 1; overflow-y: auto; ul { diff --git a/frontend/src/lib/components/Cards/TextCard/TextCard.tsx b/frontend/src/lib/components/Cards/TextCard/TextCard.tsx index 61d6eaee91c93..9e6dc2e07c71c 100644 --- a/frontend/src/lib/components/Cards/TextCard/TextCard.tsx +++ b/frontend/src/lib/components/Cards/TextCard/TextCard.tsx @@ -7,9 +7,10 @@ import { useActions, useValues } from 'kea' import { router } from 'kea-router' import { urls } from 'scenes/urls' import { dashboardsModel } from '~/models/dashboardsModel' -import React, { useState } from 'react' -import { CardMeta, Resizeable } from 'lib/components/Cards/CardMeta' +import { Resizeable } from 'lib/components/Cards/CardMeta' import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown' +import React from 'react' +import { More } from 'lib/lemon-ui/LemonButton/More' interface TextCardProps extends React.HTMLAttributes, Resizeable { dashboardId?: string | number @@ -24,29 +25,19 @@ interface TextCardProps extends React.HTMLAttributes, Resizeable showEditingControls?: boolean } -interface TextCardBodyProps extends Pick, 'style' | 'className'> { +interface TextCardBodyProps extends Pick, 'className'> { text: string closeDetails?: () => void } -export function TextContent({ text, closeDetails, style, className }: TextCardBodyProps): JSX.Element { +export function TextContent({ text, closeDetails, className }: TextCardBodyProps): JSX.Element { return ( - // eslint-disable-next-line react/forbid-dom-props -
closeDetails?.()} style={style}> +
closeDetails?.()}> {text}
) } -export function TextCardBody({ text, closeDetails, style }: TextCardBodyProps): JSX.Element { - return ( - // eslint-disable-next-line react/forbid-dom-props -
closeDetails?.()} style={style}> - -
- ) -} - export function TextCardInternal( { textTile, @@ -67,8 +58,6 @@ export function TextCardInternal( const { push } = useActions(router) const { text } = textTile - const [metaPrimaryHeight, setMetaPrimaryHeight] = useState(undefined) - if (!text) { throw new Error('TextCard requires text') } @@ -82,83 +71,82 @@ export function TextCardInternal( {...divProps} ref={ref} > - - dashboardId && push(urls.dashboardTextTile(dashboardId, textTile.id))} - data-attr="edit-text" - > - Edit text - - - {moveToDashboard && otherDashboards.length > 0 && ( - ( - { - moveToDashboard(otherDashboard) - }} - fullWidth - > - {otherDashboard.name || Untitled} - - )), - placement: 'right-start', - fallbackPlacements: ['left-start'], - actionable: true, - closeParentPopoverOnClickInside: true, - }} - fullWidth - > - Move to - - )} - - Duplicate - - {moreButtons && ( + {showEditingControls && ( +
+ + + dashboardId && push(urls.dashboardTextTile(dashboardId, textTile.id)) + } + data-attr="edit-text" + > + Edit text + + + {moveToDashboard && otherDashboards.length > 0 && ( + ( + { + moveToDashboard(otherDashboard) + }} + fullWidth + > + {otherDashboard.name || Untitled} + + )), + placement: 'right-start', + fallbackPlacements: ['left-start'], + actionable: true, + closeParentPopoverOnClickInside: true, + }} + fullWidth + > + Move to + + )} + + Duplicate + + {moreButtons && ( + <> + + {moreButtons} + + )} - {moreButtons} + {removeFromDashboard && ( + + Remove from dashboard + + )} - )} - - {removeFromDashboard && ( - - Remove from dashboard - - )} - - } - setPrimaryHeight={setMetaPrimaryHeight} - /> + } + /> +
+ )} - +
+ +
{showResizeHandles && ( <> diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index be9079da1ad3f..9f79a0c868496 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -175,6 +175,7 @@ export const FEATURE_FLAGS = { PERSON_FEED_CANVAS: 'person-feed-canvas', // owner: #project-canvas MULTI_PROJECT_FEATURE_FLAGS: 'multi-project-feature-flags', // owner: @jurajmajerik #team-feature-success NETWORK_PAYLOAD_CAPTURE: 'network-payload-capture', // owner: #team-monitoring + INSIGHT_HORIZONTAL_CONTROLS: 'insight-horizontal-controls', // owner: @benjackwhite } as const export type FeatureFlagKey = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS] diff --git a/frontend/src/queries/nodes/InsightViz/EditorFilterGroup.tsx b/frontend/src/queries/nodes/InsightViz/EditorFilterGroup.tsx index 436788cf406f4..2dd91a9794077 100644 --- a/frontend/src/queries/nodes/InsightViz/EditorFilterGroup.tsx +++ b/frontend/src/queries/nodes/InsightViz/EditorFilterGroup.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { Fragment, useState } from 'react' import type { InsightLogicProps, InsightModel, InsightEditorFilterGroup } from '~/types' import { LemonButton } from 'lib/lemon-ui/LemonButton' import { IconUnfoldLess, IconUnfoldMore } from 'lib/lemon-ui/icons' @@ -48,7 +48,7 @@ export function EditorFilterGroup({ insightProps, editorFilterGroup }: EditorFil ) } return ( -
+ : Label} info={tooltip} @@ -56,7 +56,7 @@ export function EditorFilterGroup({ insightProps, editorFilterGroup }: EditorFil > {Component ? : null} -
+ ) })}
diff --git a/frontend/src/queries/nodes/InsightViz/EditorFilters.scss b/frontend/src/queries/nodes/InsightViz/EditorFilters.scss index 01e9016fb7aa1..fb05255736d2e 100644 --- a/frontend/src/queries/nodes/InsightViz/EditorFilters.scss +++ b/frontend/src/queries/nodes/InsightViz/EditorFilters.scss @@ -1,76 +1,26 @@ @import '../../../styles/mixins'; .EditorFiltersWrapper { + --editor-panel-group-min-width: 20rem; + flex-shrink: 0; background: var(--bg-light); - container-type: inline-size; &:not(.EditorFiltersWrapper--embedded) { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; - margin-bottom: 1rem; } .EditorFilters { - > * + * { - margin-top: 1rem; - } - - @container (min-width: 768px) { - display: flex; - gap: 2rem; - - .EditorFilterGroup { - flex: 1; - width: 50%; - } - - > * + * { - margin-top: 0; - } - } - } - - &.EditorFiltersWrapper--singlecolumn { - border: none; - background: none; - padding: 0; - margin-right: 1rem; - container-type: normal; - - @include screen($xl) { - --editor-panel-width: max(25vw, 28rem); - - .EditorFilters { - width: var(--editor-panel-width); - display: block; - padding-right: 1rem; - } - } - - .EditorFilters { - flex-direction: column; - gap: 0; - - .EditorFilterGroup { - width: auto; - } - - > * + * { - margin-top: 1rem; - } - } - } - - &.EditorFiltersWrapper--embedded { - margin-right: 0; - - @include screen($xl) { - .EditorFilters { - width: 100%; - padding-right: 0; - } + display: flex; + flex-flow: row wrap; + gap: 1rem; + + .EditorFilterGroup { + flex: 1; + min-width: var(--editor-panel-group-min-width); + max-width: 100%; } } } diff --git a/frontend/src/queries/nodes/InsightViz/EditorFilters.tsx b/frontend/src/queries/nodes/InsightViz/EditorFilters.tsx index 204dd70b069c7..fce497328f8ef 100644 --- a/frontend/src/queries/nodes/InsightViz/EditorFilters.tsx +++ b/frontend/src/queries/nodes/InsightViz/EditorFilters.tsx @@ -20,7 +20,6 @@ import { LifecycleToggles } from './LifecycleToggles' import { GlobalAndOrFilters } from './GlobalAndOrFilters' import { TrendsSeries } from './TrendsSeries' import { TrendsSeriesLabel } from './TrendsSeriesLabel' -import { TrendsFormulaLabel } from './TrendsFormulaLabel' import { TrendsFormula } from './TrendsFormula' import { Breakdown } from './Breakdown' import { PathsEventsTypes } from 'scenes/insights/EditorFilters/PathsEventTypes' @@ -39,6 +38,7 @@ import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic' import './EditorFilters.scss' import { PathsHogQL } from 'scenes/insights/EditorFilters/PathsHogQL' +import { LemonBanner, Link } from '@posthog/lemon-ui' export interface EditorFiltersProps { query: InsightQueryNode @@ -62,6 +62,8 @@ export function EditorFilters({ query, showing, embedded }: EditorFiltersProps): breakdown, pathsFilter, querySource, + shouldShowSessionAnalysisWarning, + hasFormula, } = useValues(insightVizDataLogic(insightProps)) const { isStepsFunnel } = useValues(funnelDataLogic(insightProps)) @@ -141,10 +143,10 @@ export function EditorFilters({ query, showing, embedded }: EditorFiltersProps): label: isTrends ? TrendsSeriesLabel : undefined, component: TrendsSeries, }, - isTrends + isTrends && hasFormula ? { key: 'formula', - label: TrendsFormulaLabel, + label: 'Formula', component: TrendsFormula, } : null, @@ -281,12 +283,11 @@ export function EditorFilters({ query, showing, embedded }: EditorFiltersProps):
- {(isFunnels ? editorFilters : editorFilterGroups).map((editorFilterGroup) => ( + {editorFilterGroups.map((editorFilterGroup) => ( ))}
+ + {shouldShowSessionAnalysisWarning ? ( + + When using sessions and session properties, events without session IDs will be excluded from the + set of results.{' '} + Learn more about sessions. + + ) : null}
) diff --git a/frontend/src/queries/nodes/InsightViz/Insight.scss b/frontend/src/queries/nodes/InsightViz/Insight.scss deleted file mode 100644 index dec25f40432c6..0000000000000 --- a/frontend/src/queries/nodes/InsightViz/Insight.scss +++ /dev/null @@ -1,34 +0,0 @@ -.trends-insights-container { - position: relative; - min-height: min(calc(90vh - 16rem), 36rem); - display: flex; - justify-content: center; - - .LineGraph { - height: calc(100% - 1rem) !important; - } -} - -.funnel-insights-container { - border-radius: 0 0 var(--radius) var(--radius); - - &.non-empty-state { - min-height: 26rem; - position: relative; - margin-bottom: 0; - } - - .ant-table-wrapper { - margin-top: 0 !important; - } -} - -.funnel-significance-highlight { - display: inline-flex; - background: var(--primary); - color: var(--bg-light); - - .LemonIcon { - color: var(--bg-light); - } -} diff --git a/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx b/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx index 07e9d8b7e701a..37772a3c233e5 100644 --- a/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx +++ b/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx @@ -99,8 +99,11 @@ export function InsightDisplayConfig(): JSX.Element { (hasLegend && showLegend ? 1 : 0) return ( -
-
+
+
{!isRetention && ( @@ -138,7 +141,7 @@ export function InsightDisplayConfig(): JSX.Element { )}
-
+
{advancedOptions.length > 0 && ( diff --git a/frontend/src/queries/nodes/InsightViz/InsightViz.scss b/frontend/src/queries/nodes/InsightViz/InsightViz.scss new file mode 100644 index 0000000000000..a6197196fe264 --- /dev/null +++ b/frontend/src/queries/nodes/InsightViz/InsightViz.scss @@ -0,0 +1,151 @@ +.InsightViz { + display: flex; + flex-direction: column; + overflow: hidden; + gap: 1rem; + container-type: inline-size; + flex: 1; // important for when rendered within a flex parent + + &.InsightViz--horizontal { + flex-flow: row wrap; + align-items: start; + + .EditorFiltersWrapper { + width: 100%; + + @container (min-width: 768px) { + width: 30%; + min-width: 26rem; + max-width: 30rem; + } + } + } +} + +.InsightVizDisplay { + --insight-viz-min-height: calc(80vh - 6rem); + + display: flex; + flex-direction: column; + + .NotebookNode & { + height: 100%; + flex: 1; + } + + .InsightVizDisplay__content { + display: flex; + flex: 1; + position: relative; + flex-direction: column; + + &--with-legend { + flex-direction: row; + } + + .InsightVizDisplay__content__left { + display: flex; + flex-direction: column; + flex: 1; + position: relative; + width: 100%; + } + + .InsightVizDisplay__content__right { + flex-shrink: 1; + max-width: 45%; + max-height: var(--insight-viz-min-height); + width: fit-content; + margin: 1rem; + display: flex; + align-items: center; + } + } + + .InsightDisplayConfig { + border-bottom-width: 1px; + padding: 0.5rem; + } +} + +.RetentionContainer { + width: 100%; + display: flex; + flex-direction: column; + flex: 1; + + .RetentionContainer__graph { + flex: 1; + margin: 0.5rem; + } + + .RetentionContainer__table { + flex-shrink: 0; + } + + .LineGraph { + position: relative; + width: 100%; + min-height: 30vh; + } + + .NotebookNode & { + .LineGraph { + position: relative; + min-height: 100px; + } + } +} + +.TrendsInsight { + position: relative; + flex: 1; + margin: 0.5rem; + display: flex; + flex-direction: column; + min-height: var(--insight-viz-min-height); + + .NotebookNode & { + min-height: auto; + } + + &--ActionsTable, + &--WorldMap, + &--BoldNumber { + margin: 0; + min-height: auto; + } + + &--BoldNumber { + display: flex; + align-items: center; + justify-content: center; + } +} + +.FunnelInsight { + display: flex; + flex-direction: column; + flex: 1; + width: 100%; + + &--type-steps-vertical, + &--type-time_to_convert, + &--type-trends { + min-height: var(--insight-viz-min-height); + + .NotebookNode & { + min-height: auto; + } + } +} + +.funnel-significance-highlight { + display: inline-flex; + background: var(--primary); + color: var(--bg-light); + + .LemonIcon { + color: var(--bg-light); + } +} diff --git a/frontend/src/queries/nodes/InsightViz/InsightViz.tsx b/frontend/src/queries/nodes/InsightViz/InsightViz.tsx index 80c3c66ca3ab6..067002682f68f 100644 --- a/frontend/src/queries/nodes/InsightViz/InsightViz.tsx +++ b/frontend/src/queries/nodes/InsightViz/InsightViz.tsx @@ -9,15 +9,16 @@ import { dataNodeLogic, DataNodeLogicProps } from '../DataNode/dataNodeLogic' import { InsightVizNode } from '~/queries/schema' import { QueryContext } from '~/queries/types' -import { InsightContainer } from './InsightContainer' +import { InsightVizDisplay } from './InsightVizDisplay' import { EditorFilters } from './EditorFilters' import { InsightLogicProps, ItemMode } from '~/types' import { keyForInsightLogicProps } from 'scenes/insights/sharedUtils' import { getCachedResults } from './utils' import { useState } from 'react' -import './Insight.scss' +import './InsightViz.scss' import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic' +import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' /** The key for the dataNodeLogic mounted by an InsightViz for insight of insightProps */ export const insightVizDataNodeKey = (insightProps: InsightLogicProps): string => { @@ -56,6 +57,7 @@ export function InsightViz({ uniqueKey, query, setQuery, context, readOnly }: In const { insightMode } = useValues(insightSceneLogic) const isFunnels = isFunnelsQuery(query.source) + const isHorizontalAlways = useFeatureFlag('INSIGHT_HORIZONTAL_CONTROLS') const showIfFull = !!query.full const disableHeader = !(query.showHeader ?? showIfFull) @@ -72,16 +74,16 @@ export function InsightViz({ uniqueKey, query, setQuery, context, readOnly }: In
{!readOnly && ( )} -
- + { if (insightDataLoading) { return ( - <> -
- -
+
+ {!!timedOutQueryId && ( )} - +
) } @@ -134,7 +129,7 @@ export function InsightContainer({ case InsightType.LIFECYCLE: return case InsightType.FUNNELS: - return + return case InsightType.RETENTION: return case InsightType.PATHS: @@ -204,77 +199,61 @@ export function InsightContainer({ return null } + const showComputationMetadata = !disableLastComputation || !!samplingFactor + return ( <> - {shouldShowSessionAnalysisWarning ? ( -
- - When using sessions and session properties, events without session IDs will be excluded from the - set of results.{' '} - Learn more about sessions. - -
- ) : null} {/* These are filters that are reused between insight features. They each have generic logic that updates the url */} - } +
+ {disableHeader ? null : } {showingResults && ( -
- {isFunnels && ( -
- {/* negative margin-top so that the border is only visible when the rows wrap */} -
- {(!disableLastComputation || !!samplingFactor) && ( -
- -
+ <> + {(isFunnels || isPaths || showComputationMetadata) && ( +
+
+ {showComputationMetadata && ( + )} -
- -
-
- )} - {!isFunnels && (!disableLastComputation || !!samplingFactor) && ( -
-
- +
+ {isPaths && } + {isFunnels && }
- -
{isPaths ? : null}
)} - {BlockingEmptyState ? ( - BlockingEmptyState - ) : supportsDisplay && showLegend ? ( -
-
{renderActiveView()}
-
- -
-
- ) : ( - renderActiveView() - )} -
+
+ {BlockingEmptyState ? ( + BlockingEmptyState + ) : supportsDisplay && showLegend ? ( + <> +
{renderActiveView()}
+
+ +
+ + ) : ( + renderActiveView() + )} +
+ )} - +
{renderTable()} {!disableCorrelationTable && activeView === InsightType.FUNNELS && } diff --git a/frontend/src/queries/nodes/InsightViz/TrendsFormulaLabel.tsx b/frontend/src/queries/nodes/InsightViz/TrendsFormulaLabel.tsx deleted file mode 100644 index c694649f26c43..0000000000000 --- a/frontend/src/queries/nodes/InsightViz/TrendsFormulaLabel.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { useValues } from 'kea' -import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic' -import { EditorFilterProps } from '~/types' - -export function TrendsFormulaLabel({ insightProps }: EditorFilterProps): JSX.Element | null { - const { hasFormula } = useValues(insightVizDataLogic(insightProps)) - return hasFormula ? <>Formula : null -} diff --git a/frontend/src/scenes/dashboard/DashboardItems.tsx b/frontend/src/scenes/dashboard/DashboardItems.tsx index 92eac03b10ba5..546b142adf097 100644 --- a/frontend/src/scenes/dashboard/DashboardItems.tsx +++ b/frontend/src/scenes/dashboard/DashboardItems.tsx @@ -99,80 +99,59 @@ export function DashboardItems(): JSX.Element { > {tiles?.map((tile: DashboardTile) => { const { insight, text } = tile + + const commonTileProps = { + dashboardId: dashboard?.id, + showResizeHandles: dashboardMode === DashboardMode.Edit, + canResizeWidth: canResizeWidth, + showEditingControls: [ + DashboardPlacement.Dashboard, + DashboardPlacement.ProjectHomepage, + ].includes(placement), + moreButtons: canEditDashboard ? ( + setDashboardMode(DashboardMode.Edit, DashboardEventSource.MoreDropdown)} + status="stealth" + fullWidth + > + Edit layout (E) + + ) : null, + moveToDashboard: ({ id, name }: Pick) => { + if (!dashboard) { + throw new Error('must be on a dashboard to move this tile') + } + moveToDashboard(tile, dashboard.id, id, name) + }, + removeFromDashboard: () => removeTile(tile), + } + if (insight) { return ( updateTileColor(tile.id, color)} ribbonColor={tile.color} - removeFromDashboard={() => removeTile(tile)} refresh={() => refreshAllDashboardItems({ tiles: [tile], action: 'refresh_manual' })} rename={() => renameInsight(insight)} duplicate={() => duplicateInsight(insight)} - moveToDashboard={({ id, name }: Pick) => { - if (!dashboard) { - throw new Error('must be on a dashboard to move an insight') - } - moveToDashboard(tile, dashboard.id, id, name) - }} - showEditingControls={[ - DashboardPlacement.Dashboard, - DashboardPlacement.ProjectHomepage, - ].includes(placement)} showDetailsControls={placement != DashboardPlacement.Export} - moreButtons={ - canEditDashboard ? ( - - setDashboardMode(DashboardMode.Edit, DashboardEventSource.MoreDropdown) - } - status="stealth" - fullWidth - > - Edit layout (E) - - ) : null - } placement={placement} + {...commonTileProps} /> ) } if (text) { return ( removeTile(tile)} + textTile={tile} duplicate={() => duplicateTile(tile)} - moveToDashboard={({ id, name }: Pick) => { - if (!dashboard) { - throw new Error('must be on a dashboard to move a text tile') - } - moveToDashboard(tile, dashboard.id, id, name) - }} - moreButtons={ - canEditDashboard ? ( - - setDashboardMode(DashboardMode.Edit, DashboardEventSource.MoreDropdown) - } - status="stealth" - fullWidth - > - Edit layout (E) - - ) : null - } + {...commonTileProps} /> ) } diff --git a/frontend/src/scenes/experiments/Experiment.scss b/frontend/src/scenes/experiments/Experiment.scss index 762e1ad83b78a..e8f1d3c61391e 100644 --- a/frontend/src/scenes/experiments/Experiment.scss +++ b/frontend/src/scenes/experiments/Experiment.scss @@ -13,49 +13,6 @@ justify-content: space-between; } - .insights-graph-container { - margin-bottom: 1rem; - - .display-config-inner { - display: flex; - align-items: center; - justify-content: space-between; - overflow-x: auto; - } - - .ant-card-body { - padding: 0; - } - - .insights-graph-container-row { - .insights-graph-container-row-left { - width: 100%; - } - - .insights-graph-container-row-right { - width: 100%; - height: min(calc(90vh - 16rem), 36rem); // same as .trends-insights-container - max-width: 300px; - padding: 0 1rem 1rem 0; - display: flex; - align-items: center; - } - } - - .LineGraph { - width: calc(100% - 2rem); - height: calc(100% - 2rem) !important; - margin-top: 1rem; - } - } - - .insights-graph-header { - margin-top: 0 !important; - padding-left: 1rem; - padding-right: 1rem; - min-height: 48px; - } - .experiment-preview { margin-bottom: 1rem; border-bottom: 1px solid var(--border); diff --git a/frontend/src/scenes/experiments/ExperimentResult.tsx b/frontend/src/scenes/experiments/ExperimentResult.tsx index bf275975b6f5e..ccccf7c05a838 100644 --- a/frontend/src/scenes/experiments/ExperimentResult.tsx +++ b/frontend/src/scenes/experiments/ExperimentResult.tsx @@ -149,7 +149,7 @@ export function ExperimentResult(): JSX.Element { )} {experimentResults ? ( // :KLUDGE: using `insights-page` for proper styling, should rather adapt styles -
+
+ viz = + } else if (funnel_viz_type == FunnelVizType.TimeToConvert) { + viz = + } else if ((layout || FunnelLayout.vertical) === FunnelLayout.vertical) { + viz = + } else { + viz = } - if (funnel_viz_type == FunnelVizType.TimeToConvert) { - return - } - - if ((layout || FunnelLayout.vertical) === FunnelLayout.vertical) { - return - } - - return + return ( +
+ {viz} +
+ ) } diff --git a/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.scss b/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.scss index 79df64b8138d7..b4a3090c12a25 100644 --- a/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.scss +++ b/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.scss @@ -3,23 +3,16 @@ .FunnelBarChart { position: relative; width: 100%; - height: 26rem; + height: 100%; overflow: hidden; - - .InsightCard & { - height: 100%; - - table { - margin: 0.5rem 0 0; - } - } + flex: 1; table { --bar-width: 0.5rem; // This should be overriden from React --bar-row-height: 18rem; - margin: 0.5rem 1rem 0; width: 100%; + height: 100%; > tbody { > tr { diff --git a/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx b/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx index 8db62510709bb..a33c1b5cea4e7 100644 --- a/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx +++ b/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx @@ -18,18 +18,15 @@ interface FunnelBarChartCSSProperties extends React.CSSProperties { '--bar-row-height': string } -export function FunnelBarChart({ - inCardView, - showPersonsModal: showPersonsModalProp = true, -}: ChartParams): JSX.Element { +export function FunnelBarChart({ showPersonsModal: showPersonsModalProp = true }: ChartParams): JSX.Element { const { insightProps } = useValues(insightLogic) const { visibleStepsWithConversionMetrics } = useValues(funnelDataLogic(insightProps)) const { canOpenPersonModal } = useValues(funnelPersonsModalLogic(insightProps)) + const showPersonsModal = canOpenPersonModal && showPersonsModalProp + const vizRef = useFunnelTooltip(showPersonsModal) const [scrollRef, [isScrollableLeft, isScrollableRight]] = useScrollable() - const { height } = useResizeObserver({ ref: scrollRef }) - - const showPersonsModal = canOpenPersonModal && showPersonsModalProp + const { height } = useResizeObserver({ ref: vizRef }) const seriesCount = visibleStepsWithConversionMetrics[0]?.nested_breakdown?.length ?? 0 const barWidthPx = @@ -55,8 +52,6 @@ export function FunnelBarChart({ ? 96 : 192 - const vizRef = useFunnelTooltip(showPersonsModal) - const table = useMemo(() => { /** Average conversion time is only shown if it's known for at least one step. */ // != is intentional to catch undefined too @@ -109,16 +104,12 @@ export function FunnelBarChart({ ) }, [visibleStepsWithConversionMetrics, height]) - // negative margin-top so that the scrollable shadow is visible on the canvas label as well - const scrollableAdjustmentCanvasLabel = !inCardView && '-mt-12 pt-10' - return (
+
{steps.map((step, stepIndex) => { const basisStep = getReferenceStep(steps, stepReference, stepIndex) const previousStep = getReferenceStep(steps, FunnelStepReference.previous, stepIndex) diff --git a/frontend/src/scenes/funnels/FunnelHistogram.scss b/frontend/src/scenes/funnels/FunnelHistogram.scss index d07b541993718..e56336be344a7 100644 --- a/frontend/src/scenes/funnels/FunnelHistogram.scss +++ b/frontend/src/scenes/funnels/FunnelHistogram.scss @@ -1,4 +1,6 @@ -.funnel-histogram-outer-container { +.FunnelHistogram { + flex: 1; + &.scrollable { overflow-x: auto; } diff --git a/frontend/src/scenes/funnels/FunnelHistogram.tsx b/frontend/src/scenes/funnels/FunnelHistogram.tsx index 66d2cd1549d10..183db4a358fd9 100644 --- a/frontend/src/scenes/funnels/FunnelHistogram.tsx +++ b/frontend/src/scenes/funnels/FunnelHistogram.tsx @@ -25,7 +25,7 @@ export function FunnelHistogram(): JSX.Element | null { return (
humanFriendlyDuration(v, 2)} />
diff --git a/frontend/src/scenes/funnels/FunnelLineGraph.tsx b/frontend/src/scenes/funnels/FunnelLineGraph.tsx index 9c38acdc17a7b..4b1efe973b922 100644 --- a/frontend/src/scenes/funnels/FunnelLineGraph.tsx +++ b/frontend/src/scenes/funnels/FunnelLineGraph.tsx @@ -17,7 +17,7 @@ const LineGraphWrapper = ({ inCardView, children }: { inCardView?: boolean; chil return <>{children} } - return
{children}
+ return
{children}
} export function FunnelLineGraph({ diff --git a/frontend/src/scenes/insights/EditorFilters/PathsExclusions.tsx b/frontend/src/scenes/insights/EditorFilters/PathsExclusions.tsx index 7a38d4d004990..43b8f049772c1 100644 --- a/frontend/src/scenes/insights/EditorFilters/PathsExclusions.tsx +++ b/frontend/src/scenes/insights/EditorFilters/PathsExclusions.tsx @@ -4,6 +4,7 @@ import { pathsDataLogic } from 'scenes/paths/pathsDataLogic' import { EventPropertyFilter, PropertyFilterType, PropertyOperator, EditorFilterProps } from '~/types' import { PathItemFilters } from 'lib/components/PropertyFilters/PathItemFilters' +import { keyForInsightLogicProps } from 'scenes/insights/sharedUtils' export function PathsExclusions({ insightProps }: EditorFilterProps): JSX.Element { const { pathsFilter, taxonomicGroupTypes } = useValues(pathsDataLogic(insightProps)) @@ -13,7 +14,7 @@ export function PathsExclusions({ insightProps }: EditorFilterProps): JSX.Elemen return ( on any of the next {dateOptionPlurals[period ?? 'Day']}. diff --git a/frontend/src/scenes/insights/Insight.scss b/frontend/src/scenes/insights/Insight.scss index 5ac69e14f709c..72c588db18842 100644 --- a/frontend/src/scenes/insights/Insight.scss +++ b/frontend/src/scenes/insights/Insight.scss @@ -1,75 +1,6 @@ @import '../../styles/mixins'; -.insights-page { - .insight-wrapper { - &.insight-wrapper--singlecolumn { - position: relative; - - @include screen($xl) { - display: flex; - overflow: hidden; - - .insights-container { - flex: 1; - overflow-x: auto; - } - } - } - } - - .insights-graph-container { - margin-bottom: 1rem; - - .ant-card-head { - border-bottom: 1px solid var(--border); - min-height: unset; - background-color: var(--bg-light); - padding-left: 1rem; - padding-right: 1rem; - - .ant-card-head-title { - padding: 0; - } - } - - .ant-card-body { - padding: 0; - } - - .insights-graph-container-row { - .insights-graph-container-row-left { - width: 100%; - } - - .insights-graph-container-row-right { - height: min(calc(90vh - 16rem), 36rem); // same as .trends-insights-container - max-width: 45%; - min-width: 300px; - width: fit-content; - padding: 0 1rem 1rem 0; - display: flex; - align-items: center; - } - } - - .LineGraph { - // hacky because container not respecting position: relative; - width: calc(100% - 3rem); - height: calc(100% - 3rem); - } - } - - .insight-title-container { - display: flex; - align-items: center; - - .insight-title-text { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - } - +.Insight { .retention-date-picker { background-color: transparent; border: 0; @@ -78,14 +9,6 @@ color: var(--default); } } - - .insights-graph-header { - margin-top: 0 !important; - margin-bottom: 0 !important; - padding-left: 1rem; - padding-right: 1rem; - min-height: 48px; - } } .insight-metadata-tags { diff --git a/frontend/src/scenes/insights/Insight.tsx b/frontend/src/scenes/insights/Insight.tsx index 49d71470b3027..e7a88e959f8bd 100644 --- a/frontend/src/scenes/insights/Insight.tsx +++ b/frontend/src/scenes/insights/Insight.tsx @@ -57,7 +57,7 @@ export function Insight({ insightId }: InsightSceneProps): JSX.Element { return ( -
+
{insightMode === ItemMode.Edit && } diff --git a/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx b/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx index 500e492003132..f77c23537e581 100644 --- a/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx +++ b/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx @@ -95,9 +95,12 @@ export const insightNavLogic = kea([ }), }, ], - userSelectedView: { - setActiveView: (_, { view }) => view, - }, + userSelectedView: [ + null as InsightType | null, + { + setActiveView: (_, { view }) => view, + }, + ], }), selectors({ activeView: [ diff --git a/frontend/src/scenes/insights/InsightTooltip/InsightTooltip.tsx b/frontend/src/scenes/insights/InsightTooltip/InsightTooltip.tsx index 93d7fa2653e4d..8025d203d7d5e 100644 --- a/frontend/src/scenes/insights/InsightTooltip/InsightTooltip.tsx +++ b/frontend/src/scenes/insights/InsightTooltip/InsightTooltip.tsx @@ -54,14 +54,12 @@ function renderDatumToTableCell( // Value can be undefined if the datum's series doesn't have ANY value for the breakdown value being rendered return (
- { - color && ( - // eslint-disable-next-line react/forbid-dom-props - - ● - - ) /* eslint-disable-line react/forbid-dom-props */ - } + {color && ( + // eslint-disable-next-line react/forbid-dom-props + + ● + + )} {datumValue !== undefined ? formatAggregationValue(datumMathProperty, datumValue, renderCount, formatPropertyValueForDisplay) : '–'} @@ -156,7 +154,7 @@ export function InsightTooltip({ seriesColumnData?.count, formatPropertyValueForDisplay, renderCount, - seriesColumnData.color + seriesColumnData?.color ) }, }) diff --git a/frontend/src/scenes/insights/InsightTooltip/insightTooltipUtils.tsx b/frontend/src/scenes/insights/InsightTooltip/insightTooltipUtils.tsx index 387a00ad9fd84..6794d6a112827 100644 --- a/frontend/src/scenes/insights/InsightTooltip/insightTooltipUtils.tsx +++ b/frontend/src/scenes/insights/InsightTooltip/insightTooltipUtils.tsx @@ -128,6 +128,9 @@ export function invertDataSource(seriesData: SeriesDatum[]): InvertedSeriesDatum const datumKey = `${s.breakdown_value}-${s.compare_label}` if (datumKey in flattenedData) { flattenedData[datumKey].seriesData.push(s) + flattenedData[datumKey].seriesData = flattenedData[datumKey].seriesData.sort( + (a, b) => (b.action?.order ?? b.dataIndex) - (a.action?.order ?? a.dataIndex) + ) } else { flattenedData[datumKey] = { id: datumKey, diff --git a/frontend/src/scenes/insights/Insights.stories.tsx b/frontend/src/scenes/insights/Insights.stories.tsx index e21a3342167e4..1c8a87112cf04 100644 --- a/frontend/src/scenes/insights/Insights.stories.tsx +++ b/frontend/src/scenes/insights/Insights.stories.tsx @@ -84,6 +84,15 @@ TrendsLineBreakdownEdit.parameters = { testOptions: { waitForSelector: '[data-attr=trend-line-graph] > canvas' }, } +export const TrendsLineBreakdownLabels: Story = createInsightStory( + require('../../mocks/fixtures/api/projects/team_id/insights/trendsLineBreakdown.json'), + 'view', + true +) +TrendsLineBreakdownLabels.parameters = { + testOptions: { waitForSelector: '[data-attr=trend-line-graph] > canvas' }, +} + export const TrendsBar: Story = createInsightStory( require('../../mocks/fixtures/api/projects/team_id/insights/trendsBar.json') ) @@ -222,6 +231,13 @@ TrendsPieBreakdownEdit.parameters = { testOptions: { waitForSelector: '[data-attr=trend-pie-graph] > canvas' }, } +export const TrendsPieBreakdownLabels: Story = createInsightStory( + require('../../mocks/fixtures/api/projects/team_id/insights/trendsPieBreakdown.json'), + 'view', + true +) +TrendsPieBreakdownLabels.parameters = { testOptions: { waitForSelector: '[data-attr=trend-pie-graph] > canvas' } } + export const TrendsWorldMap: Story = createInsightStory( require('../../mocks/fixtures/api/projects/team_id/insights/trendsWorldMap.json') ) diff --git a/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx b/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx index 7326a262550eb..016ae3005bc2b 100644 --- a/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx +++ b/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx @@ -9,7 +9,8 @@ import { StoryFn } from '@storybook/react' let shortCounter = 0 export function createInsightStory( insight: Partial, - mode: 'view' | 'edit' = 'view' + mode: 'view' | 'edit' = 'view', + showLegend: boolean = false ): StoryFn { const count = shortCounter++ return function InsightStory() { @@ -21,7 +22,15 @@ export function createInsightStory( ctx.json({ count: 1, results: [ - { ...insight, short_id: `${insight.short_id}${count}`, id: (insight.id ?? 0) + 1 + count }, + { + ...insight, + short_id: `${insight.short_id}${count}`, + id: (insight.id ?? 0) + 1 + count, + filters: { + ...insight.filters, + show_legend: showLegend, + }, + }, ], }), ], diff --git a/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.scss b/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.scss index b43f8c6bb0712..0691356cacf30 100644 --- a/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.scss +++ b/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.scss @@ -3,7 +3,11 @@ .BoldNumber { width: 100%; padding: 2rem 0 3rem; - text-align: center; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + flex: 1; @include screen($md) { padding: 3rem 0 5rem; diff --git a/frontend/src/scenes/insights/views/Funnels/FunnelInsight.tsx b/frontend/src/scenes/insights/views/Funnels/FunnelInsight.tsx deleted file mode 100644 index 6e44fe2dee2b6..0000000000000 --- a/frontend/src/scenes/insights/views/Funnels/FunnelInsight.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import clsx from 'clsx' -import { useValues } from 'kea' -import { Funnel } from 'scenes/funnels/Funnel' -import { insightLogic } from 'scenes/insights/insightLogic' -import { funnelDataLogic } from 'scenes/funnels/funnelDataLogic' -import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic' - -export function FunnelInsight(): JSX.Element { - const { insightLoading, insightProps } = useValues(insightLogic) - const { isFunnelWithEnoughSteps } = useValues(insightVizDataLogic(insightProps)) - const { hasFunnelResults } = useValues(funnelDataLogic(insightProps)) - - const nonEmptyState = (hasFunnelResults && isFunnelWithEnoughSteps) || insightLoading - - return ( -
- -
- ) -} diff --git a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.scss b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.scss index 2d59cd226cc7a..1ce975beb6fd1 100644 --- a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.scss +++ b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.scss @@ -1,12 +1,3 @@ -.insights-table.LemonTable--embedded { - border-top: 1px solid var(--border); -} - -.InsightCard .insights-table { - min-height: 100%; - border-top: none; -} - .series-name-wrapper-col { display: flex; align-items: center; diff --git a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx index bf0c656c7135e..4af3720692485 100644 --- a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx +++ b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx @@ -229,7 +229,6 @@ export function InsightsTable({ loading={insightDataLoading} emptyState="No insight results" data-attr="insights-table-graph" - className="insights-table" useURLForSorting={insightMode !== ItemMode.Edit} rowRibbonColor={isLegend ? (item) => getSeriesColor(item.seriesIndex, compare || false) : undefined} firstColumnSticky diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx index 51576c2496ec9..dd8cb8a418aa7 100644 --- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx +++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx @@ -221,7 +221,6 @@ export interface LineGraphProps { inSharedMode?: boolean showPersonsModal?: boolean tooltip?: TooltipConfig - inCardView?: boolean inSurveyView?: boolean isArea?: boolean incompletenessOffsetFromEnd?: number // Number of data points at end of dataset to replace with a dotted line. Only used in line graphs. @@ -255,7 +254,6 @@ export function LineGraph_({ ['data-attr']: dataAttr, showPersonsModal = true, compare = false, - inCardView, inSurveyView, isArea = false, incompletenessOffsetFromEnd = -1, @@ -297,7 +295,6 @@ export function LineGraph_({ const isBackgroundBasedGraphType = [GraphType.Bar, GraphType.HorizontalBar].includes(type) const isPercentStackView = !!supportsPercentStackView && !!showPercentStackView const showAnnotations = isTrends && !isHorizontal && !hideAnnotations - const shouldAutoResize = isHorizontal && !inCardView // Remove tooltip element on unmount useEffect(() => { @@ -689,14 +686,6 @@ export function LineGraph_({ const height = dynamicHeight const parentNode: any = scale.chart?.canvas?.parentNode parentNode.style.height = `${height}px` - } else if (shouldAutoResize) { - // automatically resize the chart container to fit the number of rows - const MIN_HEIGHT = 575 - const ROW_HEIGHT = 16 - const dynamicHeight = scale.ticks.length * ROW_HEIGHT - const height = Math.max(dynamicHeight, MIN_HEIGHT) - const parentNode: any = scale.chart?.canvas?.parentNode - parentNode.style.height = `${height}px` } else { // display only as many bars, as we can fit labels scale.max = scale.ticks.length @@ -706,7 +695,7 @@ export function LineGraph_({ ticks: { ...tickOptions, precision, - autoSkip: !shouldAutoResize, + autoSkip: true, callback: function _renderYLabel(_, i) { const labelDescriptors = [ datasets?.[0]?.actions?.[i]?.custom_name ?? datasets?.[0]?.actions?.[i]?.name, // action name @@ -736,10 +725,7 @@ export function LineGraph_({ }, [datasets, hiddenLegendKeys, isDarkModeOn, trendsFilter, formula, showValueOnSeries, showPercentStackView]) return ( -
+
{showAnnotations && myLineChart && chartWidth && chartHeight ? ( +
attrs.query.kind === NodeKind.DataTableNode, + resizeable: true, startExpanded: true, attributes: { query: { diff --git a/frontend/src/scenes/notebooks/Notebook/Notebook.scss b/frontend/src/scenes/notebooks/Notebook/Notebook.scss index 5f7893e770de2..1ba202f5a0348 100644 --- a/frontend/src/scenes/notebooks/Notebook/Notebook.scss +++ b/frontend/src/scenes/notebooks/Notebook/Notebook.scss @@ -264,4 +264,13 @@ span::selection { color: var(--primary); } + + // Overrides for insight controls + + .InsightVizDisplay { + .InsightDisplayConfig { + padding: 0; + border-bottom-width: 0; + } + } } diff --git a/frontend/src/scenes/retention/RetentionContainer.scss b/frontend/src/scenes/retention/RetentionContainer.scss deleted file mode 100644 index 3f450fa32e890..0000000000000 --- a/frontend/src/scenes/retention/RetentionContainer.scss +++ /dev/null @@ -1,20 +0,0 @@ -.RetentionContainer { - width: 100%; -} - -// Here we override based on retention-container the graph-container styling, so -// as to not change the global styling. We need the extra nesting to ensure we -// are more specific than the other insights css -.insights-page { - .insights-graph-container { - .RetentionContainer { - .LineGraph { - position: relative; - margin-top: 0.5rem; - margin-bottom: 1rem; - height: 300px; - width: 100%; - } - } - } -} diff --git a/frontend/src/scenes/retention/RetentionContainer.tsx b/frontend/src/scenes/retention/RetentionContainer.tsx index e12deb74dbf10..5cc0d78bb0bf4 100644 --- a/frontend/src/scenes/retention/RetentionContainer.tsx +++ b/frontend/src/scenes/retention/RetentionContainer.tsx @@ -1,6 +1,5 @@ import { RetentionLineGraph } from './RetentionLineGraph' import { RetentionTable } from './RetentionTable' -import './RetentionContainer.scss' import { LemonDivider } from '@posthog/lemon-ui' import { RetentionModal } from './RetentionModal' @@ -12,14 +11,16 @@ export function RetentionContainer({ inSharedMode?: boolean }): JSX.Element { return ( -
+
{inCardView ? ( ) : ( <> - +
+ +
-
+
diff --git a/frontend/src/scenes/trends/Trends.tsx b/frontend/src/scenes/trends/Trends.tsx index 8938d477173f1..4e2cb0879ee83 100644 --- a/frontend/src/scenes/trends/Trends.tsx +++ b/frontend/src/scenes/trends/Trends.tsx @@ -61,19 +61,7 @@ export function TrendInsight({ view, context }: Props): JSX.Element { return ( <> - {series && ( -
- {renderViz()} -
- )} + {series &&
{renderViz()}
} {display !== ChartDisplayType.WorldMap && // the world map doesn't need this cta breakdown && loadMoreBreakdownUrl && ( diff --git a/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx b/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx index 017bde1423b7a..dfd1ce105f617 100644 --- a/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx +++ b/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx @@ -15,7 +15,7 @@ import { trendsDataLogic } from '../trendsDataLogic' type DataSet = any -export function ActionsHorizontalBar({ inCardView, showPersonsModal = true }: ChartParams): JSX.Element | null { +export function ActionsHorizontalBar({ showPersonsModal = true }: ChartParams): JSX.Element | null { const [data, setData] = useState(null) const [total, setTotal] = useState(0) @@ -80,7 +80,6 @@ export function ActionsHorizontalBar({ inCardView, showPersonsModal = true }: Ch trendsFilter={trendsFilter} formula={formula} showValueOnSeries={showValueOnSeries} - inCardView={inCardView} onClick={ !showPersonsModal || trendsFilter?.formula ? undefined diff --git a/frontend/src/scenes/trends/viz/ActionsPie.scss b/frontend/src/scenes/trends/viz/ActionsPie.scss index 779ebf8864291..47af0778a00bd 100644 --- a/frontend/src/scenes/trends/viz/ActionsPie.scss +++ b/frontend/src/scenes/trends/viz/ActionsPie.scss @@ -1,23 +1,25 @@ -.actions-pie-component { - min-width: 33%; +.ActionsPie { + flex: 1; + width: 100%; height: 100%; + display: flex; + flex-direction: row; + gap: 0.5rem; - // No padding at the top because usually there's whitespace between "Computed ..." and "Show legend" - // More padding at the bottom to give the number some breathing room - padding: 0 1rem 2rem; + .ActionsPie__component { + min-width: 33%; + flex: 1; + padding: 1rem; - .InsightCard & { - padding-top: 1rem; - } - - .pie-chart { - position: relative; - width: 100%; - height: calc(100% - 4.5rem); // 4.5rem is the height of the number below the chart - transition: height 0.5s; - } + .ActionsPie__chart { + position: relative; + width: 100%; + height: calc(100% - 4.5rem); // 4.5rem is the height of the number below the chart + transition: height 0.5s; + } - h3 { - letter-spacing: -0.025em; + h3 { + letter-spacing: -0.025em; + } } } diff --git a/frontend/src/scenes/trends/viz/ActionsPie.tsx b/frontend/src/scenes/trends/viz/ActionsPie.tsx index 01a53d16dbc3a..286f76650c55b 100644 --- a/frontend/src/scenes/trends/viz/ActionsPie.tsx +++ b/frontend/src/scenes/trends/viz/ActionsPie.tsx @@ -10,7 +10,6 @@ import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo' import { urlsForDatasets } from '../persons-modal/persons-modal-utils' import { PieChart } from 'scenes/insights/views/LineGraph/PieChart' import { InsightLegend } from 'lib/components/InsightLegend/InsightLegend' -import clsx from 'clsx' import { cohortsModel } from '~/models/cohortsModel' import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel' import { formatBreakdownLabel } from 'scenes/insights/utils' @@ -72,15 +71,9 @@ export function ActionsPie({ inSharedMode, inCardView, showPersonsModal = true } return data ? ( data[0] && data[0].labels ? ( -
-
-
+
+
+
Any: + # https://docs.sentry.io/platforms/python/troubleshooting/#addressing-concurrency-issues + with Hub(Hub.current): + set_tag("temporal.execution_type", "activity") + set_tag("module", input.fn.__module__ + "." + input.fn.__qualname__) + + activity_info = activity.info() + _set_common_workflow_tags(activity_info) + set_tag("temporal.activity.id", activity_info.activity_id) + set_tag("temporal.activity.type", activity_info.activity_type) + set_tag("temporal.activity.task_queue", activity_info.task_queue) + set_tag("temporal.workflow.namespace", activity_info.workflow_namespace) + set_tag("temporal.workflow.run_id", activity_info.workflow_run_id) + try: + return await super().execute_activity(input) + except Exception as e: + if len(input.args) == 1 and is_dataclass(input.args[0]): + team_id = getattr(input.args[0], "team_id", None) + if team_id: + set_tag("team_id", team_id) + set_context("temporal.activity.info", activity.info().__dict__) + capture_exception() + raise e + + +class _SentryWorkflowInterceptor(WorkflowInboundInterceptor): + async def execute_workflow(self, input: ExecuteWorkflowInput) -> Any: + # https://docs.sentry.io/platforms/python/troubleshooting/#addressing-concurrency-issues + with Hub(Hub.current): + set_tag("temporal.execution_type", "workflow") + set_tag("module", input.run_fn.__module__ + "." + input.run_fn.__qualname__) + workflow_info = workflow.info() + _set_common_workflow_tags(workflow_info) + set_tag("temporal.workflow.task_queue", workflow_info.task_queue) + set_tag("temporal.workflow.namespace", workflow_info.namespace) + set_tag("temporal.workflow.run_id", workflow_info.run_id) + try: + return await super().execute_workflow(input) + except Exception as e: + if len(input.args) == 1 and is_dataclass(input.args[0]): + team_id = getattr(input.args[0], "team_id", None) + if team_id: + set_tag("team_id", team_id) + set_context("temporal.workflow.info", workflow.info().__dict__) + + if not workflow.unsafe.is_replaying(): + with workflow.unsafe.sandbox_unrestricted(): + capture_exception() + raise e + + +class SentryInterceptor(Interceptor): + """Temporal Interceptor class which will report workflow & activity exceptions to Sentry""" + + def intercept_activity(self, next: ActivityInboundInterceptor) -> ActivityInboundInterceptor: + """Implementation of + :py:meth:`temporalio.worker.Interceptor.intercept_activity`. + """ + return _SentryActivityInboundInterceptor(super().intercept_activity(next)) + + def workflow_interceptor_class( + self, input: WorkflowInterceptorClassInput + ) -> Optional[Type[WorkflowInboundInterceptor]]: + return _SentryWorkflowInterceptor diff --git a/posthog/temporal/worker.py b/posthog/temporal/worker.py index 81cc28cdfd685..05666379e45c6 100644 --- a/posthog/temporal/worker.py +++ b/posthog/temporal/worker.py @@ -7,6 +7,7 @@ from posthog.temporal.client import connect from posthog.temporal.workflows import ACTIVITIES, WORKFLOWS +from posthog.temporal.sentry import SentryInterceptor async def start_worker( @@ -36,6 +37,7 @@ async def start_worker( activities=ACTIVITIES, workflow_runner=UnsandboxedWorkflowRunner(), graceful_shutdown_timeout=timedelta(minutes=5), + interceptors=[SentryInterceptor()], ) # catch the TERM signal, and stop the worker gracefully