diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx
index 2a3130f88..cf4f9a1e6 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx
@@ -1,4 +1,7 @@
-import { LockOutlined, TeamOutlined } from '@ant-design/icons';
+
+import { observer } from 'mobx-react-lite';
+import React from 'react';
+import { useHistory } from 'react-router';
import {
Empty,
Switch,
@@ -10,17 +13,13 @@ import {
Dropdown,
Button,
} from 'antd';
-import { observer } from 'mobx-react-lite';
-import React from 'react';
-import { useHistory } from 'react-router';
-
+import { LockOutlined, TeamOutlined, MoreOutlined } from '@ant-design/icons';
import { checkForRecent } from 'App/date';
import { useStore } from 'App/mstore';
import Dashboard from 'App/mstore/types/dashboard';
import { dashboardSelected, withSiteId } from 'App/routes';
import CreateDashboardButton from 'Components/Dashboard/components/CreateDashboardButton';
import { Icon, confirm } from 'UI';
-import { EllipsisVertical } from 'lucide-react';
import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG';
import DashboardEditModal from '../DashboardEditModal';
@@ -106,6 +105,7 @@ function DashboardList() {
}
checkedChildren={'Team'}
unCheckedChildren={'Private'}
+ className='toggle-team-private'
/>
@@ -124,7 +124,7 @@ function DashboardList() {
},
{
- title: 'Options',
+ title: '',
dataIndex: 'dashboardId',
width: '5%',
render: (id) => (
@@ -161,7 +161,7 @@ function DashboardList() {
},
}}
>
-
} />
+
} type='text' className='btn-dashboards-list-item-more-options' />
),
},
@@ -223,6 +223,8 @@ function DashboardList() {
showTotal: (total, range) =>
`Showing ${range[0]}-${range[1]} of ${total} items`,
size: 'small',
+ simple: 'true',
+ className: 'px-4 pr-8 mb-0',
}}
onRow={(record) => ({
onClick: (e) => {
diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx
index 219145c18..355a1d091 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx
@@ -28,7 +28,7 @@ function DashboardSearch() {
value={query}
allowClear
name="dashboardsSearch"
- className="w-full"
+ className="w-full btn-search-dashboard"
placeholder="Filter by dashboard title"
onChange={write}
onSearch={(value) => dashboardStore.updateKey('filter', { ...dashboardStore.filter, query: value })}
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx
index 03c083ff2..988311c54 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx
@@ -57,7 +57,7 @@ function AreaChartCard(props: Props) {
margin={Styles.chartMargins}
>
{gradientDef}
-
+
-
+
{/* @ts-ignore */}
{isSaas ? : null}
diff --git a/frontend/app/components/Dashboard/components/DashboardWidgetGrid/DashboardWidgetGrid.tsx b/frontend/app/components/Dashboard/components/DashboardWidgetGrid/DashboardWidgetGrid.tsx
index f41ed2595..9a8223239 100644
--- a/frontend/app/components/Dashboard/components/DashboardWidgetGrid/DashboardWidgetGrid.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardWidgetGrid/DashboardWidgetGrid.tsx
@@ -4,7 +4,7 @@ import WidgetWrapperNew from 'Components/Dashboard/components/WidgetWrapper/Widg
import { observer } from 'mobx-react-lite';
import AddCardSection from '../AddCardSection/AddCardSection';
import cn from 'classnames';
-import { Button, Popover } from 'antd'
+import { Button, Popover, Tooltip } from 'antd'
import { PlusOutlined } from '@ant-design/icons'
import { Loader } from 'UI';
@@ -39,7 +39,7 @@ function DashboardWidgetGrid(props: Props) {
{list?.map((item: any, index: any) => (
} trigger={'click'}>
+
} shape={'circle'} size={'small'} />
+
diff --git a/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx b/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx
index 8489547fd..dfde9ad8e 100644
--- a/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx
+++ b/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx
@@ -50,6 +50,7 @@ const FilterSeriesHeader = observer(
onRemove: (seriesIndex: any) => void;
canDelete: boolean | undefined;
toggleExpand: () => void;
+ onChange: () => void;
}) => {
const onUpdate = (name: any) => {
props.series.update('name', name);
@@ -66,6 +67,7 @@ const FilterSeriesHeader = observer(
seriesIndex={props.seriesIndex}
name={props.series.name}
onUpdate={onUpdate}
+ onChange={props.onChange}
/>
{!props.expanded && (
void;
+ onChange: () => void;
seriesIndex?: number;
}
@@ -16,6 +16,7 @@ function SeriesName(props: Props) {
const write = ({ target: { value } }) => {
setName(value);
+ props.onChange();
};
const onBlur = () => {
@@ -51,6 +52,7 @@ function SeriesName(props: Props) {
onBlur={onBlur}
onKeyDown={onKeyDown}
className="bg-white text-lg border-transparent rounded-lg font-medium ps-2"
+ maxLength={22}
/>
) : (
diff --git a/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx b/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx
index 15c116360..2e7c32ec9 100644
--- a/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx
+++ b/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx
@@ -23,7 +23,7 @@ interface Props extends RouteComponentProps {
function MetricTypeIcon({ type }: any) {
return (
{TYPE_NAMES[type]} }>
- } size="small" className="bg-tealx-lightest mr-2" />
+ } size="default" className="bg-tealx-lightest mr-2 cursor-default avatar-card-list-item" />
);
}
@@ -171,12 +171,12 @@ const MetricListItem: React.FC = ({
case 'options':
return (
<>
-
+
- } />
+ } className='btn-cards-list-item-more-options' />
{renderModal()}
diff --git a/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx b/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx
index 03877d352..c62cb4bda 100644
--- a/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx
+++ b/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx
@@ -2,6 +2,10 @@ import React, { useEffect } from 'react';
import { PageTitle } from 'UI';
import { Button, Popover } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
+import React, { useState } from 'react';
+import { PageTitle, Icon } from 'UI';
+import { Segmented, Button, Popover, Space, Dropdown, Menu } from 'antd';
+import { PlusOutlined, DownOutlined } from '@ant-design/icons';
import AddCardSection from '../AddCardSection/AddCardSection';
import MetricsSearch from '../MetricsSearch';
import { useStore } from 'App/mstore';
@@ -9,29 +13,63 @@ import { observer } from 'mobx-react-lite';
function MetricViewHeader() {
const { metricStore } = useStore();
+ const filter = metricStore.filter;
+ const [showAddCardModal, setShowAddCardModal] = useState(false);
useEffect(() => {
// Set the default sort order to 'desc'
metricStore.updateKey('sort', { by: 'desc' });
}, [metricStore]);
+ // Handler for dropdown menu selection
+ const handleMenuClick = ({ key }) => {
+ metricStore.updateKey('filter', { ...filter, type: key });
+ };
+
+ // Dropdown menu options
+ const menu = (
+
+ );
return (
-
-
-
+
+
+
+
+
+
+
+
-
-
} trigger={'click'}>
+
+
}
+ trigger="click"
+ >
}
+ className='btn-create-card'
>
Create Card
-
+
+
+
+
+
diff --git a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx
index f7374d1d2..7b92e4e7b 100644
--- a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx
+++ b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx
@@ -105,7 +105,7 @@ const ListView: React.FC
= (props: Props) => {
),
dataIndex: 'name',
key: 'title',
- className: 'cap-first',
+ className: 'cap-first pl-4',
sorter: true,
width: '25%',
render: (text: string, metric: Metric) => (
@@ -233,13 +233,6 @@ const ListView: React.FC = (props: Props) => {
}
: undefined
}
- // footer={() => (
- //
- //
- // Select All
- //
- //
- // )}
pagination={{
current: pagination.current,
pageSize: pagination.pageSize,
@@ -248,7 +241,8 @@ const ListView: React.FC = (props: Props) => {
className: 'px-4',
showLessItems: true,
showTotal: () => totalMessage,
- showQuickJumper: true
+ size: 'small',
+ simple: 'true',
}}
/>
);
diff --git a/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx b/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx
index 7dfcac286..7b8883f0b 100644
--- a/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx
+++ b/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx
@@ -1,6 +1,6 @@
-import { observer, useObserver } from 'mobx-react-lite';
+import { observer } from 'mobx-react-lite';
import React, { useEffect, useMemo, useState } from 'react';
-import { NoContent, Pagination, Loader } from 'UI';
+import { NoContent, Loader } from 'UI';
import { useStore } from 'App/mstore';
import { sliceListPerPage } from 'App/utils';
import GridView from './GridView';
@@ -16,6 +16,7 @@ function MetricsList({
}) {
const { metricStore, dashboardStore } = useStore();
const metricsSearch = metricStore.filter.query;
+ const listView = metricStore.listView;
const [selectedMetrics, setSelectedMetrics] = useState([]);
const dashboard = dashboardStore.selectedDashboard;
@@ -77,28 +78,51 @@ function MetricsList({
}
- subtext="Utilize cards to visualize key user interactions or product performance metrics."
+ subtext={
+ metricsSearch !== ''
+ ? ''
+ : 'Utilize cards to visualize key user interactions or product performance metrics.'
+ }
>
-
- setSelectedMetrics(
- checked
- ? cards
- .map((i: any) => i.metricId)
- .slice(0, 30 - existingCardIds!.length)
- : []
- )
- }
- showOwn={showOwn}
- toggleOwn={toggleOwn}
- />
+ {listView ? (
+
+ setSelectedMetrics(checked ? cards.map((i: any) => i.metricId).slice(0, 30 - existingCardIds!.length) : [])
+ }
+ />
+ ) : (
+ <>
+
+
+
+ Showing{' '}
+ {Math.min(cards.length, metricStore.pageSize)} out
+ of {cards.length} cards
+
+
metricStore.updateKey('page', page)}
+ limit={metricStore.pageSize}
+ debounceRequest={100}
+ />
+
+ >
+ )}
);
diff --git a/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx b/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx
index efb197dcc..308f59afd 100644
--- a/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx
+++ b/frontend/app/components/Dashboard/components/MetricsSearch/MetricsSearch.tsx
@@ -27,7 +27,7 @@ function MetricsSearch() {
value={query}
allowClear
name="metricsSearch"
- className="w-full"
+ className="w-full input-search-card"
placeholder="Filter by title or owner"
onChange={write}
/>
diff --git a/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx b/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx
index 9c799b225..98fa79052 100644
--- a/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx
+++ b/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx
@@ -11,7 +11,9 @@ function MetricsView({ siteId }: Props) {
return (
);
}
diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx
index 047fd38e6..c47115c66 100644
--- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx
+++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx
@@ -56,7 +56,7 @@ function WidgetChart(props: Props) {
const period = dashboardStore.period;
const drillDownPeriod = dashboardStore.drillDownPeriod;
const drillDownFilter = dashboardStore.drillDownFilter;
- const colors = Styles.customMetricColors;
+ const colors = Styles.safeColors;
const [loading, setLoading] = useState(true);
const params = { density: dashboardStore.selectedDensity };
const metricParams = _metric.params;
diff --git a/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx b/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx
index e9a5f6e4e..75e66de0e 100644
--- a/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx
+++ b/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx
@@ -112,12 +112,13 @@ function WidgetDatatable(props: Props) {
return (