1+ import { Checkbox } from "@components/Checkbox" ;
12import { SignalReportPriorityBadge } from "@features/inbox/components/utils/SignalReportPriorityBadge" ;
23import { SignalReportStatusBadge } from "@features/inbox/components/utils/SignalReportStatusBadge" ;
34import { SignalReportSummaryMarkdown } from "@features/inbox/components/utils/SignalReportSummaryMarkdown" ;
45import { SOURCE_PRODUCT_META } from "@features/inbox/components/utils/source-product-icons" ;
56import { EyeIcon } from "@phosphor-icons/react" ;
6- import { Checkbox , Flex , Text , Tooltip } from "@radix-ui/themes" ;
7+ import { Flex , Text , Tooltip } from "@radix-ui/themes" ;
78import type { SignalReport } from "@shared/types" ;
89import { motion } from "framer-motion" ;
910import type { KeyboardEvent , MouseEvent } from "react" ;
@@ -33,19 +34,6 @@ export function ReportListRow({
3334 } ,
3435 ) ;
3536
36- const isStrongSignal = report . total_weight >= 65 || report . signal_count >= 20 ;
37- const isMediumSignal = report . total_weight >= 30 || report . signal_count >= 6 ;
38- const strengthColor = isStrongSignal
39- ? "var(--green-9)"
40- : isMediumSignal
41- ? "var(--yellow-9)"
42- : "var(--gray-8)" ;
43- const strengthLabel = isStrongSignal
44- ? "strong"
45- : isMediumSignal
46- ? "medium"
47- : "light" ;
48-
4937 const isReady = report . status === "ready" ;
5038
5139 const isInteractiveTarget = ( target : EventTarget | null ) : boolean => {
@@ -67,6 +55,14 @@ export function ReportListRow({
6755 onToggleChecked ( ) ;
6856 } ;
6957
58+ const rowBgClass = isSelected
59+ ? "bg-gray-3"
60+ : isChecked
61+ ? "bg-gray-2"
62+ : report . is_suggested_reviewer
63+ ? "bg-blue-2"
64+ : "" ;
65+
7066 return (
7167 < motion . div
7268 role = "button"
@@ -96,23 +92,21 @@ export function ReportListRow({
9692 handleToggleChecked ( e ) ;
9793 }
9894 } }
99- className = "w-full cursor-pointer overflow-hidden border-gray-5 border-b py-2 pr-3 pl-2 text-left transition-colors hover:bg-gray-2"
100- style = { {
101- backgroundColor : isSelected
102- ? "var(--gray-3)"
103- : isChecked
104- ? "var(--gray-2)"
105- : report . is_suggested_reviewer
106- ? "var(--blue-2)"
107- : "transparent" ,
108- } }
95+ className = { [
96+ "relative isolate w-full cursor-pointer overflow-hidden border-gray-5 border-b py-2 pr-3 pl-2 text-left" ,
97+ "before:pointer-events-none before:absolute before:inset-0 before:z-[1] before:bg-gray-12 before:opacity-0 hover:before:opacity-[0.07]" ,
98+ rowBgClass ,
99+ ]
100+ . filter ( Boolean )
101+ . join ( " " ) }
109102 >
110- < Flex align = "start" justify = "between" gap = "3" >
103+ < Flex align = "start" justify = "between" gap = "3" className = "relative z-[2]" >
111104 < Flex align = "start" gap = "2" style = { { minWidth : 0 , flex : 1 } } >
112105 < Flex align = "center" justify = "center" className = "shrink-0 pt-0.5" >
113106 < Checkbox
114107 size = "1"
115108 checked = { isChecked }
109+ className = "mt-0.5"
116110 tabIndex = { - 1 }
117111 onMouseDown = { ( e ) => {
118112 e . preventDefault ( ) ;
@@ -129,16 +123,16 @@ export function ReportListRow({
129123 />
130124 </ Flex >
131125
132- < Flex direction = "column" gap = "1 " style = { { minWidth : 0 , flex : 1 } } >
126+ < Flex direction = "column" gap = "0.5 " style = { { minWidth : 0 , flex : 1 } } >
133127 < Flex align = "start" gapX = "2" className = "min-w-0" >
134- < Flex
135- direction = "column"
136- align = "center "
137- gap = "0.5 "
138- className = "shrink-0 pt-1 "
139- >
140- { ( report . source_products ?? [ ] ) . length > 0 ? (
141- ( report . source_products ?? [ ] ) . map ( ( sp ) => {
128+ { ( report . source_products ?? [ ] ) . length > 0 && (
129+ < Flex
130+ direction = "column "
131+ align = "center "
132+ gap = "0.5 "
133+ className = "shrink-0 pt-1"
134+ >
135+ { ( report . source_products ?? [ ] ) . map ( ( sp ) => {
142136 const meta = SOURCE_PRODUCT_META [ sp ] ;
143137 if ( ! meta ) return null ;
144138 const { Icon } = meta ;
@@ -147,16 +141,9 @@ export function ReportListRow({
147141 < Icon size = { 12 } />
148142 </ span >
149143 ) ;
150- } )
151- ) : (
152- < span
153- title = { `Signal strength: ${ strengthLabel } ` }
154- aria-hidden
155- className = "mt-1 inline-block h-1.5 w-1.5 rounded-full"
156- style = { { backgroundColor : strengthColor } }
157- />
158- ) }
159- </ Flex >
144+ } ) }
145+ </ Flex >
146+ ) }
160147
161148 < Flex
162149 align = "center"
0 commit comments