@@ -2,7 +2,12 @@ import {Fragment} from 'react';
22import { css } from '@emotion/react' ;
33import styled from '@emotion/styled' ;
44
5- import { t } from 'sentry/locale' ;
5+ import { Badge } from '@sentry/scraps/badge' ;
6+ import { Link } from '@sentry/scraps/link' ;
7+ import { Text } from '@sentry/scraps/text' ;
8+ import { Tooltip } from '@sentry/scraps/tooltip' ;
9+
10+ import { t , tct } from 'sentry/locale' ;
611import { useOrganization } from 'sentry/utils/useOrganization' ;
712import { makeAutomationBasePathname } from 'sentry/views/automations/pathnames' ;
813import { ISSUE_TAXONOMY_CONFIG } from 'sentry/views/issueList/taxonomies' ;
@@ -108,11 +113,11 @@ function ConfigureSection({baseUrl}: {baseUrl: string}) {
108113 const { layout} = usePrimaryNavigation ( ) ;
109114 const isSticky = layout === 'sidebar' ;
110115
116+ const hasWorkflowEngineUI = organization . features . includes ( 'workflow-engine-ui' ) ;
111117 const hasRedirectOptOut = organization . features . includes (
112118 'workflow-engine-redirect-opt-out'
113119 ) ;
114- const shouldRedirectToWorkflowEngineUI =
115- ! hasRedirectOptOut && organization . features . includes ( 'workflow-engine-ui' ) ;
120+ const shouldRedirectToWorkflowEngineUI = ! hasRedirectOptOut && hasWorkflowEngineUI ;
116121
117122 const alertsLink = shouldRedirectToWorkflowEngineUI
118123 ? `${ makeAutomationBasePathname ( organization . slug ) } ?alertsRedirect=true`
@@ -133,6 +138,29 @@ function ConfigureSection({baseUrl}: {baseUrl: string}) {
133138 to = { alertsLink }
134139 { ...( ! shouldRedirectToWorkflowEngineUI && { activeTo : `${ baseUrl } /alerts/` } ) }
135140 analyticsItemName = "issues_alerts"
141+ trailingItems = {
142+ hasWorkflowEngineUI ? (
143+ < Tooltip
144+ isHoverable
145+ title = {
146+ < Fragment >
147+ < Text as = "p" > { t ( 'Alerts now live under Monitors.' ) } </ Text >
148+ < Text as = "p" >
149+ { tct ( 'See the [link:new Alerts page here.]' , {
150+ link : (
151+ < Link
152+ to = { `/organizations/${ organization . slug } /monitors/alerts/` }
153+ />
154+ ) ,
155+ } ) }
156+ </ Text >
157+ </ Fragment >
158+ }
159+ >
160+ < Badge variant = "muted" > { t ( 'Moved' ) } </ Badge >
161+ </ Tooltip >
162+ ) : null
163+ }
136164 >
137165 { t ( 'Alerts' ) }
138166 </ SecondaryNavigation . Link >
0 commit comments