Skip to content

Commit f250a6e

Browse files
feat: add toop tip content to bucket, measurement, fields, and tag keys titles (#4683)
1 parent 3e3f79d commit f250a6e

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

src/dataExplorer/components/BucketSelector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import SearchableDropdown from 'src/shared/components/SearchableDropdown'
99
import {NewDataExplorerContext} from 'src/dataExplorer/context/newDataExplorer'
1010
import {BucketContext} from 'src/shared/contexts/buckets'
1111

12+
const BUCKET_TOOLTIP = `A bucket is a named location where time series data \
13+
is stored. You can think of a bucket like you would a database in SQL systems.`
14+
1215
const BucketSelector: FC = () => {
1316
const {selectedBucket, selectBucket} = useContext(NewDataExplorerContext)
1417
const {buckets} = useContext(BucketContext)
@@ -28,7 +31,7 @@ const BucketSelector: FC = () => {
2831

2932
return (
3033
<div>
31-
<SelectorTitle title="Bucket" info="Test info" />
34+
<SelectorTitle title="Bucket" info={BUCKET_TOOLTIP} />
3235
<SearchableDropdown
3336
searchTerm={searchTerm}
3437
searchPlaceholder="Search buckets"

src/dataExplorer/components/FieldSelector.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import {RemoteDataState} from 'src/types'
1515
// Syles
1616
import './Schema.scss'
1717

18+
const FIELD_TOOLTIP = `Fields and Field Values are non-indexed \
19+
key values pairs within a measurement. For SQL users, this is \
20+
conceptually similar to a non-indexed column and value.`
21+
1822
const FieldSelector: FC = () => {
1923
const {fields, loading} = useContext(FieldsContext)
2024
const [fieldsToShow, setFieldsToShow] = useState([])
@@ -61,7 +65,7 @@ const FieldSelector: FC = () => {
6165
return (
6266
<Accordion className="field-selector" expanded={true}>
6367
<Accordion.AccordionHeader className="field-selector--header">
64-
<SelectorTitle title="Fields" info="Test info" />
68+
<SelectorTitle title="Fields" info={FIELD_TOOLTIP} />
6569
</Accordion.AccordionHeader>
6670
<div className="container-side-bar">
6771
{list}

src/dataExplorer/components/MeasurementSelector.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import {MeasurementContext} from 'src/dataExplorer/context/measurements'
1212
// Types
1313
import {RemoteDataState} from 'src/types'
1414

15+
const MEASUREMENT_TOOLTIP = `The measurement acts as a container for tags, \
16+
fields, and the time column, and the measurement name is the description of \
17+
the data that are stored in the associated fields. Measurement names are \
18+
strings, and, for any SQL users out there, a measurement is conceptually \
19+
similar to a table.`
20+
1521
const convertStatus = (remoteDataState: RemoteDataState): ComponentStatus => {
1622
switch (remoteDataState) {
1723
case RemoteDataState.Error:
@@ -45,7 +51,7 @@ const MeasurementSelector: FC = () => {
4551

4652
return (
4753
<div>
48-
<SelectorTitle title="Measurement" info="Test info" />
54+
<SelectorTitle title="Measurement" info={MEASUREMENT_TOOLTIP} />
4955
<SearchableDropdown
5056
searchTerm={searchTerm}
5157
searchPlaceholder="Search measurements"

src/dataExplorer/components/SelectorTitle.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ const SelectorTitle: FC<TitleProps> = ({title, info = ''}) => {
1717
<div>{title}</div>
1818
{info && (
1919
<div className="selector-title--icon">
20-
<QuestionMarkTooltip tooltipContents={info} diameter={14} />
20+
<QuestionMarkTooltip
21+
tooltipContents={info}
22+
diameter={14}
23+
tooltipStyle={{width: '300px'}}
24+
/>
2125
</div>
2226
)}
2327
</FlexBox>

src/dataExplorer/components/TagSelector.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import {TagsContext} from 'src/dataExplorer/context/tags'
1515
// Types
1616
import {RemoteDataState} from 'src/types'
1717

18+
const TAG_KEYS_TOOLTIP = `Tags and Tag Values are indexed key values \
19+
pairs within a measurement. For SQL users, this is conceptually \
20+
similar to an indexed column and value.`
21+
1822
interface Prop {
1923
loading: RemoteDataState
2024
tagKey: string
@@ -142,7 +146,7 @@ const TagSelector: FC = () => {
142146
() => (
143147
<Accordion className="tag-selector-key" expanded={true}>
144148
<Accordion.AccordionHeader className="tag-selector-key--header">
145-
<SelectorTitle title="Tag Keys" info="Test info" />
149+
<SelectorTitle title="Tag Keys" info={TAG_KEYS_TOOLTIP} />
146150
</Accordion.AccordionHeader>
147151
<div className="container-side-bar">{list}</div>
148152
</Accordion>

0 commit comments

Comments
 (0)