diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx index d54b34dc3..66d379e6f 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx @@ -47,10 +47,6 @@ function DashboardsView({ history, siteId }: { history: any; siteId: string }) { - {/*
- A dashboard is a custom - visualization using your OpenReplay data. -
*/} ); diff --git a/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx b/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx index e1653c947..93377efd2 100644 --- a/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx +++ b/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx @@ -131,38 +131,17 @@ function DashboardView(props: Props) { } onDoubleClick={() => onEdit(true)} className="mr-3 select-none border-b border-b-borderColor-transparent hover:border-dotted hover:border-gray-medium cursor-pointer" - actionButton={ - // setShowTooltip(false)}> - showTooltip && ( -
- setShowTooltip(false)} - isPopup - siteId={siteId} - /> -
- )} - > - -
- //
- } />
-
+ +
+
} - // subtext={ - //
- // - //
- // } + title={ +
+
+
+ There are no cards in this dashboard +
+
+ Try the most commonly used metrics or graphs to begin. +
+
+
+ +
+
+ } >
{smallWidgets.length > 0 ? ( <> @@ -105,122 +114,3 @@ function DashboardWidgetGrid(props: Props) { } export default DashboardWidgetGrid; - -interface MetricType { - title: string; - icon: string; - description: string; - slug: string; -} -const METRIC_TYPES: MetricType[] = [ - { - title: 'Add From Library', - icon: 'grid', - description: 'Select a pre existing card from card library', - slug: 'library', - }, - { - title: 'Timeseries', - icon: 'graph-up', - description: 'Trend of sessions count in over the time.', - slug: 'timeseries', - }, - { - title: 'Table', - icon: 'list-alt', - description: 'See list of Users, Sessions, Errors, Issues, etc.,', - slug: 'table' - }, - { - title: 'Funnel', - icon: 'funnel', - description: 'Uncover the issues impacting user journeys.', - slug: 'funnel' - }, - { - title: 'Errors Tracking', - icon: 'exclamation-circle', - description: 'Discover user journeys between 2 points.', - slug: 'errors' - }, - { - title: 'Performance Monitoring', - icon: 'speedometer2', - description: 'Retention graph of users / features over a period of time.', - slug: 'performance' - }, - { - title: 'Resource Monitoring', - icon: 'files', - description: 'Find the adoption of your all features in your app.', - slug: 'resource-monitoring' - }, - { - title: 'Web Vitals', - icon: 'activity', - description: 'Find the adoption of your all features in your app.', - slug: 'web-vitals' - }, - { - title: 'User Path', - icon: 'signpost-split', - description: 'Discover user journeys between 2 points.', - slug: 'user-path' - }, - { - title: 'Retention', - icon: 'arrow-repeat', - description: 'Retension graph of users / features over a period of time.', - slug: 'retention' - }, - { - title: 'Feature Adoption', - icon: 'card-checklist', - description: 'Find the adoption of your all features in your app.', - slug: 'feature-adoption' - }, -]; - -function MetricTypeItem({ - icon, - title, - description, -}: { - icon: string; - title: string; - description: string; -}) { - return ( -
-
- -
-
-
{title}
-
{description}
-
-
- ); -} - -function EmptyDashboardGrid() { - return ( -
-
-
- There are no cards in this dashboard -
-
Try the most commonly used metrics or graphs to begin.
-
-
- {METRIC_TYPES.map((metric: MetricType) => ( - - ))} -
-
- ); -} diff --git a/frontend/app/components/Dashboard/components/MetricTypeItem/MetricTypeItem.tsx b/frontend/app/components/Dashboard/components/MetricTypeItem/MetricTypeItem.tsx new file mode 100644 index 000000000..7e4039721 --- /dev/null +++ b/frontend/app/components/Dashboard/components/MetricTypeItem/MetricTypeItem.tsx @@ -0,0 +1,33 @@ +import { IconNames } from 'App/components/ui/SVG'; +import React from 'react'; +import { Icon } from 'UI'; + +export interface MetricType { + title: string; + icon: IconNames; + description: string; + slug: string; +} + +interface Props { + metric: MetricType; +} + +function MetricTypeItem(props: Props) { + const { + metric: { title, icon, description, slug }, + } = props; + return ( +
+
+ +
+
+
{title}
+
{description}
+
+
+ ); +} + +export default MetricTypeItem; diff --git a/frontend/app/components/Dashboard/components/MetricTypeItem/index.ts b/frontend/app/components/Dashboard/components/MetricTypeItem/index.ts new file mode 100644 index 000000000..e9b95b5a8 --- /dev/null +++ b/frontend/app/components/Dashboard/components/MetricTypeItem/index.ts @@ -0,0 +1 @@ +export { default } from './MetricTypeItem'; diff --git a/frontend/app/components/Dashboard/components/MetricTypeList/MetricTypeList.tsx b/frontend/app/components/Dashboard/components/MetricTypeList/MetricTypeList.tsx new file mode 100644 index 000000000..d31bc5596 --- /dev/null +++ b/frontend/app/components/Dashboard/components/MetricTypeList/MetricTypeList.tsx @@ -0,0 +1,83 @@ +import React from 'react'; +import MetricTypeItem, { MetricType } from '../MetricTypeItem/MetricTypeItem'; + +const METRIC_TYPES: MetricType[] = [ + { + title: 'Add From Library', + icon: 'grid', + description: 'Select a pre existing card from card library', + slug: 'library', + }, + { + title: 'Timeseries', + icon: 'graph-up', + description: 'Trend of sessions count in over the time.', + slug: 'timeseries', + }, + { + title: 'Table', + icon: 'list-alt', + description: 'See list of Users, Sessions, Errors, Issues, etc.,', + slug: 'table', + }, + { + title: 'Funnel', + icon: 'funnel', + description: 'Uncover the issues impacting user journeys.', + slug: 'funnel', + }, + { + title: 'Errors Tracking', + icon: 'exclamation-circle', + description: 'Discover user journeys between 2 points.', + slug: 'errors', + }, + { + title: 'Performance Monitoring', + icon: 'speedometer2', + description: 'Retention graph of users / features over a period of time.', + slug: 'performance', + }, + { + title: 'Resource Monitoring', + icon: 'files', + description: 'Find the adoption of your all features in your app.', + slug: 'resource-monitoring', + }, + { + title: 'Web Vitals', + icon: 'activity', + description: 'Find the adoption of your all features in your app.', + slug: 'web-vitals', + }, + { + title: 'User Path', + icon: 'signpost-split', + description: 'Discover user journeys between 2 points.', + slug: 'user-path', + }, + { + title: 'Retention', + icon: 'arrow-repeat', + description: 'Retension graph of users / features over a period of time.', + slug: 'retention', + }, + { + title: 'Feature Adoption', + icon: 'card-checklist', + description: 'Find the adoption of your all features in your app.', + slug: 'feature-adoption', + }, +]; + +function MetricTypeList() { + return ( + <> + {METRIC_TYPES.map((metric: MetricType) => ( + + ))} + + ); +} + +export default MetricTypeList; diff --git a/frontend/app/components/Dashboard/components/MetricTypeList/index.ts b/frontend/app/components/Dashboard/components/MetricTypeList/index.ts new file mode 100644 index 000000000..35cf1cc61 --- /dev/null +++ b/frontend/app/components/Dashboard/components/MetricTypeList/index.ts @@ -0,0 +1 @@ +export { default } from './MetricTypeList';