From 7a6321746caea91aed749304c7ad2eaf359e6fb4 Mon Sep 17 00:00:00 2001 From: olav Date: Wed, 22 Jun 2022 14:48:55 +0200 Subject: [PATCH] refactor: improve segment warning texts --- .../SegmentDocs/SegmentDocs.styles.ts | 18 -------- .../segments/SegmentDocs/SegmentDocs.tsx | 41 +------------------ .../segments/SegmentTable/SegmentTable.tsx | 6 +-- 3 files changed, 3 insertions(+), 62 deletions(-) delete mode 100644 frontend/src/component/segments/SegmentDocs/SegmentDocs.styles.ts diff --git a/frontend/src/component/segments/SegmentDocs/SegmentDocs.styles.ts b/frontend/src/component/segments/SegmentDocs/SegmentDocs.styles.ts deleted file mode 100644 index 866b65d299..0000000000 --- a/frontend/src/component/segments/SegmentDocs/SegmentDocs.styles.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { makeStyles } from 'tss-react/mui'; - -export const useStyles = makeStyles()(theme => ({ - paragraph: { - [theme.breakpoints.down('lg')]: { - display: 'inline', - '&:after': { - content: '" "', - }, - }, - [theme.breakpoints.up('md')]: { - display: 'block', - '& + &': { - marginTop: '0.25rem', - }, - }, - }, -})); diff --git a/frontend/src/component/segments/SegmentDocs/SegmentDocs.tsx b/frontend/src/component/segments/SegmentDocs/SegmentDocs.tsx index 1bb3b503b5..27c4d0fca6 100644 --- a/frontend/src/component/segments/SegmentDocs/SegmentDocs.tsx +++ b/frontend/src/component/segments/SegmentDocs/SegmentDocs.tsx @@ -1,26 +1,6 @@ import { Alert } from '@mui/material'; -import { useStyles } from 'component/segments/SegmentDocs/SegmentDocs.styles'; import { useSegmentLimits } from 'hooks/api/getters/useSegmentLimits/useSegmentLimits'; -export const SegmentDocsWarning = () => { - const { classes: styles } = useStyles(); - - return ( - -

- Segments is an experimental feature available to select users. -

-

- This feature is currently in development. Future versions may - require to update your SDKs. -

-

- -

-
- ); -}; - export const SegmentDocsValuesWarning = () => { const { segmentValuesLimit } = useSegmentLimits(); @@ -30,9 +10,8 @@ export const SegmentDocsValuesWarning = () => { return ( - Segments is an experimental feature available to select users. - Currently, segments are limited to at most {segmentValuesLimit}{' '} - values. + Segments is an experimental feature, currently limited to at most{' '} + {segmentValuesLimit} values. ); }; @@ -68,22 +47,6 @@ export const SegmentDocsStrategyWarning = () => { ); }; -const SegmentDocsLink = () => { - return ( - <> - - Read more about segments in the documentation - - . - - ); -}; - const SegmentLimitsLink = () => { return ( <> diff --git a/frontend/src/component/segments/SegmentTable/SegmentTable.tsx b/frontend/src/component/segments/SegmentTable/SegmentTable.tsx index e59cd7e9bd..b159af5ef6 100644 --- a/frontend/src/component/segments/SegmentTable/SegmentTable.tsx +++ b/frontend/src/component/segments/SegmentTable/SegmentTable.tsx @@ -11,7 +11,7 @@ import { import { useTable, useGlobalFilter, useSortBy } from 'react-table'; import { CreateSegmentButton } from 'component/segments/CreateSegmentButton/CreateSegmentButton'; import { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext'; -import { useMediaQuery, Box } from '@mui/material'; +import { useMediaQuery } from '@mui/material'; import { sortTypes } from 'utils/sortTypes'; import { useSegments } from 'hooks/api/getters/useSegments/useSegments'; import { useMemo, useEffect, useState } from 'react'; @@ -22,7 +22,6 @@ import { SegmentActionCell } from 'component/segments/SegmentActionCell/SegmentA import { HighlightCell } from 'component/common/Table/cells/HighlightCell/HighlightCell'; import { DateCell } from 'component/common/Table/cells/DateCell/DateCell'; import theme from 'themes/theme'; -import { SegmentDocsWarning } from 'component/segments/SegmentDocs/SegmentDocs'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { Search } from 'component/common/Search/Search'; @@ -99,9 +98,6 @@ export const SegmentTable = () => { } isLoading={loading} > - - -