diff --git a/libs/i18n/locales/en/translation.json b/libs/i18n/locales/en/translation.json index 868da468f..b777a3094 100644 --- a/libs/i18n/locales/en/translation.json +++ b/libs/i18n/locales/en/translation.json @@ -226,9 +226,6 @@ "Select Organization": "Select Organization", "Change Organization": "Change Organization", "Settings": "Settings", - "Technology preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process.": "Technology preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process.", - "Technology preview description": "Technology preview description", - "Technology preview": "Technology preview", "Fleet not found": "Fleet not found", "We could not find the fleet with id <1>{id}": "We could not find the fleet with id <1>{id}", "Device not found": "Device not found", diff --git a/libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx b/libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx index 84fd20ea4..8d962c26f 100644 --- a/libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx +++ b/libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx @@ -36,15 +36,6 @@ const DevicesPage = ({ canListER }: { canListER: boolean }) => { setSelectedLabels, } = useDeviceBackendFilters(); const [onlyDecommissioned, setOnlyDecommissioned] = React.useState(false); - const [showDeviceListBadge, setShowDeviceListBadge] = React.useState(true); - - const onEmptyErChanged = React.useCallback((isEmpty: boolean) => { - if (isEmpty) { - setShowDeviceListBadge(true); - } else { - setShowDeviceListBadge(false); - } - }, []); const { currentPage, setCurrentPage, onPageFetched, nextContinue, itemCount } = useTablePagination( onlyDecommissioned ? undefined : removeDecommissionedDevices, @@ -71,9 +62,9 @@ const DevicesPage = ({ canListER }: { canListER: boolean }) => { return ( <> - {canListER && } + {canListER && } - + {/* When searching for decommissioned devices we want to avoid showing the enrolled devices */} {onlyDecommissioned ? ( diff --git a/libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx b/libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx index 6a6daf690..c5acf759d 100644 --- a/libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +++ b/libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx @@ -42,7 +42,6 @@ const getEnrollmentColumns = (t: TFunction): ApiSortTableColumn[] => [ type EnrollmentRequestListProps = { refetchDevices?: VoidFunction; - onEmptyListChanged?: (isEmpty: boolean) => void; isStandalone?: boolean; }; @@ -51,7 +50,7 @@ const enrollmentRequestListPermissions = [ { kind: RESOURCE.ENROLLMENT_REQUEST, verb: VERB.DELETE }, ]; -const EnrollmentRequestList = ({ onEmptyListChanged, refetchDevices, isStandalone }: EnrollmentRequestListProps) => { +const EnrollmentRequestList = ({ refetchDevices, isStandalone }: EnrollmentRequestListProps) => { const { t } = useTranslation(); const { checkPermissions } = usePermissionsContext(); const [canApprove, canDelete] = checkPermissions(enrollmentRequestListPermissions); @@ -81,12 +80,6 @@ const EnrollmentRequestList = ({ onEmptyListChanged, refetchDevices, isStandalon }, }); - React.useEffect(() => { - if (onEmptyListChanged && !search && !isLoading) { - onEmptyListChanged?.(itemCount === 0); - } - }, [search, itemCount, isLoading, onEmptyListChanged]); - // In non-standalone mode, hide the entire component when the search result is empty (and not due to filtering) const isLastUnfilteredListEmpty = !search && itemCount === 0; if (!isStandalone && isLastUnfilteredListEmpty) { diff --git a/libs/ui-components/src/components/ListPage/ListPage.tsx b/libs/ui-components/src/components/ListPage/ListPage.tsx index 5590c7f87..43a06073f 100644 --- a/libs/ui-components/src/components/ListPage/ListPage.tsx +++ b/libs/ui-components/src/components/ListPage/ListPage.tsx @@ -1,16 +1,14 @@ import * as React from 'react'; import { Flex, FlexItem, PageSection, PageSectionVariants, Title, TitleProps } from '@patternfly/react-core'; -import TechPreviewBadge from '../common/TechPreviewBadge'; type ListPageProps = { title: string; headingLevel?: TitleProps['headingLevel']; children: React.ReactNode; - withBadge?: boolean; }; -const ListPage: React.FC = ({ title, headingLevel = 'h1', withBadge = true, children }) => { +const ListPage: React.FC = ({ title, headingLevel = 'h1', children }) => { return ( @@ -19,11 +17,6 @@ const ListPage: React.FC = ({ title, headingLevel = 'h1', withBad {title} - {withBadge && ( - - - - )} {children} diff --git a/libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx b/libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx index 55baf9cf2..186fc033c 100644 --- a/libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx +++ b/libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx @@ -3,8 +3,6 @@ import { Alert, Button, Divider, - Flex, - FlexItem, List, ListItem, PageSection, @@ -16,7 +14,6 @@ import { } from '@patternfly/react-core'; import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; -import TechPreviewBadge from '../common/TechPreviewBadge'; import { useTranslation } from '../../hooks/useTranslation'; import { useAppContext } from '../../hooks/useAppContext'; import { getErrorMessage } from '../../utils/error'; @@ -140,14 +137,7 @@ const CommandLineToolsPage = () => { - - - {t('Command Line Tools')} - - - - - + {t('Command Line Tools')} diff --git a/libs/ui-components/src/components/OverviewPage/OverviewPage.tsx b/libs/ui-components/src/components/OverviewPage/OverviewPage.tsx index e519797b7..d04a8851b 100644 --- a/libs/ui-components/src/components/OverviewPage/OverviewPage.tsx +++ b/libs/ui-components/src/components/OverviewPage/OverviewPage.tsx @@ -1,24 +1,17 @@ import * as React from 'react'; -import Overview from './Overview'; +import { PageSection, PageSectionVariants, Title } from '@patternfly/react-core'; + import { useTranslation } from '../../hooks/useTranslation'; -import { Flex, FlexItem, PageSection, PageSectionVariants, Title } from '@patternfly/react-core'; -import TechPreviewBadge from '../common/TechPreviewBadge'; +import Overview from './Overview'; const OverviewPage = () => { const { t } = useTranslation(); return ( <> - - - - {t('Overview')} - - - - - - + + {t('Overview')} + diff --git a/libs/ui-components/src/components/common/TechPreviewBadge.tsx b/libs/ui-components/src/components/common/TechPreviewBadge.tsx deleted file mode 100644 index 6eb473c2f..000000000 --- a/libs/ui-components/src/components/common/TechPreviewBadge.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import * as React from 'react'; -import { Label, Popover, Stack, StackItem } from '@patternfly/react-core'; -import { InfoCircleIcon } from '@patternfly/react-icons/dist/js/icons'; - -import { useTranslation } from '../../hooks/useTranslation'; -import LearnMoreLink from './LearnMoreLink'; - -// Links to general Red Hat docs -const TECH_PREVIEW_LEVEL_LINK = 'https://access.redhat.com/support/offerings/techpreview'; - -const TechPreviewPopoverContent = () => { - const { t } = useTranslation(); - - return ( - - - {t( - 'Technology preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process.', - )} - - - - - - ); -}; - -const TechPreviewBadge = () => { - const { t } = useTranslation(); - - return ( - } - withFocusTrap - triggerAction="click" - > - - - ); -}; - -export default TechPreviewBadge;