File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
views/nav/secondary/sections/explore Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ function Sidebar() {
227227 to = { `/organizations/${ organization ?. slug } /explore/logs/` }
228228 id = "ourlogs"
229229 icon = { < SubitemDot collapsed /> }
230+ isNew
230231 />
231232 </ Feature >
232233 ) ;
Original file line number Diff line number Diff line change 11import Feature from 'sentry/components/acl/feature' ;
2+ import { FeatureBadge } from 'sentry/components/core/badge/featureBadge' ;
23import { t } from 'sentry/locale' ;
4+ import localStorage from 'sentry/utils/localStorage' ;
35import { useLocation } from 'sentry/utils/useLocation' ;
46import useOrganization from 'sentry/utils/useOrganization' ;
57import { useGetSavedQueries } from 'sentry/views/explore/hooks/useGetSavedQueries' ;
@@ -22,6 +24,9 @@ export function ExploreSecondaryNav() {
2224 perPage : MAX_STARRED_QUERIES_DISPLAYED ,
2325 } ) ;
2426
27+ const ourlogsSeenKey = `sidebar-new-seen:ourlogs` ;
28+ const showOurlogsNew = ! localStorage . getItem ( ourlogsSeenKey ) ;
29+
2530 return (
2631 < SecondaryNav >
2732 < SecondaryNav . Header >
@@ -39,7 +44,17 @@ export function ExploreSecondaryNav() {
3944 </ SecondaryNav . Item >
4045 </ Feature >
4146 < Feature features = "ourlogs-enabled" >
42- < SecondaryNav . Item to = { `${ baseUrl } /logs/` } analyticsItemName = "explore_logs" >
47+ < SecondaryNav . Item
48+ to = { `${ baseUrl } /logs/` }
49+ analyticsItemName = "explore_logs"
50+ trailingItems = { showOurlogsNew ? < FeatureBadge type = "new" /> : null }
51+ onMouseDown = { ( ) => {
52+ localStorage . setItem ( ourlogsSeenKey , 'true' ) ;
53+ } }
54+ onTouchStart = { ( ) => {
55+ localStorage . setItem ( ourlogsSeenKey , 'true' ) ;
56+ } }
57+ >
4358 { t ( 'Logs' ) }
4459 </ SecondaryNav . Item >
4560 </ Feature >
You can’t perform that action at this time.
0 commit comments