@@ -15,6 +15,7 @@ import { AllIcons, Icon } from '../../shared/components/Icon'
1515import { IconMenu } from '../../shared/components/iconMenu/IconMenu'
1616import { IconMenuItemProps } from '../../shared/components/iconMenu/IconMenuItem'
1717import { sendMessage } from '../../shared/vscode'
18+ import Tooltip from '../../shared/components/tooltip/Tooltip'
1819
1920export interface PlotsContainerProps {
2021 sectionCollapsed : SectionCollapsed
@@ -31,6 +32,24 @@ export type BasicContainerProps = Pick<
3132 'onRename' | 'onResize' | 'sectionCollapsed'
3233>
3334
35+ export const SectionDescription = {
36+ [ Section . CHECKPOINT_PLOTS ] :
37+ 'Linear plots based on data from the experiments table.' ,
38+ [ Section . COMPARISON_TABLE ] :
39+ 'A table used to display image plots side by side.' ,
40+ [ Section . TEMPLATE_PLOTS ] :
41+ 'JSON, YAML, CSV or TSV files visualized using Vega pre-defined or custom Vega-Lite templates.'
42+ }
43+
44+ const InfoIcon = ( ) => (
45+ < Icon
46+ icon = { AllIcons . INFO }
47+ width = { 16 }
48+ height = { 16 }
49+ className = { styles . infoIcon }
50+ />
51+ )
52+
3453export const PlotsContainer : React . FC < PlotsContainerProps > = ( {
3554 sectionCollapsed,
3655 sectionKey,
@@ -96,6 +115,13 @@ export const PlotsContainer: React.FC<PlotsContainerProps> = ({
96115 onRename ( sectionKey , title )
97116 }
98117
118+ const tooltipContent = (
119+ < div className = { styles . infoTooltip } >
120+ < InfoIcon />
121+ { SectionDescription [ sectionKey ] }
122+ </ div >
123+ )
124+
99125 return (
100126 < div className = { styles . plotsContainerWrapper } >
101127 < details open = { open } className = { styles . plotsContainer } >
@@ -126,6 +152,14 @@ export const PlotsContainer: React.FC<PlotsContainerProps> = ({
126152 ) : (
127153 sectionTitle
128154 ) }
155+ < Tooltip content = { tooltipContent } placement = "bottom-end" >
156+ < div
157+ className = { styles . infoTooltipToggle }
158+ data-testid = "info-tooltip-toggle"
159+ >
160+ < InfoIcon />
161+ </ div >
162+ </ Tooltip >
129163 </ summary >
130164 < div >
131165 { open && (
0 commit comments