Skip to content

Commit 279df43

Browse files
committed
Improve styling
1 parent 459e998 commit 279df43

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

frontend/src/app/projects/dashboard/metrics/[projectKey]/page.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
'use client'
22

33
import { useQuery } from '@apollo/client'
4-
import {
5-
faStar,
6-
faFolderOpen,
7-
faQuestionCircle,
8-
faHandshake,
9-
} from '@fortawesome/free-regular-svg-icons'
104
import {
115
faPeopleGroup,
126
faCodeFork,
137
faDollar,
148
faCodePullRequest,
159
faChartArea,
1610
faExclamationCircle,
11+
faQuestionCircle,
12+
faFolderOpen,
13+
faHandshake,
1714
faTag,
1815
faRocket,
16+
faStar,
1917
faTags,
2018
} from '@fortawesome/free-solid-svg-icons'
19+
import millify from 'millify'
2120
import { useParams } from 'next/navigation'
2221
import { FC, useState, useEffect } from 'react'
2322
import { handleAppError } from 'app/global-error'
@@ -28,7 +27,6 @@ import DashboardCard from 'components/DashboardCard'
2827
import GeneralCompliantComponent from 'components/GeneralCompliantComponent'
2928
import LoadingSpinner from 'components/LoadingSpinner'
3029
import MetricsScoreCircle from 'components/MetricsScoreCircle'
31-
3230
const ProjectHealthMetricsDetails: FC = () => {
3331
const { projectKey } = useParams()
3432
const [metrics, setMetrics] = useState<HealthMetricsProps>()
@@ -73,51 +71,51 @@ const ProjectHealthMetricsDetails: FC = () => {
7371
/>
7472
</div>
7573
<div className="grid grid-cols-1 gap-4 md:grid-cols-3">
76-
<DashboardCard title="Stars" icon={faStar} stats={metrics.starsCount.toString()} />
77-
<DashboardCard title="Forks" icon={faCodeFork} stats={metrics.forksCount.toString()} />
74+
<DashboardCard title="Stars" icon={faStar} stats={millify(metrics.starsCount)} />
75+
<DashboardCard title="Forks" icon={faCodeFork} stats={millify(metrics.forksCount)} />
7876
<DashboardCard
7977
title="Contributors"
8078
icon={faPeopleGroup}
81-
stats={metrics.contributorsCount.toString()}
79+
stats={millify(metrics.contributorsCount)}
8280
/>
8381
</div>
8482
<div className="grid grid-cols-1 gap-4 md:grid-cols-3 lg:grid-cols-4">
8583
<DashboardCard
8684
title="Open Issues"
8785
icon={faExclamationCircle}
88-
stats={metrics.openIssuesCount.toString()}
86+
stats={millify(metrics.openIssuesCount)}
8987
/>
9088
<DashboardCard
9189
title="Total Issues"
9290
icon={faFolderOpen}
93-
stats={metrics.totalIssuesCount.toString()}
91+
stats={millify(metrics.totalIssuesCount)}
9492
/>
9593
<DashboardCard
9694
title="Unassigned Issues"
9795
icon={faTag}
98-
stats={metrics.unassignedIssuesCount.toString()}
96+
stats={millify(metrics.unassignedIssuesCount)}
9997
/>
10098
<DashboardCard
10199
title="Unanswered Issues"
102100
icon={faQuestionCircle}
103-
stats={metrics.unansweredIssuesCount.toString()}
101+
stats={millify(metrics.unansweredIssuesCount)}
104102
/>
105103
</div>
106104
<div className="grid grid-cols-1 gap-4 md:grid-cols-3">
107105
<DashboardCard
108106
title="Open Pull Requests"
109107
icon={faCodePullRequest}
110-
stats={metrics.openPullRequestsCount.toString()}
108+
stats={millify(metrics.openPullRequestsCount)}
111109
/>
112110
<DashboardCard
113111
title="Recent Releases"
114112
icon={faRocket}
115-
stats={metrics.recentReleasesCount.toString()}
113+
stats={millify(metrics.recentReleasesCount)}
116114
/>
117115
<DashboardCard
118116
title="Total Releases"
119117
icon={faTags}
120-
stats={metrics.totalReleasesCount.toString()}
118+
stats={millify(metrics.totalReleasesCount)}
121119
/>
122120
</div>
123121
<BarChart

frontend/src/components/GeneralCompliantComponent.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ const GeneralCompliantComponent: FC<{
1717

1818
return (
1919
<SecondaryCard
20-
className={clsx('pointer-events-auto items-center justify-center text-center font-light', {
21-
[greenClass]: compliant,
22-
[redClass]: !compliant,
23-
})}
20+
className={clsx(
21+
'pointer-events-auto items-center justify-center text-center font-light transition-colors duration-200',
22+
{
23+
[greenClass]: compliant,
24+
[redClass]: !compliant,
25+
}
26+
)}
2427
>
2528
<Tooltip content={title} placement="top">
2629
<FontAwesomeIcon icon={icon} className="text-4xl" />

0 commit comments

Comments
 (0)