@@ -11,7 +11,7 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
1111import CSVReader , { csvReader } from './CSVReader' ;
1212import { useEffect , useState } from 'react' ;
1313import { Button } from './ui/button' ;
14- import { ArrowDown , ArrowRight } from 'lucide-react' ;
14+ import { ArrowDown , ArrowRight , InfoIcon } from 'lucide-react' ;
1515import { z } from 'zod' ;
1616import { useForm } from 'react-hook-form' ;
1717import { zodResolver } from '@hookform/resolvers/zod' ;
@@ -20,6 +20,13 @@ import { Card, CardDescription, CardHeader, CardTitle } from './ui/card';
2020import Papa from 'papaparse' ;
2121import { BiasDetectionParameters } from './bias-detection-interfaces/BiasDetectionParameters' ;
2222import { useTranslation } from 'react-i18next' ;
23+ import {
24+ Tooltip ,
25+ TooltipProvider ,
26+ TooltipTrigger ,
27+ TooltipContent ,
28+ } from './ui/touch-tooltip' ;
29+ import Markdown from 'react-markdown' ;
2330
2431const FormSchema = z . object ( {
2532 file : z . string ( {
@@ -250,11 +257,34 @@ export default function BiasSettings({
250257 { t ( 'biasSettings.form.fieldsets.parameters.title' ) }
251258 </ legend >
252259 < div className = "grid gap-3" >
253- < Label htmlFor = "iterations" >
260+ < Label
261+ htmlFor = "iterations"
262+ className = "flex flex-row items-center gap-1"
263+ >
254264 { t (
255265 'biasSettings.form.fieldsets.parameters.iterations'
256266 ) } { ' ' }
257267 ({ iter } )
268+ < TooltipProvider >
269+ < Tooltip >
270+ < TooltipTrigger
271+ onClick = { event => {
272+ event . preventDefault ( ) ;
273+ } }
274+ >
275+ < InfoIcon className = "size-3.5" />
276+ </ TooltipTrigger >
277+ < TooltipContent >
278+ < div className = "whitespace-pre-wrap max-w-full w-[400px] p-2" >
279+ < Markdown className = "-mt-2 text-gray-800 markdown" >
280+ { t (
281+ 'biasSettings.form.fieldset.parameters.iterations.tooltip'
282+ ) }
283+ </ Markdown >
284+ </ div >
285+ </ TooltipContent >
286+ </ Tooltip >
287+ </ TooltipProvider >
258288 </ Label >
259289 < Slider
260290 id = "iterations"
@@ -266,11 +296,34 @@ export default function BiasSettings({
266296 />
267297 </ div >
268298 < div className = "grid gap-3" >
269- < Label htmlFor = "min-cluster-size" >
299+ < Label
300+ htmlFor = "min-cluster-size"
301+ className = "flex flex-row items-center gap-1"
302+ >
270303 { t (
271304 'biasSettings.form.fieldsets.parameters.minClusterSize'
272305 ) } { ' ' }
273306 ({ clusters } )
307+ < TooltipProvider >
308+ < Tooltip >
309+ < TooltipTrigger
310+ onClick = { event => {
311+ event . preventDefault ( ) ;
312+ } }
313+ >
314+ < InfoIcon className = "size-3.5" />
315+ </ TooltipTrigger >
316+ < TooltipContent >
317+ < div className = "whitespace-pre-wrap max-w-full w-[400px] p-2" >
318+ < Markdown className = "-mt-2 text-gray-800 markdown" >
319+ { t (
320+ 'biasSettings.form.fieldset.parameters.iterations.tooltip'
321+ ) }
322+ </ Markdown >
323+ </ div >
324+ </ TooltipContent >
325+ </ Tooltip >
326+ </ TooltipProvider >
274327 </ Label >
275328 < Slider
276329 id = "min-cluster-size"
0 commit comments