@@ -16,6 +16,7 @@ import { toggleTrayEvent } from './data/slice';
1616import { useIsOnLargeScreen , useIsOnMediumScreen } from './data/hook' ;
1717import NotificationTabs from './NotificationTabs' ;
1818import messages from './messages' ;
19+ import NotificationTour from './tours/NotificationTour' ;
1920
2021const Notifications = ( ) => {
2122 const intl = useIntl ( ) ;
@@ -61,60 +62,62 @@ const Notifications = () => {
6162 }
6263
6364 return (
64- < OverlayTrigger
65- trigger = "click"
66- key = "bottom"
67- placement = "bottom"
68- id = "notificationTray"
69- show = { enableNotificationTray }
70- overlay = { (
71- < Popover
72- id = "notificationTray"
73- style = { { height : `${ notificationBarHeight } px` } }
74- data-testid = "notification-tray"
75- className = { classNames ( 'overflow-auto rounded-0 border-0' , {
76- 'w-100' : ! isOnMediumScreen && ! isOnLargeScreen ,
77- 'medium-screen' : isOnMediumScreen ,
78- 'large-screen' : isOnLargeScreen ,
79- } ) }
80- >
81- < div ref = { popoverRef } >
82- < Popover . Title as = "h2" className = "d-flex justify-content-between p-0 m-4 border-0 text-primary-500 font-size-18 line-height-24" >
83- { intl . formatMessage ( messages . notificationTitle ) }
84- < Hyperlink
85- destination = { `${ getConfig ( ) . ACCOUNT_SETTINGS_URL } /notifications` }
86- target = "_blank"
87- rel = "noopener noreferrer"
88- showLaunchIcon = { false }
89- >
90- < Icon
91- src = { Settings }
92- className = "icon-size-20 text-primary-500"
93- data-testid = "setting-icon"
94- screenReaderText = "preferences settings icon"
95- />
96- </ Hyperlink >
97- </ Popover . Title >
98- < Popover . Content className = "notification-content p-0" >
99- < NotificationTabs />
100- </ Popover . Content >
101- </ div >
102- </ Popover >
65+ < >
66+ < OverlayTrigger
67+ trigger = "click"
68+ key = "bottom"
69+ placement = "bottom"
70+ id = "notificationTray"
71+ show = { enableNotificationTray }
72+ overlay = { (
73+ < Popover
74+ id = "notificationTray"
75+ style = { { height : `${ notificationBarHeight } px` } }
76+ data-testid = "notification-tray"
77+ className = { classNames ( 'overflow-auto rounded-0 border-0' , {
78+ 'w-100' : ! isOnMediumScreen && ! isOnLargeScreen ,
79+ 'medium-screen' : isOnMediumScreen ,
80+ 'large-screen' : isOnLargeScreen ,
81+ } ) }
82+ >
83+ < div ref = { popoverRef } >
84+ < Popover . Title as = "h2" className = "d-flex justify-content-between p-0 m-4 border-0 text-primary-500 font-size-18 line-height-24" >
85+ { intl . formatMessage ( messages . notificationTitle ) }
86+ < Hyperlink
87+ destination = { `${ getConfig ( ) . ACCOUNT_SETTINGS_URL } /notifications` }
88+ target = "_blank"
89+ rel = "noopener noreferrer"
90+ showLaunchIcon = { false }
91+ >
92+ < Icon
93+ src = { Settings }
94+ className = "icon-size-20 text-primary-500"
95+ data-testid = "setting-icon"
96+ screenReaderText = "preferences settings icon"
97+ />
98+ </ Hyperlink >
99+ </ Popover . Title >
100+ < Popover . Content className = "notification-content p-0" >
101+ < NotificationTabs />
102+ </ Popover . Content >
103+ </ div >
104+ </ Popover >
103105 ) }
104- >
105- < div ref = { buttonRef } >
106- < IconButton
107- isActive = { enableNotificationTray }
108- alt = "notification bell icon"
109- onClick = { toggleNotificationTray }
110- src = { NotificationsNone }
111- iconAs = { Icon }
112- variant = "light"
113- iconClassNames = "text-primary-500"
114- className = "ml-4 mr-1 notification-button"
115- data-testid = "notification-bell-icon"
116- />
117- { notificationCounts ?. count > 0 && (
106+ >
107+ < div ref = { buttonRef } >
108+ < IconButton
109+ isActive = { enableNotificationTray }
110+ alt = "notification bell icon"
111+ onClick = { toggleNotificationTray }
112+ src = { NotificationsNone }
113+ iconAs = { Icon }
114+ variant = "light"
115+ id = "bell-icon"
116+ iconClassNames = "text-primary-500"
117+ className = "ml-4 mr-1 notification-button"
118+ data-testid = "notification-bell-icon"
119+ />
120+ { notificationCounts ?. count > 0 && (
118121 < Badge
119122 pill
120123 variant = "danger"
@@ -125,9 +128,11 @@ const Notifications = () => {
125128 { notificationCounts . count >= 100 ? < div className = "d-flex" > 99< p className = "mb-0 plus-icon" > +</ p > </ div >
126129 : notificationCounts . count }
127130 </ Badge >
128- ) }
129- </ div >
130- </ OverlayTrigger >
131+ ) }
132+ </ div >
133+ </ OverlayTrigger >
134+ < NotificationTour />
135+ </ >
131136 ) ;
132137} ;
133138
0 commit comments