Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/app/projects/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ProjectsHealthDashboardLayout: React.FC<{ readonly children: React.ReactNo
return (
<FontLoaderWrapper>
<DashboardWrapper>
<div className="flex flex-col md:flex-row">
<div className="flex flex-col lg:flex-row">
<ProjectsDashboardNavBar />
<main className="flex-1 p-4">{children}</main>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ const ProjectHealthMetricsDetails: FC = () => {
<div className="flex flex-col gap-4">
{metricsList && metricsLatest ? (
<>
<div className="flex items-center justify-between">
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
<div className="flex justify-start">
<h1 className="text-2xl font-bold">{metricsLatest.projectName}</h1>
<h1 className="text-lg font-bold sm:text-2xl">{metricsLatest.projectName}</h1>
<MetricsPDFButton
path={`${projectKey}/pdf`}
fileName={`${projectKey}-health-metrics`}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/GeneralCompliantComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ const GeneralCompliantComponent: FC<{
<Tooltip content={title} placement="top">
<div
className={clsx(
'group relative flex h-14 w-14 cursor-default items-center justify-center rounded-full shadow-md transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg',
'group relative flex h-10 w-10 cursor-default items-center justify-center rounded-full shadow-md transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg sm:h-14 sm:w-14',
{
'bg-green-400/80 text-green-900/90': compliant,
'bg-red-400/80 text-red-900/90': !compliant,
}
)}
>
<IconWrapper icon={icon} className="h-7 w-7" />
<IconWrapper icon={icon} className="h-5 w-5 sm:h-7 sm:w-7" />
</div>
</Tooltip>
)
Expand Down
18 changes: 8 additions & 10 deletions frontend/src/components/MetricsScoreCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const MetricsScoreCircle: FC<MetricsScoreCircleProps> = ({ score, onClick, click
scoreStyle = 'bg-yellow-400/80 text-yellow-900/90'
}

const baseClasses = `relative flex h-14 w-14 flex-col items-center justify-center rounded-full shadow-md transition-all duration-300 ${scoreStyle}`
const baseClasses = `relative flex h-10 w-10 sm:h-14 sm:w-14 flex-col items-center justify-center rounded-full shadow-md transition-all duration-300 ${scoreStyle}`
const groupClass = clickable ? 'group' : ''
const clickableClasses = clickable ? 'hover:scale-105 hover:shadow-lg cursor-pointer' : ''
const finalClasses = `${groupClass} ${baseClasses} ${clickableClasses}`
Expand All @@ -25,32 +25,30 @@ const MetricsScoreCircle: FC<MetricsScoreCircleProps> = ({ score, onClick, click
{clickable ? (
<button className={finalClasses} onClick={onClick} tabIndex={0} type="button">
<div className="absolute inset-0 rounded-full bg-linear-to-br from-white/20 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100"></div>

<div className="relative z-10 flex flex-col items-center text-center">
<span className="text-[0.5rem] font-medium tracking-wide uppercase opacity-60">
<span className="text-[0.375rem] font-medium tracking-wide uppercase opacity-60 sm:text-[0.5rem]">
Health
</span>
<span className="text-xl leading-none font-extrabold">{score}</span>
<span className="text-[0.5rem] font-medium tracking-wide uppercase opacity-60">
<span className="text-lg leading-none font-extrabold sm:text-xl">{score}</span>
<span className="text-[0.375rem] font-medium tracking-wide uppercase opacity-60 sm:text-[0.5rem]">
Score
</span>
</div>
{score < 30 && (
<div className="absolute inset-0 animate-pulse rounded-full bg-red-400/20"></div>
<div className="absolute inset-0 animate-pulse rounded-full bg-red-400/20" />
)}
</button>
) : (
<div className={finalClasses}>
<div className="relative z-10 flex flex-col items-center text-center">
<span className="text-[0.5rem] font-medium tracking-wide uppercase opacity-60">
<span className="text-[0.375rem] font-medium tracking-wide uppercase opacity-60 sm:text-[0.5rem]">
Health
</span>
<span className="text-xl leading-none font-extrabold">{score}</span>
<span className="text-[0.5rem] font-medium tracking-wide uppercase opacity-60">
<span className="text-lg leading-none font-extrabold sm:text-xl">{score}</span>
<span className="text-[0.375rem] font-medium tracking-wide uppercase opacity-60 sm:text-[0.5rem]">
Score
</span>
</div>

{score < 30 && (
<div className="absolute inset-0 animate-pulse rounded-full bg-red-400/20" />
)}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ProjectsDashboardNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ProjectsDashboardNavBar: React.FC = () => {
return (
<Navbar
classNames={{
base: 'flex md:w-64 md:flex-col flex-row items-start justify-start py-4',
base: 'flex lg:w-64 lg:flex-col flex-row items-start justify-start py-4',
item: [
'data-[active=true]:bg-gray-200',
'dark:data-[active=true]:bg-gray-800',
Expand All @@ -37,7 +37,7 @@ const ProjectsDashboardNavBar: React.FC = () => {
}}
position="static"
>
<NavbarContent className="flex h-full justify-center md:flex-col md:items-start">
<NavbarContent className="flex h-full justify-center lg:flex-col lg:items-start">
{NAVIGATION_ITEMS.map(({ href, label, icon }) => (
<NavbarItem key={href} isActive={isActive(href)}>
<Link
Expand Down
Loading