Skip to content

Commit 31ce5be

Browse files
committed
style: standardize card hover states to DESIGN.md spec across dashboard and agents
Normalize all interactive cards to use consistent hover treatment: transition-all duration-100 ease-out, hover:-translate-y-px, hover:shadow-md, hover:border-primary/25. Fixes inconsistent translate, shadow, border opacity, and duration values across 10 card components.
1 parent 25d3e1a commit 31ce5be

File tree

11 files changed

+164
-17
lines changed

11 files changed

+164
-17
lines changed

apps/desktop/src/features/agents/components/SpecialistCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ export function SpecialistCard({ specialist, onChat, recentOutputs, recentBundle
3333
return (
3434
<article
3535
className={cn(
36-
"group/card relative flex flex-col rounded-xl border bg-card transition-all duration-150",
37-
"hover:-translate-y-0.5 hover:shadow-lg hover:shadow-black/5 dark:hover:shadow-black/20",
36+
"group/card relative flex flex-col rounded-xl border bg-card transition-all duration-100 ease-out",
37+
"hover:-translate-y-px hover:shadow-md hover:border-primary/25",
3838
isManager
39-
? "border-primary/20 bg-primary/[0.02] ring-1 ring-primary/[0.06] hover:border-primary/30 hover:ring-primary/10"
40-
: cn("dark:border-white/[0.06]", colors.chipBorder, colors.hoverBorder),
39+
? "border-primary/20 bg-primary/[0.02] ring-1 ring-primary/[0.06] hover:ring-primary/10"
40+
: cn("dark:border-white/[0.06]", colors.chipBorder),
4141
)}
4242
>
4343
{/* Card body */}

apps/desktop/src/features/dashboard/components/ActionCardItem.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ export function ActionCardItem({ card, isCompleted, isHero, isLoading, specialis
3939
isLoading
4040
? "pointer-events-none border-border/30 bg-card/50 opacity-60"
4141
: isCompleted
42-
? "cursor-pointer border-primary/15 bg-card hover:border-primary/25 hover:shadow-sm"
42+
? "cursor-pointer border-primary/15 bg-card hover:-translate-y-px hover:border-primary/25 hover:shadow-md"
4343
: isSecondary
44-
? "cursor-pointer border-border/10 bg-card/50 hover:border-border/25 hover:bg-card hover:shadow-sm dark:border-white/[0.04] dark:hover:border-white/[0.08]"
44+
? "cursor-pointer border-border/10 bg-card/50 hover:-translate-y-px hover:border-primary/25 hover:bg-card hover:shadow-md dark:border-white/[0.04]"
4545
: isHero
46-
? "cursor-pointer border-border/30 bg-card hover:-translate-y-0.5 hover:border-primary/25 hover:shadow-lg hover:shadow-black/5 dark:border-white/[0.08] dark:hover:shadow-black/20"
47-
: "cursor-pointer border-border/20 bg-card hover:-translate-y-0.5 hover:border-primary/20 hover:shadow-lg hover:shadow-black/5 dark:hover:shadow-black/20"
46+
? "cursor-pointer border-border/30 bg-card hover:-translate-y-px hover:border-primary/25 hover:shadow-md dark:border-white/[0.08]"
47+
: "cursor-pointer border-border/20 bg-card hover:-translate-y-px hover:border-primary/25 hover:shadow-md"
4848
}`}
4949
onClick={() => {
5050
if (!isLoading) {

apps/desktop/src/features/dashboard/components/ArtifactCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function ArtifactCard({ artifact, specialistId, specialistName, onPreview
3232
tabIndex={onNavigate ? 0 : undefined}
3333
onClick={onNavigate ? handleClick : undefined}
3434
onKeyDown={onNavigate ? (e) => { if (e.key === "Enter" || e.key === " ") handleClick(); } : undefined}
35-
className={`group/artifact relative rounded-lg border transition-all duration-100 hover:-translate-y-px hover:border-primary/30 hover:shadow-sm ${onNavigate ? "cursor-pointer" : ""} ${compact ? "p-2" : "p-3"}`}
35+
className={`group/artifact relative rounded-lg border transition-all duration-100 ease-out hover:-translate-y-px hover:border-primary/25 hover:shadow-md ${onNavigate ? "cursor-pointer" : ""} ${compact ? "p-2" : "p-3"}`}
3636
>
3737
{/* Left accent bar */}
3838
<div

apps/desktop/src/features/dashboard/components/BundleCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function BundleCard({ bundle, specialistId, specialistName, onPreview, on
2424
}
2525

2626
return (
27-
<div className="relative rounded-lg border transition-all duration-100 hover:border-primary/30">
27+
<div className="relative rounded-lg border transition-all duration-100 ease-out hover:-translate-y-px hover:border-primary/25 hover:shadow-md">
2828
{/* Left accent bar — primary emerald for bundles */}
2929
<div className="absolute inset-y-0 left-0 w-[3px] rounded-l-[inherit] bg-primary opacity-60 transition-opacity hover:opacity-100" />
3030

apps/desktop/src/features/dashboard/components/FeedItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function FeedItemCard({ item }: FeedItemCardProps) {
2323
const Icon = item.icon;
2424

2525
return (
26-
<div className="group/feed relative flex flex-col overflow-hidden rounded-lg border border-border/50 bg-card/80 transition-all duration-150 hover:-translate-y-px hover:border-primary/30 hover:shadow-sm">
26+
<div className="group/feed relative flex flex-col overflow-hidden rounded-lg border border-border/50 bg-card/80 transition-all duration-100 ease-out hover:-translate-y-px hover:border-primary/25 hover:shadow-md">
2727
<div
2828
className={`absolute inset-y-0 left-0 w-[3px] rounded-l-[inherit] ${item.accentColor} opacity-50 transition-opacity group-hover/feed:opacity-100`}
2929
/>

apps/desktop/src/features/dashboard/components/HeroRecommendedMove.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function HeroRecommendedMove({
2020
<button
2121
type="button"
2222
onClick={() => onActionClick?.(recommendation.actionId)}
23-
className="group/move mt-2.5 flex w-full items-center gap-3 rounded-xl border border-primary/15 bg-primary/[0.03] px-4 py-3.5 text-left transition-all duration-100 hover:-translate-y-px hover:border-primary/30 hover:bg-primary/[0.06] hover:shadow-sm hover:shadow-primary/5 dark:border-primary/10 dark:bg-primary/[0.03] dark:hover:border-primary/25 dark:hover:bg-primary/[0.06]"
23+
className="group/move mt-2.5 flex w-full items-center gap-3 rounded-xl border border-primary/15 bg-primary/[0.03] px-4 py-3.5 text-left transition-all duration-100 ease-out hover:-translate-y-px hover:border-primary/25 hover:bg-primary/[0.06] hover:shadow-md dark:border-primary/10 dark:bg-primary/[0.03]"
2424
>
2525
<div className="flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/12 text-primary transition-colors duration-100 group-hover/move:bg-primary group-hover/move:text-white">
2626
<ZapIcon className="size-3.5" />

apps/desktop/src/features/dashboard/components/OpportunityCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function OpportunityCard({ completedActions, opportunity, onActionClick,
3131
<div
3232
role="button"
3333
tabIndex={0}
34-
className="group/insight relative flex flex-col overflow-hidden rounded-lg border border-border/50 bg-card/80 transition-all duration-150 hover:-translate-y-px hover:border-primary/30 hover:shadow-sm cursor-pointer"
34+
className="group/insight relative flex flex-col overflow-hidden rounded-lg border border-border/50 bg-card/80 transition-all duration-100 ease-out hover:-translate-y-px hover:border-primary/25 hover:shadow-md cursor-pointer"
3535
onClick={handleCardClick}
3636
onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); handleCardClick(); } }}
3737
>

apps/desktop/src/features/dashboard/components/PlaybookCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function PlaybookCard({ playbook, onClick }: PlaybookCardProps) {
6464

6565
return (
6666
<Card
67-
className="group/playbook relative flex flex-col overflow-hidden border border-border/50 bg-card/90 transition-all duration-100 cursor-pointer hover:-translate-y-px hover:border-primary/30 hover:shadow-md hover:shadow-primary/5"
67+
className="group/playbook relative flex flex-col overflow-hidden border border-border/50 bg-card/90 transition-all duration-100 ease-out cursor-pointer hover:-translate-y-px hover:border-primary/25 hover:shadow-md"
6868
onClick={() => onClick?.(playbook)}
6969
>
7070
{/* Goal type accent — thin left border */}

apps/desktop/src/features/dashboard/components/RecentOutputs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function RecentOutputs({ agentId, client, onPreview, onNavigate, onSpecia
103103
<button
104104
key={example.name}
105105
type="button"
106-
className="group/example flex flex-col items-start gap-2 rounded-lg border border-border/20 bg-card/50 p-3 text-left transition-all duration-100 hover:-translate-y-px hover:border-primary/20 hover:bg-card hover:shadow-sm dark:border-white/[0.04] dark:hover:border-primary/15 dark:hover:bg-white/[0.03]"
106+
className="group/example flex flex-col items-start gap-2 rounded-lg border border-border/20 bg-card/50 p-3 text-left transition-all duration-100 ease-out hover:-translate-y-px hover:border-primary/25 hover:bg-card hover:shadow-md dark:border-white/[0.04]"
107107
onClick={() => onSpecialistChat?.(example.specialistId)}
108108
>
109109
{/* Type badge */}

apps/desktop/src/features/dashboard/components/RecommendedJobCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export function RecommendedJobCard({ job, isHero, onClick }: RecommendedJobCardP
1616
type="button"
1717
className={`group/job relative flex flex-col items-start gap-2.5 overflow-hidden rounded-xl border bg-card text-left transition-all duration-100 ease-out ${
1818
isHero
19-
? "border-primary/15 p-5 hover:-translate-y-0.5 hover:border-primary/30 hover:shadow-lg hover:shadow-primary/5 dark:border-primary/10 dark:hover:border-primary/25 dark:hover:shadow-primary/5"
20-
: "border-border/20 p-4 hover:-translate-y-0.5 hover:border-primary/20 hover:shadow-md hover:shadow-black/5 dark:border-white/[0.06] dark:hover:shadow-black/20"
19+
? "border-primary/15 p-5 hover:-translate-y-px hover:border-primary/25 hover:shadow-md dark:border-primary/10"
20+
: "border-border/20 p-4 hover:-translate-y-px hover:border-primary/25 hover:shadow-md dark:border-white/[0.06]"
2121
}`}
2222
onClick={() => onClick?.(job.id, buildActionPrompt(job), job.title)}
2323
>

0 commit comments

Comments
 (0)