OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
fix(dashboard): chart colours and muted axis labels render again (#643)
Carl-Gerhard Lindesvärd130d9c0dd03e
diff --git a/apps/start/e2e/overview-siblings.spec.ts b/apps/start/e2e/overview-siblings.spec.tsindex 0291c211b..7c261d1e1 100644--- a/apps/start/e2e/overview-siblings.spec.ts+++ b/apps/start/e2e/overview-siblings.spec.ts@@ -30,16 +30,14 @@ for (const projectId of PROJECT_IDS) {await page.setViewportSize({ width: 1440, height: 1000 });await page.goto(`/acme/${projectId}/realtime`);- for (const title of [- 'Unique visitors last 30 min',- 'Geo',- 'Referrals',- 'Paths',- ]) {+ for (const title of ['Online now', 'Last 30 minutes', 'New sessions']) {await expect(page.getByText(title, { exact: true }).locator('visible=true').first()).toBeVisible();}+ await expect(+ page.getByRole('region', { name: 'Events', exact: true })+ ).toBeVisible();await page.waitForLoadState('networkidle');await page.waitForTimeout(2000);await shot(page, `siblings-${projectId}-realtime`);@@ -69,7 +67,9 @@ for (const projectId of PROJECT_IDS) {await expect(page.getByRole('heading', { name: 'Insights', level: 1 })).toBeVisible();- await expect(page.getByPlaceholder('Search insights...')).toBeVisible();+ await expect(+ page.getByPlaceholder('Search insights', { exact: true })+ ).toBeVisible();await page.waitForLoadState('networkidle');await shot(page, `siblings-${projectId}-insights`);await expect(page.locator('body')).not.toContainText(@@ -129,25 +129,29 @@ test('insights: filters keep their state in the URL and the empty state is shownpage.getByRole('heading', { name: 'Insights', level: 1 })).toBeVisible();await page.waitForLoadState('networkidle');- await page.getByPlaceholder('Search insights...').fill('google');+ await page+ .getByPlaceholder('Search insights', { exact: true })+ .fill('google');await expect(page).toHaveURL(/search=google/);for (const [trigger, option] of [- ['All Windows', '7 Days'],- ['All Severity', 'Severe'],- ['All Directions', 'Increasing'],+ ['Time window', '7 days'],+ ['Severity', 'Severe'],+ ['Direction', 'Increasing'],] as const) {await page- .getByRole('combobox')- .filter({ hasText: new RegExp(trigger, 'i') })+ .getByRole('button', { name: new RegExp(`^${trigger}:`) }).click();- await page.getByRole('option', { name: option, exact: true }).click();+ await page.getByRole('menuitem', { name: option, exact: true }).click();}+ await expect(page).toHaveURL(/window=rolling_7d/);+ await expect(page).toHaveURL(/severity=severe/);+ await expect(page).toHaveURL(/direction=up/);await shot(page, 'siblings-insights-filtered', false);const url = page.url();await page.reload();- await expect(page.getByPlaceholder('Search insights...')).toHaveValue(- 'google'- );+ await expect(+ page.getByPlaceholder('Search insights', { exact: true })+ ).toHaveValue('google');expect(new URL(page.url()).search).toBe(new URL(url).search);});diff --git a/apps/start/src/styles.css b/apps/start/src/styles.cssindex 149a8f0c4..66b17f1e4 100644--- a/apps/start/src/styles.css+++ b/apps/start/src/styles.css@@ -531,26 +531,19 @@ button {}@theme inline {- --color-chart-1: var(----chart-1);- --color-chart-2: var(----chart-2);- --color-chart-3: var(----chart-3);- --color-chart-4: var(----chart-4);- --color-chart-5: var(----chart-5);- --color-chart-background: var(----chart-background);- --color-chart-foreground: var(----chart-foreground);- --color-chart-foreground-muted: var(----chart-foreground-muted);- --chart-line-primary: var(----chart-line-primary);- --chart-line-secondary: var(----chart-line-secondary);- --color-chart-crosshair: var(----chart-crosshair);- --color-chart-grid: var(----chart-grid);+ --color-chart-background: var(--chart-background);+ --color-chart-foreground: var(--chart-foreground);+ --color-chart-foreground-muted: var(--chart-foreground-muted);+ --color-chart-crosshair: var(--chart-crosshair);+ --color-chart-grid: var(--chart-grid);--color-chart-tooltip-background: var(--chart-tooltip-background);--color-chart-tooltip-foreground: var(--chart-tooltip-foreground);--color-chart-tooltip-muted: var(--chart-tooltip-muted);- --color-chart-marker-background: var(----chart-marker-background);- --color-chart-marker-border: var(----chart-marker-border);- --color-chart-marker-foreground: var(----chart-marker-foreground);- --color-chart-ring-background: var(----chart-ring-background);- --color-chart-label: var(----chart-label);+ --color-chart-marker-background: var(--chart-marker-background);+ --color-chart-marker-border: var(--chart-marker-border);+ --color-chart-marker-foreground: var(--chart-marker-foreground);+ --color-chart-ring-background: var(--chart-ring-background);+ --color-chart-label: var(--chart-label);}/* Dashboard grid: only tiles making room animate; the one under the pointer