diff --git a/src/renderer/components/filters/FilterSection.tsx b/src/renderer/components/filters/FilterSection.tsx index 47dbf8517..9fc98e521 100644 --- a/src/renderer/components/filters/FilterSection.tsx +++ b/src/renderer/components/filters/FilterSection.tsx @@ -7,7 +7,6 @@ import { AppContext } from '../../context/App'; import type { FilterSettingsState, FilterValue } from '../../types'; import type { Filter } from '../../utils/notifications/filters'; import { Checkbox } from '../fields/Checkbox'; -import { Tooltip } from '../fields/Tooltip'; import { Title } from '../primitives/Title'; import { RequiresDetailedNotificationWarning } from './RequiresDetailedNotificationsWarning'; @@ -34,22 +33,21 @@ export const FilterSection = ({ return (
- - {title} - {tooltip && ( - - {tooltip} - {filter.requiresDetailsNotifications && ( - - )} - - } - /> - )} - + + {tooltip} + {filter.requiresDetailsNotifications && ( + <RequiresDetailedNotificationWarning /> + )} + </> + ) + } + > + {title} + { return (
- - Organizations - - Filter notifications by organization. - - } - /> - + + <Text>Filter notifications by organization.</Text> + </Stack> + } + > + Organizations + + { return (
- - Handles - - Filter notifications by user handle. - - - } - /> - + + <Text>Filter notifications by user handle.</Text> + <RequiresDetailedNotificationWarning /> + </Stack> + } + > + Handles + + -
- + +
- + FilterSectionTitle +
- -
+
+
-
- + +
- + + +

+ FilterSectionTitle +

- -
+
+
-
- + +
- + FilterSectionTitle +
- -
+
+
-
- + +
- + + +

+ FilterSectionTitle +

- -
+
+
-
- + +
+ +

+ Reason +

-

- Reason -

- -
-
-
+
-
- + +
+ +

+ Reason +

-

- Reason -

- -
-
-
+
-
- + +
+ +

+ State +

-

- State -

- -
-
-
+
-
- + +
+ +

+ State +

-

- State -

- -
-
-
+
-
- + +
+ +

+ Type +

-

- Type -

- -
-
-
+
-
- + +
+ +

+ Type +

-

- Type -

- -
-
-
+
-
- + +
+ +

+ Handles +

-

- Handles -

- -
-
-
+
-
- + +
+ +

+ Handles +

-

- Handles -

- -
-
-
+
-
- + +
+ +

+ Handles +

-

- Handles -

- -
-
-
+
-
- + +
+ +

+ Handles +

-

- Handles -

- -
-
-
+
-
- + +
+ +

+ User Type +

-

- User Type -

- -
-
-
+
-
- + +
+ +

+ User Type +

-

- User Type -

- -
-
-
+
= ({ size = 2, ...props }) => { + const name = props.children.toLowerCase().replace(' ', '-'); + return ( @@ -17,10 +22,20 @@ export const Title: FC = ({ size = 2, ...props }) => { align="center" direction="horizontal" gap="condensed" - id={props.children.toLowerCase().replace(' ', '-')} + id={`title-${name}`} > {props.children} + {props.tooltip && ( + + {props.tooltip} + + } + /> + )} diff --git a/src/renderer/components/primitives/__snapshots__/Header.test.tsx.snap b/src/renderer/components/primitives/__snapshots__/Header.test.tsx.snap index 8beccf1ae..6ab3e59d1 100644 --- a/src/renderer/components/primitives/__snapshots__/Header.test.tsx.snap +++ b/src/renderer/components/primitives/__snapshots__/Header.test.tsx.snap @@ -56,7 +56,7 @@ exports[`renderer/components/primitives/Header.tsx should render itself & its ch data-justify="start" data-padding="none" data-wrap="nowrap" - id="test-header" + id="title-test-header" >
- + +
+ +

+ User Type +

-

- User Type -

- -
-
-
+
-
- + +
+ +

+ Handles +

-

- Handles -

- -
-
-
+
-
- + +
+ +

+ Organizations +

-

- Organizations -

- -
-
-
+
-
- + +
+ +

+ Type +

-

- Type -

- -
-
-
+
-
- + +
+ +

+ State +

-

- State -

- -
-
-
+
-
- + +
+ +

+ Reason +

-

- Reason -

- -
-
-
+