From 29577392ab29c987de600df6bcad76607f0c70dc Mon Sep 17 00:00:00 2001 From: Alexander Rivera Date: Tue, 22 Aug 2023 17:41:49 -0400 Subject: [PATCH] Fixing PF5 related issues after rebasing --- package-lock.json | 2 +- package.json | 2 +- src/components/Header/Tools.tsx | 4 +- .../DrawerPanelContent.tsx | 61 +++++++++++++------ .../NotificationsDrawer/NotificationItem.tsx | 24 ++++++-- src/hooks/useChromeServiceEvents.ts | 4 +- src/layouts/DefaultLayout.tsx | 3 +- src/redux/chromeReducers.ts | 3 +- testData.js | 27 ++++++++ 9 files changed, 99 insertions(+), 31 deletions(-) create mode 100644 testData.js diff --git a/package-lock.json b/package-lock.json index b8d347a757..9d2d2121c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@data-driven-forms/react-form-renderer": "^3.20.2", "@formatjs/cli": "4.8.4", "@openshift/dynamic-plugin-sdk": "^3.0.0", - "@patternfly/patternfly": "^5.0.0", + "@patternfly/patternfly": "^5.0.2", "@patternfly/quickstarts": "^5.0.0", "@patternfly/react-charts": "^7.0.0", "@patternfly/react-core": "^5.0.0", diff --git a/package.json b/package.json index 58a507ad74..0df3f889b0 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "@data-driven-forms/react-form-renderer": "^3.20.2", "@formatjs/cli": "4.8.4", "@openshift/dynamic-plugin-sdk": "^3.0.0", - "@patternfly/patternfly": "^5.0.0", + "@patternfly/patternfly": "^5.0.2", "@patternfly/quickstarts": "^5.0.0", "@patternfly/react-charts": "^7.0.0", "@patternfly/react-core": "^5.0.0", diff --git a/src/components/Header/Tools.tsx b/src/components/Header/Tools.tsx index acad0e6552..b03f8f786c 100644 --- a/src/components/Header/Tools.tsx +++ b/src/components/Header/Tools.tsx @@ -96,8 +96,8 @@ const Tools = () => { const enableAuthDropdownOption = useFlag('platform.chrome.dropdown.authfactor'); const previewEnabled = useFlag('platform.chrome.preview'); - // const isNotificationsEnabled = true; - const isNotificationsEnabled = useFlag('platform.chrome.notifications-drawer'); + const isNotificationsEnabled = true; + // const isNotificationsEnabled = useFlag('platform.chrome.notifications-drawer'); /* list out the items for the settings menu */ const settingsMenuDropdownItems = [ diff --git a/src/components/NotificationsDrawer/DrawerPanelContent.tsx b/src/components/NotificationsDrawer/DrawerPanelContent.tsx index da6ae75513..e5880104a1 100644 --- a/src/components/NotificationsDrawer/DrawerPanelContent.tsx +++ b/src/components/NotificationsDrawer/DrawerPanelContent.tsx @@ -3,16 +3,16 @@ import { Badge, Button, Checkbox, + Divider, Dropdown, DropdownGroup, DropdownItem, - DropdownPosition, - DropdownSeparator, EmptyState, EmptyStateBody, EmptyStateIcon, - KebabToggle, + Icon, MenuToggle, + MenuToggleElement, NotificationDrawer, NotificationDrawerBody, NotificationDrawerHeader, @@ -25,6 +25,7 @@ import { toggleNotificationsDrawer } from '../../redux/actions'; import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon'; import BellSlashIcon from '@patternfly/react-icons/dist/esm/icons/bell-slash-icon'; import ExternalLinkSquareAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-square-alt-icon'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; import { NotificationData, ReduxState } from '../../redux/store'; import NotificationItem from './NotificationItem'; import { markAllNotificationsAsRead, markAllNotificationsAsUnread } from '../../redux/actions'; @@ -100,14 +101,23 @@ const DrawerPanelBase = ({ innerRef }: DrawerPanelProps) => { Mark visible as unread , - , - + , + + + + View event log , - + + + + Configure notification settings , - + + + + Manage my notification preferences , ]; @@ -123,7 +133,7 @@ const DrawerPanelBase = ({ innerRef }: DrawerPanelProps) => { {source} ))} - + setActiveFilters([])}>