From cf147ff47d078b979641294af455b8fdb103a141 Mon Sep 17 00:00:00 2001 From: Sudheer Salavadi Date: Wed, 26 Jun 2024 19:16:29 +0200 Subject: [PATCH] Various style updates in dashboards and other pages. (#2308) * Various minor style updates * Various style improvements * Update ExampleCards.tsx --- .../Assist/RecordingsList/Recordings.tsx | 2 +- .../Client/Audit/AuditView/AuditView.tsx | 2 +- .../Client/CustomFields/CustomFields.js | 2 +- .../Client/Integrations/Integrations.tsx | 12 +----- .../app/components/Client/Modules/Modules.tsx | 4 +- .../Client/ProfileSettings/ProfileSettings.js | 2 +- .../app/components/Client/Roles/Roles.tsx | 2 +- .../Client/SessionsListingSettings.tsx | 2 +- .../app/components/Client/Sites/Sites.tsx | 2 +- .../app/components/Client/Users/UsersView.tsx | 2 +- .../components/Client/Webhooks/Webhooks.tsx | 2 +- .../Dashboard/Widgets/CardSessionsByList.tsx | 10 ++--- .../components/Alerts/AlertsView.tsx | 2 +- .../DashboardList/DashboardList.tsx | 43 ++++++------------- .../DashboardList/DashboardsView.tsx | 2 +- .../DashboardList/NewDashModal/CreateCard.tsx | 4 +- .../NewDashModal/Examples/Count.tsx | 2 + .../NewDashModal/Examples/ExCard.tsx | 18 ++++---- .../Examples/SessionsBy/ByUrl.tsx | 1 + .../NewDashModal/Examples/Trend.tsx | 7 +-- .../NewDashModal/NewDashboardModal.tsx | 10 ++++- .../DashboardList/NewDashModal/SelectCard.tsx | 5 ++- .../DashboardSelectionModal.tsx | 5 ++- .../DashboardView/DashboardView.module.css | 2 +- .../components/FilterSeries/AddStepButton.tsx | 2 +- .../components/FilterSeries/FilterSeries.tsx | 2 +- .../Funnels/FunnelIssues/FunnelIssues.tsx | 2 +- .../components/MetricsView/MetricsView.tsx | 2 +- .../components/WidgetForm/CardBuilder.tsx | 3 +- .../components/WidgetForm/WidgetFormNew.tsx | 2 +- .../WidgetPreview/WidgetPreview.tsx | 2 +- .../WidgetWrapper/WidgetWrapper.tsx | 2 +- .../ForgotPassword/ForgotPassword.tsx | 2 +- frontend/app/components/Login/Login.tsx | 2 +- .../UsabilityTesting/UsabilityTesting.tsx | 6 +-- .../FilterAutoComplete/FilterAutoComplete.tsx | 2 +- .../Filters/FilterModal/FilterModal.tsx | 4 +- .../FilterSelection/FilterSelection.tsx | 2 +- .../FilterValueDropdown.tsx | 2 +- .../LiveSessionList/LiveSessionList.tsx | 2 +- .../LiveSessionSearchField.tsx | 2 +- .../app/components/shared/Select/Select.tsx | 2 +- .../AiSessionSearchField.tsx | 2 +- .../SessionSearchField/SessionSearchField.tsx | 2 +- frontend/app/styles/general.css | 22 ++++++++++ frontend/app/styles/global.scss | 2 +- 46 files changed, 114 insertions(+), 102 deletions(-) diff --git a/frontend/app/components/Assist/RecordingsList/Recordings.tsx b/frontend/app/components/Assist/RecordingsList/Recordings.tsx index 4da82724d..00d99e6b5 100644 --- a/frontend/app/components/Assist/RecordingsList/Recordings.tsx +++ b/frontend/app/components/Assist/RecordingsList/Recordings.tsx @@ -26,7 +26,7 @@ function Recordings(props: Props) { }; return ( -
+
diff --git a/frontend/app/components/Client/Audit/AuditView/AuditView.tsx b/frontend/app/components/Client/Audit/AuditView/AuditView.tsx index 4a0430622..0f21bd71c 100644 --- a/frontend/app/components/Client/Audit/AuditView/AuditView.tsx +++ b/frontend/app/components/Client/Audit/AuditView/AuditView.tsx @@ -29,7 +29,7 @@ function AuditView() { } return useObserver(() => ( -
+
diff --git a/frontend/app/components/Client/CustomFields/CustomFields.js b/frontend/app/components/Client/CustomFields/CustomFields.js index 933e6170d..01cabb532 100644 --- a/frontend/app/components/Client/CustomFields/CustomFields.js +++ b/frontend/app/components/Client/CustomFields/CustomFields.js @@ -68,7 +68,7 @@ function CustomFields(props) { const { fields, loading } = props; return ( -
+

{'Metadata'}

diff --git a/frontend/app/components/Client/Integrations/Integrations.tsx b/frontend/app/components/Client/Integrations/Integrations.tsx index 9ed478fc4..e81a7038a 100644 --- a/frontend/app/components/Client/Integrations/Integrations.tsx +++ b/frontend/app/components/Client/Integrations/Integrations.tsx @@ -108,7 +108,7 @@ function Integrations(props: Props) { return ( <> -
+
{!hideHeader && Integrations
} />} @@ -117,15 +117,7 @@ function Integrations(props: Props) {
0 ? 'p-2' : ''} - grid-cols-1 // default to 1 column - sm:grid-cols-1 // 1 column on small screens and up - md:grid-cols-2 // 2 columns on medium screens and up - lg:grid-cols-3 // 3 columns on large screens and up - xl:grid-cols-3 // 3 columns on extra-large screens + mt-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 `)}> {allIntegrations.map((integration: any) => ( -
+

Modules

  • OpenReplay's modules are a collection of advanced features that provide enhanced functionality.
  • @@ -54,7 +54,7 @@ function Modules(props: Props) {
-
+
{modulesState.map((module) => (
diff --git a/frontend/app/components/Client/ProfileSettings/ProfileSettings.js b/frontend/app/components/Client/ProfileSettings/ProfileSettings.js index f7a7dbaca..2b3ea3e8e 100644 --- a/frontend/app/components/Client/ProfileSettings/ProfileSettings.js +++ b/frontend/app/components/Client/ProfileSettings/ProfileSettings.js @@ -19,7 +19,7 @@ export default class ProfileSettings extends React.PureComponent { render() { const { account, isEnterprise } = this.props; return ( -
+
Account
} />
diff --git a/frontend/app/components/Client/Roles/Roles.tsx b/frontend/app/components/Client/Roles/Roles.tsx index 5335e9764..470cd611b 100644 --- a/frontend/app/components/Client/Roles/Roles.tsx +++ b/frontend/app/components/Client/Roles/Roles.tsx @@ -65,7 +65,7 @@ function Roles(props: Props) { return ( -
+

Roles and Access

diff --git a/frontend/app/components/Client/SessionsListingSettings.tsx b/frontend/app/components/Client/SessionsListingSettings.tsx index d60a44774..79a78061a 100644 --- a/frontend/app/components/Client/SessionsListingSettings.tsx +++ b/frontend/app/components/Client/SessionsListingSettings.tsx @@ -19,7 +19,7 @@ const connector = connect(mapStateToProps); function SessionsListingSettings(props: Props) { return ( -
+
Sessions Listing
} />
diff --git a/frontend/app/components/Client/Sites/Sites.tsx b/frontend/app/components/Client/Sites/Sites.tsx index d4ef04aae..b9f046442 100644 --- a/frontend/app/components/Client/Sites/Sites.tsx +++ b/frontend/app/components/Client/Sites/Sites.tsx @@ -111,7 +111,7 @@ const Sites = ({ loading, sites, user, init }: PropsFromRedux) => { return ( -
+
Projects
} diff --git a/frontend/app/components/Client/Users/UsersView.tsx b/frontend/app/components/Client/Users/UsersView.tsx index 5f5b53fb6..6478c7b60 100644 --- a/frontend/app/components/Client/Users/UsersView.tsx +++ b/frontend/app/components/Client/Users/UsersView.tsx @@ -36,7 +36,7 @@ function UsersView(props: Props) { }, []); return ( -
+
+

{'Webhooks'}

diff --git a/frontend/app/components/Dashboard/Widgets/CardSessionsByList.tsx b/frontend/app/components/Dashboard/Widgets/CardSessionsByList.tsx index 63f296cb0..262916873 100644 --- a/frontend/app/components/Dashboard/Widgets/CardSessionsByList.tsx +++ b/frontend/app/components/Dashboard/Widgets/CardSessionsByList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {List, Progress, Typography} from "antd"; +import { List, Progress, Typography } from "antd"; import cn from "classnames"; interface Props { @@ -8,7 +8,7 @@ interface Props { onClickHandler: (event: any, data: any) => void; } -function CardSessionsByList({list, selected, onClickHandler}: Props) { +function CardSessionsByList({ list, selected, onClickHandler }: Props) { return ( ( onClickHandler(e, row)} + onClick={(e) => onClickHandler(e, row)} // Remove onClick handler to disable click interaction style={{ borderBottom: '1px dotted rgba(0, 0, 0, 0.05)', padding: '4px 10px', lineHeight: '1px' }} - className={cn('rounded hover:bg-active-blue cursor-pointer', selected === row.name ? 'bg-active-blue' : '')} + className={cn('rounded', selected === row.name ? 'bg-active-blue' : '')} // Remove hover:bg-active-blue and cursor-pointer >
- {row.name} + {row.name} {row.sessionCount}
diff --git a/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx b/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx index 2ea7d1153..09fb1eb1a 100644 --- a/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/AlertsView.tsx @@ -26,7 +26,7 @@ function AlertsView({ siteId }: IAlertsView) { return unmount; }, [history]); return ( -
+
diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx index c4ef9f2d6..77350083e 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx @@ -74,40 +74,22 @@ function DashboardList({siteId}: { siteId: string }) { return ( list.length === 0 && !dashboardStore.filter.showMine ? ( } + image={} + imageStyle={{height: 300}} description={(
- {dashboardsSearch !== '' - ? - No matching results +
+ + Create your first dashboard. - : ( -
- - You haven't created any dashboards yet - -
- A Dashboard is a collection of{' '} - - Utilize cards to visualize key user interactions or product - performance metrics. -
- } - className="text-center" - > - Cards - {' '} - that can be shared across teams. -
- -
- -
-
- )} +
+ Organize your product and technical insights as cards in dashboards to see the bigger picture,
take action and improve user experience. +
+
+ +
+
)} /> @@ -132,6 +114,7 @@ function DashboardList({siteId}: { siteId: string }) { })} />) ); + } export default connect((state: any) => ({ diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx index bb3a152b9..829852dd9 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx @@ -5,7 +5,7 @@ import Header from './Header'; function DashboardsView({history, siteId}: { history: any; siteId: string }) { return ( -
+
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx index df4d8a3fb..22ac90d79 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx @@ -83,7 +83,7 @@ function CreateCard(props: Props) { -
+
{metric.name}
@@ -94,7 +94,7 @@ function CreateCard(props: Props) {
- +
); } diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx index 1f21a6c9a..044824ab0 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx @@ -9,6 +9,7 @@ import { import React from 'react'; import ExCard from './ExCard'; +import { size } from '@floating-ui/react-dom-interactions'; const TYPES = { Frustrations: 'frustrations', @@ -37,6 +38,7 @@ function ExampleCount(props: any) { { label: 'Errors', value: '1' }, { label: 'Users', value: '2' }, ]} + size='small' onChange={(v) => setType(v)} />
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx index b055c81fd..8fbe5e865 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx @@ -13,15 +13,15 @@ function ExCard({ onCard: (card: string) => void; height?: number; }) { - return ( -
-
{title}
-
onCard(type)}>{children}
-
- ); + return ( +
+
{title}
+
onCard(type)}>{children}
+
+ ); } export default ExCard diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx index 1b2de44e2..b6d35ef76 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx @@ -58,6 +58,7 @@ function ByUrl(props: any) { { label: 'Page Title', value: '1' }, ]} onChange={(v) => setMode(Number(v))} + size='small' />
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx index 5de714619..1e2cb8770 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx @@ -23,6 +23,7 @@ function ExampleTrend(props: any) { { label: 'Multi-Series', value: 'multi' }, ]} onChange={(v) => setIsMulti(v === 'multi')} + size='small' />
@@ -78,14 +79,14 @@ function ExampleTrend(props: any) {
) : null}
-
+
-
CTA 1
+
Series 1
-
CTA 2
+
Series 2
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx index ae48e05af..79b26d019 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx @@ -25,7 +25,15 @@ const NewDashboardModal: React.FC = ({ return ( <> - +
{step === 0 && = (props: SelectCardProps) => { {/*/>*/} -
+
{dashboardId ? (isLibrary ? "Add Card" : "Create Card") : "Select a template to create a card"}
{isLibrary && ( @@ -125,6 +125,7 @@ const CategorySelector: React.FC = ({setSelected, selecte }))} value={selected} onChange={setSelected} + className='w-fit' /> ); @@ -135,7 +136,7 @@ interface ExampleCardsGridProps { const ExampleCardsGrid: React.FC = ({items}) => (
{items}
diff --git a/frontend/app/components/Dashboard/components/DashboardSelectionModal/DashboardSelectionModal.tsx b/frontend/app/components/Dashboard/components/DashboardSelectionModal/DashboardSelectionModal.tsx index 2ff69a334..1a1db124d 100644 --- a/frontend/app/components/Dashboard/components/DashboardSelectionModal/DashboardSelectionModal.tsx +++ b/frontend/app/components/Dashboard/components/DashboardSelectionModal/DashboardSelectionModal.tsx @@ -1,6 +1,7 @@ import {useObserver} from 'mobx-react-lite'; import React from 'react'; import {Button, Modal, Form, Icon} from 'UI'; + import {useStore} from 'App/mstore' import Select from 'Shared/Select'; @@ -44,7 +45,7 @@ function DashboardSelectionModal(props: Props) { return useObserver(() => ( -
{'Add to selected dashboard'}
+
{'Add to selected dashboard'}
Add diff --git a/frontend/app/components/Dashboard/components/DashboardView/DashboardView.module.css b/frontend/app/components/Dashboard/components/DashboardView/DashboardView.module.css index 42045607f..cda44bd57 100644 --- a/frontend/app/components/Dashboard/components/DashboardView/DashboardView.module.css +++ b/frontend/app/components/Dashboard/components/DashboardView/DashboardView.module.css @@ -2,4 +2,4 @@ & > tippy-popper > tippy-tooltip { padding: 0!important; } -} +} \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/FilterSeries/AddStepButton.tsx b/frontend/app/components/Dashboard/components/FilterSeries/AddStepButton.tsx index 7879ff095..cc3c08f92 100644 --- a/frontend/app/components/Dashboard/components/FilterSeries/AddStepButton.tsx +++ b/frontend/app/components/Dashboard/components/FilterSeries/AddStepButton.tsx @@ -23,7 +23,7 @@ function AddStepButton({series, excludeFilterKeys}: Props) { onFilterClick={onAddFilter} excludeFilterKeys={excludeFilterKeys} > - diff --git a/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx b/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx index 36eb148f3..aa21ecea8 100644 --- a/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx +++ b/frontend/app/components/Dashboard/components/FilterSeries/FilterSeries.tsx @@ -115,7 +115,7 @@ function FilterSeries(props: Props) { }; return ( -
+
{canExclude && } {!hideHeader && ( diff --git a/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx b/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx index da3c83c3f..e0513d416 100644 --- a/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx +++ b/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx @@ -59,7 +59,7 @@ function FunnelIssues() { return useObserver(() => (
-

Most significant issues identified in this funnel

+

Most significant issues identified in this funnel

diff --git a/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx b/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx index fa7ce7019..5edeec2d9 100644 --- a/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx +++ b/frontend/app/components/Dashboard/components/MetricsView/MetricsView.tsx @@ -9,7 +9,7 @@ interface Props { } function MetricsView({ siteId }: Props) { return useObserver(() => ( -
+
diff --git a/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx b/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx index 10778d064..867cb03c3 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx @@ -184,12 +184,13 @@ const SeriesList = observer(() => {
))} {hasSeries && ( - +