@@ -4,7 +4,7 @@ import { useProjectDetails } from 'data-services/hooks/projects/useProjectDetail
44import { ProjectDetails } from 'data-services/models/project-details'
55import { InputValue } from 'design-system/components/input/input'
66import { ChevronRightIcon , InfoIcon } from 'lucide-react'
7- import { Button , buttonVariants , Switch , Tooltip } from 'nova-ui-kit'
7+ import { Button , buttonVariants , Popover , Switch } from 'nova-ui-kit'
88import { Link , useParams } from 'react-router-dom'
99import { APP_ROUTES } from 'utils/constants'
1010import { STRING , translate } from 'utils/language'
@@ -50,59 +50,57 @@ export const DefaultFiltersTooltip = ({
5050 className ?: string
5151 project : ProjectDetails
5252} ) => (
53- < Tooltip . Provider delayDuration = { 0 } >
54- < Tooltip . Root >
55- < Tooltip . Trigger asChild >
56- < Button
57- aria-label = { translate ( STRING . INFO ) }
58- className = { className }
59- size = "icon"
60- variant = "ghost"
61- >
62- < InfoIcon className = "w-4 h-4" />
63- </ Button >
64- </ Tooltip . Trigger >
65- < Tooltip . Content className = "p-4 max-w-xs" >
66- < div className = "flex flex-col gap-4" >
67- < div className = "flex flex-col gap-4 border-b border-border pb-4" >
68- < p className = "body-small italic text-muted-foreground" >
69- Data is filtered by default based on global project configuration.
70- </ p >
71- < FormRow >
72- < InputValue
73- label = "Score threshold"
74- value = { project . settings . scoreThreshold }
75- />
76- </ FormRow >
77- < FormRow >
78- < InputValue
79- label = "Include taxa"
80- value = { project . settings . includeTaxa
81- . map ( ( taxon ) => taxon . name )
82- . join ( ', ' ) }
83- />
84- < InputValue
85- label = "Exclude taxa"
86- value = { project . settings . excludeTaxa
87- . map ( ( taxon ) => taxon . name )
88- . join ( ', ' ) }
89- />
90- </ FormRow >
91- </ div >
92- { project . canUpdate ? (
93- < Link
94- className = { classNames (
95- buttonVariants ( { size : 'small' , variant : 'ghost' } ) ,
96- '!w-auto self-end'
97- ) }
98- to = { APP_ROUTES . DEFAULT_FILTERS ( { projectId : project . id } ) }
99- >
100- < span > { translate ( STRING . CONFIGURE ) } </ span >
101- < ChevronRightIcon className = "w-4 h-4" />
102- </ Link >
103- ) : null }
53+ < Popover . Root >
54+ < Popover . Trigger asChild >
55+ < Button
56+ aria-label = { translate ( STRING . INFO ) }
57+ className = { className }
58+ size = "icon"
59+ variant = "ghost"
60+ >
61+ < InfoIcon className = "w-4 h-4" />
62+ </ Button >
63+ </ Popover . Trigger >
64+ < Popover . Content className = "p-4 max-w-xs" >
65+ < div className = "flex flex-col gap-4" >
66+ < div className = "flex flex-col gap-4 border-b border-border pb-4" >
67+ < p className = "body-small italic text-muted-foreground" >
68+ { translate ( STRING . MESSAGE_DEFAULT_FILTERS ) }
69+ </ p >
70+ < FormRow >
71+ < InputValue
72+ label = "Score threshold"
73+ value = { project . settings . scoreThreshold }
74+ />
75+ </ FormRow >
76+ < FormRow >
77+ < InputValue
78+ label = "Include taxa"
79+ value = { project . settings . includeTaxa
80+ . map ( ( taxon ) => taxon . name )
81+ . join ( ', ' ) }
82+ />
83+ < InputValue
84+ label = "Exclude taxa"
85+ value = { project . settings . excludeTaxa
86+ . map ( ( taxon ) => taxon . name )
87+ . join ( ', ' ) }
88+ />
89+ </ FormRow >
10490 </ div >
105- </ Tooltip . Content >
106- </ Tooltip . Root >
107- </ Tooltip . Provider >
91+ { project . canUpdate ? (
92+ < Link
93+ className = { classNames (
94+ buttonVariants ( { size : 'small' , variant : 'ghost' } ) ,
95+ '!w-auto self-end'
96+ ) }
97+ to = { APP_ROUTES . DEFAULT_FILTERS ( { projectId : project . id } ) }
98+ >
99+ < span > { translate ( STRING . CONFIGURE ) } </ span >
100+ < ChevronRightIcon className = "w-4 h-4" />
101+ </ Link >
102+ ) : null }
103+ </ div >
104+ </ Popover . Content >
105+ </ Popover . Root >
108106)
0 commit comments