Skip to content

Commit 52577b8

Browse files
authored
Merge branch 'master' into ref/process-segments-eap-items
2 parents 432e075 + c77916b commit 52577b8

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

static/app/components/sidebar/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
);

static/app/views/insights/mobile/screens/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {MetricsProperty, SpanMetricsProperty} from 'sentry/views/insights/t
66
import {VitalState} from 'sentry/views/performance/vitalDetail/utils';
77

88
const formatMetricValue = (metric: MetricValue, field?: string | undefined): string => {
9-
if (metric.value === undefined) {
9+
if (metric.value === undefined || metric.value === null) {
1010
return '-';
1111
}
1212
if (typeof metric.value === 'number' && metric.type === 'duration' && metric.unit) {

static/app/views/nav/secondary/sections/explore/exploreSecondaryNav.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import Feature from 'sentry/components/acl/feature';
2+
import {FeatureBadge} from 'sentry/components/core/badge/featureBadge';
23
import {t} from 'sentry/locale';
4+
import localStorage from 'sentry/utils/localStorage';
35
import {useLocation} from 'sentry/utils/useLocation';
46
import useOrganization from 'sentry/utils/useOrganization';
57
import {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>

0 commit comments

Comments
 (0)