Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

web: ui improvements for report edit mode

Carl-Gerhard Lindesvärdc175707be41d
diff --git a/apps/web/package.json b/apps/web/package.json
index 0d8506372..17d935505 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -40,6 +40,7 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cmdk": "^0.2.0",
+ "lottie-react": "^2.4.0",
"lucide-react": "^0.286.0",
"mitt": "^3.0.1",
"next": "13.4",
diff --git a/apps/web/src/components/report/ReportSaveButton.tsx b/apps/web/src/components/report/ReportSaveButton.tsx
index fa5104bb5..2465d3f61 100644
--- a/apps/web/src/components/report/ReportSaveButton.tsx
+++ b/apps/web/src/components/report/ReportSaveButton.tsx
@@ -1,6 +1,5 @@
import { Button } from '@/components/ui/button';
import { toast } from '@/components/ui/use-toast';
-import { useOrganizationParams } from '@/hooks/useOrganizationParams';
import { pushModal } from '@/modals';
import { useSelector } from '@/redux';
import { api, handleError } from '@/utils/api';
@@ -9,7 +8,6 @@ import { SaveIcon } from 'lucide-react';
import { useReportId } from './hooks/useReportId';
export function ReportSaveButton() {
- const params = useOrganizationParams();
const { reportId } = useReportId();
const update = api.report.update.useMutation({
onSuccess() {
@@ -25,6 +23,7 @@ export function ReportSaveButton() {
if (reportId) {
return (
<Button
+ disabled={!report.dirty}
loading={update.isLoading}
onClick={() => {
update.mutate({
@@ -40,6 +39,7 @@ export function ReportSaveButton() {
} else {
return (
<Button
+ disabled={!report.dirty}
onClick={() => {
pushModal('SaveReport', {
report,
diff --git a/apps/web/src/components/report/chart/ChartAnimation.tsx b/apps/web/src/components/report/chart/ChartAnimation.tsx
new file mode 100644
index 000000000..9c377f3a1
--- /dev/null
+++ b/apps/web/src/components/report/chart/ChartAnimation.tsx
@@ -0,0 +1,17 @@
+import airplane from '@/lottie/airplane.json';
+import ballon from '@/lottie/ballon.json';
+import type { LottieComponentProps } from 'lottie-react';
+import Lottie from 'lottie-react';
+
+const animations = {
+ airplane,
+ ballon,
+};
+type Animations = keyof typeof animations;
+
+export const ChartAnimation = ({
+ name,
+ ...props
+}: Omit<LottieComponentProps, 'animationData'> & {
+ name: Animations;
+}) => <Lottie animationData={animations[name]} loop={true} {...props} />;
diff --git a/apps/web/src/components/report/chart/ReportLineChart.tsx b/apps/web/src/components/report/chart/ReportLineChart.tsx
index 749d200d0..f0da61952 100644
--- a/apps/web/src/components/report/chart/ReportLineChart.tsx
+++ b/apps/web/src/components/report/chart/ReportLineChart.tsx
@@ -47,7 +47,7 @@ export function ReportLineChart({ interval, data }: ReportLineChartProps) {
width={width}
height={Math.min(Math.max(width * 0.5, 250), 400)}
>
- <YAxis dataKey={'count'} width={30} fontSize={12}></YAxis>
+ <YAxis dataKey={'count'} fontSize={12}></YAxis>
<Tooltip content={<ReportLineChartTooltip />} />
<CartesianGrid strokeDasharray="3 3" />
<XAxis
diff --git a/apps/web/src/components/report/chart/index.tsx b/apps/web/src/components/report/chart/index.tsx
index b8347b0dd..5b0039657 100644
--- a/apps/web/src/components/report/chart/index.tsx
+++ b/apps/web/src/components/report/chart/index.tsx
@@ -3,6 +3,7 @@ import { useOrganizationParams } from '@/hooks/useOrganizationParams';
import type { IChartInput } from '@/types';
import { api } from '@/utils/api';
+import { ChartAnimation } from './ChartAnimation';
import { withChartProivder } from './ChartProvider';
import { ReportBarChart } from './ReportBarChart';
import { ReportLineChart } from './ReportLineChart';
@@ -22,6 +23,7 @@ export const Chart = memo(
const hasEmptyFilters = events.some((event) =>
event.filters.some((filter) => filter.value.length === 0)
);
+ const enabled = events.length > 0 && !hasEmptyFilters;
const chart = api.chart.chart.useQuery(
{
interval,
@@ -35,17 +37,19 @@ export const Chart = memo(
projectSlug: params.project,
},
{
- keepPreviousData: true,
- enabled: events.length > 0 && !hasEmptyFilters,
+ keepPreviousData: false,
+ enabled,
}
);
- console.log(chart.data);
-
const anyData = Boolean(chart.data?.series?.[0]?.data);
- if (chart.isFetching && !anyData) {
- return <p>Loading...</p>;
+ if (!enabled) {
+ return <p>Select events & filters to begin</p>;
+ }
+
+ if (chart.isFetching) {
+ return <ChartAnimation name="airplane" className="w-96 mx-auto" />;
}
if (chart.isError) {
@@ -53,11 +57,11 @@ export const Chart = memo(
}
if (!chart.isSuccess) {
- return <p>Loading...</p>;
+ return <ChartAnimation name="ballon" className="w-96 mx-auto" />;
}
if (!anyData) {
- return <p>No data</p>;
+ return <ChartAnimation name="ballon" className="w-96 mx-auto" />;
}
if (chartType === 'bar') {
diff --git a/apps/web/src/components/report/reportSlice.ts b/apps/web/src/components/report/reportSlice.ts
index d7ecfbd8d..4c1e01527 100644
--- a/apps/web/src/components/report/reportSlice.ts
+++ b/apps/web/src/components/report/reportSlice.ts
@@ -11,12 +11,14 @@ import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
type InitialState = IChartInput & {
+ dirty: boolean;
startDate: string | null;
endDate: string | null;
};
// First approach: define the initial state using that type
const initialState: InitialState = {
+ dirty: false,
name: 'screen_view',
chartType: 'linear',
interval: 'day',
@@ -39,10 +41,12 @@ export const reportSlice = createSlice({
...action.payload,
startDate: null,
endDate: null,
+ dirty: false,
};
},
// Events
addEvent: (state, action: PayloadAction<Omit<IChartEvent, 'id'>>) => {
+ state.dirty = true;
state.events.push({
id: alphabetIds[state.events.length]!,
...action.payload,
@@ -54,11 +58,13 @@ export const reportSlice = createSlice({
id: string;
}>
) => {
+ state.dirty = true;
state.events = state.events.filter(
(event) => event.id !== action.payload.id
);
},
changeEvent: (state, action: PayloadAction<IChartEvent>) => {
+ state.dirty = true;
state.events = state.events.map((event) => {
if (event.id === action.payload.id) {
return action.payload;
@@ -72,6 +78,7 @@ export const reportSlice = createSlice({
state,
action: PayloadAction<Omit<IChartBreakdown, 'id'>>
) => {
+ state.dirty = true;
state.breakdowns.push({
id: alphabetIds[state.breakdowns.length]!,
...action.payload,
@@ -83,11 +90,13 @@ export const reportSlice = createSlice({
id: string;
}>
) => {
+ state.dirty = true;
state.breakdowns = state.breakdowns.filter(
(event) => event.id !== action.payload.id
);
},
changeBreakdown: (state, action: PayloadAction<IChartBreakdown>) => {
+ state.dirty = true;
state.breakdowns = state.breakdowns.map((breakdown) => {
if (breakdown.id === action.payload.id) {
return action.payload;
@@ -98,11 +107,13 @@ export const reportSlice = createSlice({
// Interval
changeInterval: (state, action: PayloadAction<IInterval>) => {
+ state.dirty = true;
state.interval = action.payload;
},
// Chart type
changeChartType: (state, action: PayloadAction<IChartType>) => {
+ state.dirty = true;
state.chartType = action.payload;
if (
@@ -115,15 +126,18 @@ export const reportSlice = createSlice({
// Date range
changeStartDate: (state, action: PayloadAction<string>) => {
+ state.dirty = true;
state.startDate = action.payload;
},
// Date range
changeEndDate: (state, action: PayloadAction<string>) => {
+ state.dirty = true;
state.endDate = action.payload;
},
changeDateRanges: (state, action: PayloadAction<IChartRange>) => {
+ state.dirty = true;
state.range = action.payload;
if (action.payload === 0.3 || action.payload === 0.6) {
state.interval = 'minute';
diff --git a/apps/web/src/components/ui/button.tsx b/apps/web/src/components/ui/button.tsx
index af07ed21a..dad1731a6 100644
--- a/apps/web/src/components/ui/button.tsx
+++ b/apps/web/src/components/ui/button.tsx
@@ -3,7 +3,7 @@ import { cn } from '@/utils/cn';
import { Slot } from '@radix-ui/react-slot';
import { cva } from 'class-variance-authority';
import type { VariantProps } from 'class-variance-authority';
-import type { LucideIcon, LucideProps } from 'lucide-react';
+import type { LucideIcon } from 'lucide-react';
import { Loader2 } from 'lucide-react';
const buttonVariants = cva(
@@ -64,7 +64,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
- disabled={loading ?? disabled}
+ disabled={loading || disabled}
{...props}
>
{Icon && (
diff --git a/apps/web/src/lottie/airplane.json b/apps/web/src/lottie/airplane.json
new file mode 100644
index 000000000..925ed2f23
--- /dev/null
+++ b/apps/web/src/lottie/airplane.json
@@ -0,0 +1 @@
+{"v":"5.5.8","fr":50,"ip":0,"op":147,"w":800,"h":600,"nm":"Paperplane","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"planete Outlines - Group 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":38,"s":[50]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":88,"s":[50]},{"t":120,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[468.336,323.378,0],"to":[-29,0,0],"ti":[29,0,0]},{"t":102,"s":[294.336,323.378,0]}],"ix":2},"a":{"a":0,"k":[453.672,304.756,0],"ix":1},"s":{"a":0,"k":[50,50,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[6.742,0],[0.741,-0.14],[0,0.074],[13.484,0],[1.669,-0.361],[19.79,0],[3.317,-19.082],[2.691,0],[0,-13.484],[-0.048,-0.629],[2.405,0],[0,-6.742],[-6.742,0],[0,0],[0,6.743]],"o":[[-0.781,0],[0.001,-0.074],[0,-13.484],[-1.778,0],[-3.594,-18.742],[-20.03,0],[-2.421,-0.804],[-13.485,0],[0,0.642],[-1.89,-1.199],[-6.742,0],[0,6.743],[0,0],[6.742,0],[0,-6.742]],"v":[[75.134,16.175],[72.85,16.396],[72.856,16.175],[48.44,-8.241],[43.262,-7.685],[3.406,-40.591],[-36.571,-6.995],[-44.269,-8.241],[-68.685,16.175],[-68.604,18.079],[-75.133,16.175],[-87.341,28.383],[-75.133,40.592],[75.134,40.592],[87.342,28.383]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.815686334348,0.823529471603,0.827451040231,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[453.672,304.756],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":151,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Merged Shape Layer","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.547],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.845],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":77,"s":[35]},{"t":150,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[390.319,298.2,0],"to":[0,-2.583,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":44,"s":[390.319,282.7,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":110,"s":[390.319,319.25,0],"to":[0,0,0],"ti":[0,0,0]},{"t":150,"s":[390.319,298.2,0]}],"ix":2},"a":{"a":0,"k":[664.319,256.2,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[18.967,-3.189],[-18.967,19.935],[-0.949,-19.935]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.223528981209,0.192156970501,0.674510002136,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[236.879,292.737],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tr","p":{"a":0,"k":[633.939,275.369],"ix":2},"a":{"a":0,"k":[236.879,292.737],"ix":1},"s":{"a":0,"k":[50,50],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"planete Outlines - Group 1","np":1,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-98.335,64.79],[-105.619,4.984],[105.619,-64.79],[-80.316,24.919]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.278430998325,0.294117987156,0.847059011459,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[316.247,247.882],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tr","p":{"a":0,"k":[673.623,252.941],"ix":2},"a":{"a":0,"k":[316.247,247.882],"ix":1},"s":{"a":0,"k":[50,50],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"planete Outlines - Group 2","np":1,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-133.812,-42.171],[133.812,-75.141],[5.765,75.141],[-61.708,18.402],[124.227,-71.307],[-87.011,-1.534]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.365000009537,0.407999992371,0.976000010967,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[297.638,254.4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tr","p":{"a":0,"k":[664.319,256.2],"ix":2},"a":{"a":0,"k":[297.638,254.4],"ix":1},"s":{"a":0,"k":[50,50],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"planete Outlines - Group 3","np":1,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":151,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"planete Outlines - Group 5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":45,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":102,"s":[100]},{"t":150,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[327.38,267.583,0],"to":[25.833,0,0],"ti":[-25.833,0,0]},{"t":150,"s":[482.38,267.583,0]}],"ix":2},"a":{"a":0,"k":[171.76,193.166,0],"ix":1},"s":{"a":0,"k":[50,50,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[13.485,0],[4.38,-4.171],[21.913,0],[3.575,-18.765],[1.851,0],[0,-13.484],[-0.011,-0.291],[1.599,0],[0,-6.743],[-6.742,0],[0,0],[0,13.485]],"o":[[-6.526,0],[-0.793,-21.719],[-19.806,0],[-1.734,-0.391],[-13.485,0],[0,0.293],[-1.4,-0.559],[-6.742,0],[0,6.742],[0,0],[13.485,0],[0,-13.484]],"v":[[59.669,-8.242],[42.84,-1.506],[2.287,-40.592],[-37.576,-7.638],[-42.962,-8.242],[-67.378,16.174],[-67.356,17.049],[-71.878,16.174],[-84.086,28.383],[-71.878,40.591],[59.669,40.591],[84.086,16.174]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.816000007181,0.823999980852,0.827000038297,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[171.76,193.166],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":151,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Pre-comp 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[406,306,0],"ix":2},"a":{"a":0,"k":[400,300,0],"ix":1},"s":{"a":0,"k":[179,179,100],"ix":6}},"ao":0,"w":800,"h":600,"ip":0,"op":147,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/apps/web/src/lottie/ballon.json b/apps/web/src/lottie/ballon.json
new file mode 100644
index 000000000..f140f81f4
--- /dev/null
+++ b/apps/web/src/lottie/ballon.json
@@ -0,0 +1 @@
+{"v":"4.7.0","fr":29.9700012207031,"ip":0,"op":90.0000036657751,"w":720,"h":720,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 12","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[360,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":4,"nm":"eye","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[435.703,334.578,0]},"a":{"a":0,"k":[75.656,-25.094,0]},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":55,"s":[68.389,68.389,100],"e":[100,0,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":71,"s":[100,0,100],"e":[68.389,68.389,100]},{"t":90.0000036657751}]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20.563,20.563]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.6705883,0.6442907,0.6442907,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[75.656,-25.094],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":3,"ty":4,"nm":"out eye","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[359.953,360.328,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[27.5,27.5]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.9294118,0.8783852,0.8783852,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[75.75,-25.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":4,"ty":4,"nm":"duoi","ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":17,"s":[0],"e":[-32]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":47,"s":[-32],"e":[0]},{"t":76.0000030955435}]},"p":{"a":0,"k":[232.901,264.898,0]},"a":{"a":0,"k":[-146.691,-122.142,0]},"s":{"a":0,"k":[108.07,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.257,-29.886],[-0.011,0.582],[0,0],[-8.139,-12.838],[-17.886,27.356]],"o":[[0,0],[0.004,0.509],[0.5,-26.125],[0,0],[17.343,27.356],[8.5,-13]],"v":[[-95.5,-206.75],[-132.419,-164.682],[-132.209,-166.586],[-168.75,-202.5],[-167.25,-169],[-98.605,-168.936]],"c":true}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"fl","c":{"a":0,"k":[0.4745098,0.7490196,0.827451,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[-146.5,-122.5],"ix":2},"a":{"a":0,"k":[-131.308,-148.646],"ix":1},"s":{"a":0,"k":[72.59,72.59],"ix":3},"r":{"a":0,"k":-39.108,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":5,"ty":4,"nm":"a1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[360,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}],"e":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-67,61.5],[36.911,23.822],[147.5,0]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":15,"s":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-67,61.5],[36.911,23.822],[147.5,0]],"c":true}],"e":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":33,"s":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}],"e":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":49,"s":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}],"e":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-67,61.5],[36.911,23.822],[147.5,0]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":75,"s":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-67,61.5],[36.911,23.822],[147.5,0]],"c":true}],"e":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":89,"s":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}],"e":[{"i":[[81.462,0],[26.998,-29.979],[3.641,-5.283],[2.87,-5.56],[0,-24.352],[-49.64,11.681],[-39.551,-6.305],[-22.411,0.678],[0,64.505]],"o":[[-43.52,0],[-4.281,4.754],[-3.529,5.12],[-10.45,20.243],[0,57.766],[68.927,-16.219],[34.5,5.5],[59.831,-1.811],[0,-81.462]],"v":[[0,-147.5],[-107.887,-100.173],[-132.786,-102.352],[-131.148,-67.568],[-147.5,0],[-84.927,26.219],[-39,77.5],[36.911,23.822],[147.5,0]],"c":true}]},{"t":100.000004073084}]},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"fl","c":{"a":0,"k":[0.4737563,0.7483898,0.827451,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 8","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[360,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 7","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[360,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[1,0,0,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","c":{"a":0,"k":[0.929412,0.929412,0.929412,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[220,-157.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":8,"ty":4,"nm":"Shape Layer 6","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[360,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[1,0,0,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","c":{"a":0,"k":[0.929412,0.929412,0.929412,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":9,"ty":4,"nm":"Shape Layer 4","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[300.5,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[175,175]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":10,"ty":4,"nm":"Shape Layer 3","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[320,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[215,215]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.9254902,0.9254902,0.9254902,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":11,"ty":4,"nm":"Shape Layer 2","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[340.5,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[255,255]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.8862745,0.8862745,0.8862745,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":12,"ty":4,"nm":"Shape Layer 1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[360,360,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[295,295]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.8039216,0.8039216,0.8039216,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"}],"ip":0,"op":90.0000036657751,"st":0,"bm":0,"sr":1}]}
\ No newline at end of file
diff --git a/apps/web/src/pages/[organization]/[project]/reports/index.tsx b/apps/web/src/pages/[organization]/[project]/reports/index.tsx
index 23b10bc5f..a818a6b54 100644
--- a/apps/web/src/pages/[organization]/[project]/reports/index.tsx
+++ b/apps/web/src/pages/[organization]/[project]/reports/index.tsx
@@ -41,6 +41,10 @@ export default function Page() {
if (reportId && reportQuery.data) {
dispatch(setReport(reportQuery.data));
}
+
+ if (!reportId) {
+ dispatch(reset());
+ }
}, [reportId, reportQuery.data, dispatch]);
return (
@@ -57,7 +61,7 @@ export default function Page() {
</div>
<div className="flex gap-4">
<SheetTrigger asChild>
- <Button size="default">Select events & Filters</Button>
+ <Button size="default">Select events & filters</Button>
</SheetTrigger>
<ReportSaveButton />
</div>
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a393b6edd..ab2d948b2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -172,6 +172,9 @@ importers:
cmdk:
specifier: ^0.2.0
+ lottie-react:
+ specifier: ^2.4.0
lucide-react:
specifier: ^0.286.0
version: 0.286.0([email protected])
@@ -4331,6 +4334,21 @@ packages:
js-tokens: 4.0.0
dev: false
+ resolution: {integrity: sha512-pDJGj+AQlnlyHvOHFK7vLdsDcvbuqvwPZdMlJ360wrzGFurXeKPr8SiRCjLf3LrNYKANQtSsh5dz9UYQHuqx4w==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0
+ react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
+ dependencies:
+ lottie-web: 5.12.2
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ dev: false
+
+ resolution: {integrity: sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==}
+ dev: false
+
resolution: {integrity: sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==}
dependencies: