File tree Expand file tree Collapse file tree 4 files changed +50
-2
lines changed
Expand file tree Collapse file tree 4 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727 TooltipContent ,
2828} from './ui/touch-tooltip' ;
2929import Markdown from 'react-markdown' ;
30+ import { IconInfoTooltip } from './ui/info-icon-tooltip' ;
3031
3132const FormSchema = z . object ( {
3233 file : z . string ( {
@@ -165,8 +166,14 @@ export default function BiasSettings({
165166 { t ( 'biasSettings.form.fieldsets.data.title' ) }
166167 </ legend >
167168 < div className = "relative grid gap-3 select-none" >
168- < div className = "absolute -top-[10px] leading-0 left-4 px-1 bg-white text-sm font-medium" >
169+ < div className = "flex flex-row items-center gap-1 absolute -top-[10px] leading-0 left-4 px-1 bg-white text-sm font-medium" >
169170 { t ( 'biasSettings.form.fieldsets.data.dataSet' ) }
171+
172+ < IconInfoTooltip
173+ tooltipText = { t (
174+ 'biasSettings.form.fieldsets.data.dataSetTooltip'
175+ ) }
176+ />
170177 </ div >
171178 < FormField
172179 control = { form . control }
@@ -342,10 +349,15 @@ export default function BiasSettings({
342349 />
343350 </ div >
344351 < div className = "flex flex-col gap-3" >
345- < label className = "text-sm font-medium" >
352+ < label className = "flex flex-row gap-1 items-center text-sm font-medium" >
346353 { t (
347354 'biasSettings.form.fieldsets.parameters.performanceInterpretation.title'
348355 ) }
356+ < IconInfoTooltip
357+ tooltipText = { t (
358+ 'biasSettings.form.fieldsets.parameters.performanceInterpretation.tooltip'
359+ ) }
360+ />
349361 </ label >
350362 < FormField
351363 control = { form . control }
Original file line number Diff line number Diff line change 1+ import { InfoIcon } from 'lucide-react' ;
2+ import {
3+ Tooltip ,
4+ TooltipContent ,
5+ TooltipProvider ,
6+ TooltipTrigger ,
7+ } from './touch-tooltip' ;
8+ import Markdown from 'react-markdown' ;
9+
10+ export const IconInfoTooltip = ( { tooltipText } : { tooltipText : string } ) => {
11+ return (
12+ < TooltipProvider >
13+ < Tooltip >
14+ < TooltipTrigger
15+ onClick = { event => {
16+ event . preventDefault ( ) ;
17+ } }
18+ >
19+ < InfoIcon className = "size-3.5" />
20+ </ TooltipTrigger >
21+ < TooltipContent >
22+ < div className = "whitespace-pre-wrap max-w-full w-[400px] p-2" >
23+ < Markdown className = "-mt-2 text-gray-800 markdown" >
24+ { tooltipText }
25+ </ Markdown >
26+ </ div >
27+ </ TooltipContent >
28+ </ Tooltip >
29+ </ TooltipProvider >
30+ ) ;
31+ } ;
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export const en = {
2828 data : {
2929 title : 'Data' ,
3030 dataSet : 'Dataset' ,
31+ dataSetTooltip : `Your data should be prepared as follows: ...` ,
3132 performanceMetric : 'Bias metric' ,
3233 } ,
3334 parameters : {
@@ -38,6 +39,7 @@ export const en = {
3839 title : 'Bias metric interpretation' ,
3940 lower : 'Lower value of bias metric is better, e.g., error rate' ,
4041 higher : 'Higher value of bias metric is better, e.g., accuracy' ,
42+ tooltip : 'Clustering will be based on the bias metrics' ,
4143 } ,
4244 iterationsTooltip :
4345 'Number of times the dataset is split in smaller clusters until the minimal cluster size is reached' ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export const nl = {
2626 data : {
2727 title : 'Data' ,
2828 dataSet : 'Dataset' ,
29+ dataSetTooltip : `Data wordt als volgt behandeld: ...` ,
2930 performanceMetric : 'Gelijkheidsmetriek' ,
3031 } ,
3132 parameters : {
@@ -36,6 +37,8 @@ export const nl = {
3637 title : 'Interpretatie van gelijkheidsmetriek' ,
3738 lower : 'Lagere waarde van gelijkheidsmetriek is beter, bijv. foutpercentage' ,
3839 higher : 'Hogere waarde van gelijkheidsmetriek is beter, bijv. nauwkeurigheid' ,
40+ tooltip :
41+ 'Clustering is gebaseerd op de gelijkheidsmetriek.' ,
3942 } ,
4043 iterationsTooltip :
4144 'Aantal keren dat de dataset wordt opgesplitst in kleinere clusters totdat de minimale clustergrootte is bereikt.' ,
You can’t perform that action at this time.
0 commit comments