Skip to content

Commit 1c638ed

Browse files
committed
Dashboard: Charts style tweaks, Remove unused chart component (#7478)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on modifying the styling and layout of various components within the dashboard, enhancing user interface elements, and removing unused files. ### Detailed summary - Deleted `CombinedStatBreakdownCard.tsx` and `CombinedStatBreakdownCard.stories.tsx`. - Updated class names for better styling on `Link` and `Card` components. - Removed `max-md:border-r-0` and `max-md:border-l-0` classes from several components. - Adjusted `min-h` properties for `Card` components. - Centered text in `EmptyStateContent`. - Streamlined layout in various components for improved spacing. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 2fd5b84 commit 1c638ed

File tree

7 files changed

+8
-208
lines changed

7 files changed

+8
-208
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export default async function TeamOverviewPage(props: {
7373
title="Analytics"
7474
/>
7575
</div>
76-
<div className="flex grow flex-col justify-between gap-10 md:container md:max-w-7xl md:pt-8 md:pb-16">
76+
77+
<div className="flex grow flex-col justify-between gap-10 container max-w-7xl pt-8 pb-16">
7778
<div className="flex grow flex-col gap-6">
7879
<Suspense
7980
fallback={<LoadingChartState className="h-[458px] border" />}
@@ -86,7 +87,7 @@ export default async function TeamOverviewPage(props: {
8687
/>
8788
</Suspense>
8889

89-
<div className="grid gap-6 max-md:px-6 md:grid-cols-2">
90+
<div className="grid gap-6 md:grid-cols-2">
9091
<Suspense
9192
fallback={<LoadingChartState className="h-[431px] border" />}
9293
>
@@ -242,7 +243,6 @@ async function AsyncTransactionsChartCard(props: {
242243
clientTransactions.value.length > 0 ? (
243244
<TransactionsChartCardUI
244245
aggregatedData={clientTransactions.value}
245-
className="max-md:rounded-none max-md:border-r-0 max-md:border-l-0"
246246
data={clientTransactionsTimeSeries.value}
247247
searchParams={props.searchParams}
248248
/>
@@ -280,7 +280,6 @@ async function AsyncTotalSponsoredCard(props: {
280280
userOpUsage.value.length > 0 ? (
281281
<TotalSponsoredChartCardUI
282282
aggregatedData={userOpUsage.value}
283-
className="max-md:rounded-none max-md:border-r-0 max-md:border-l-0"
284283
data={userOpUsageTimeSeries.value}
285284
searchParams={props.searchParams}
286285
/>
@@ -391,7 +390,6 @@ function AppHighlightsCard({
391390
return timeSeriesData.reduce((acc, curr) => acc + curr[key], 0);
392391
}}
393392
chartConfig={chartConfig}
394-
className="max-md:rounded-none max-md:border-r-0 max-md:border-l-0"
395393
data={timeSeriesData}
396394
existingQueryParams={searchParams}
397395
queryKey="appHighlights"

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/TransactionCharts.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ export function TransactionsChartsUI({
2020
<>
2121
<TransactionsChartCardUI
2222
aggregatedData={aggregatedData}
23-
className="max-md:rounded-none max-md:border-r-0 max-md:border-l-0"
2423
data={data}
2524
searchParams={searchParams}
2625
/>
27-
<div className="grid gap-6 max-md:px-6 md:grid-cols-2">
26+
<div className="grid gap-6 md:grid-cols-2">
2827
<ChainDistributionCard data={aggregatedData} />
2928
<ContractDistributionCard client={client} data={aggregatedData} />
3029
</div>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ function AppHighlightsCard({
455455
return timeSeriesData.reduce((acc, curr) => acc + curr[key], 0);
456456
}}
457457
chartConfig={chartConfig}
458-
className="max-md:rounded-none max-md:border-r-0 max-md:border-l-0"
459458
data={timeSeriesData}
460459
existingQueryParams={searchParams}
461460
queryKey="appHighlights"
@@ -590,7 +589,6 @@ async function TotalSponsoredCard({
590589
}
591590
aggregateFn={(_data, key) => processedAggregatedData[key]}
592591
chartConfig={chartConfig}
593-
className="max-md:rounded-none max-md:border-r-0 max-md:border-l-0"
594592
data={timeSeriesData}
595593
existingQueryParams={searchParams}
596594
isCurrency

apps/dashboard/src/app/(app)/team/components/Analytics/CombinedBarChartCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function CombinedBarChartCard<
6262
const key = chart as K;
6363
return (
6464
<Link
65-
className="relative z-30 flex min-w-[200px] flex-1 flex-col justify-center gap-1 border-l first:border-l-0 hover:bg-card"
65+
className="relative z-30 flex min-w-[200px] flex-1 flex-col justify-center gap-1 border-l first:border-l-0 hover:bg-accent/50"
6666
data-active={activeChart === chart}
6767
href={{
6868
query: {

apps/dashboard/src/app/(app)/team/components/Analytics/CombinedStatBreakdownCard.stories.tsx

Lines changed: 0 additions & 111 deletions
This file was deleted.

apps/dashboard/src/app/(app)/team/components/Analytics/CombinedStatBreakdownCard.tsx

Lines changed: 0 additions & 84 deletions
This file was deleted.

apps/dashboard/src/app/(app)/team/components/Analytics/EmptyStateCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function EmptyStateCard({
1313
description?: string;
1414
}) {
1515
return (
16-
<Card className="container h-[300px] p-2 md:h-[400px]">
16+
<Card className="container min-h-[300px] p-2 md:min-h-[400px]">
1717
<div className="flex h-full flex-col items-center justify-center gap-2 rounded-md border border-dashed text-center">
1818
<EmptyStateContent
1919
description={description}
@@ -42,7 +42,7 @@ export function EmptyStateContent(props: {
4242
<PlugIcon className="size-5 text-muted-foreground" />
4343
</div>
4444

45-
<div className="space-y-0.5">
45+
<div className="space-y-0.5 text-center">
4646
<div className="font-semibold text-lg">No data available</div>
4747
{description && (
4848
<div className="text-muted-foreground text-sm">{description}</div>
@@ -52,7 +52,7 @@ export function EmptyStateContent(props: {
5252
{props.link && (
5353
<Button
5454
asChild
55-
className="mt-2 rounded-full"
55+
className="mt-2 rounded-full text-center"
5656
size="sm"
5757
variant="default"
5858
>

0 commit comments

Comments
 (0)