Skip to content

Commit 42403aa

Browse files
authored
chore(explore): Migrate explore off old feature flag (#94990)
Previously, to turn on explore, one must have `performance-trace-explorer` as well as `visiblity-explore-view`. However, `performance-trace-explorer` was meant enable the old trace explorer. This change decouples the flags. `performance-trace-explorer` will only enable the old trace explorer view (this is to be removed in the near future) while `visibility-explore-view` enables the new explore view.
1 parent eb97ba0 commit 42403aa

File tree

6 files changed

+33
-18
lines changed

6 files changed

+33
-18
lines changed

static/app/components/sidebar/index.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const ALL_AVAILABLE_FEATURES = [
3535
'user-feedback-ui',
3636
'session-replay-ui',
3737
'performance-view',
38-
'performance-trace-explorer',
3938
'profiling',
39+
'visibility-explore-view',
4040
];
4141

4242
jest.mock('sentry/utils/demoMode');

static/app/components/sidebar/index.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,19 @@ function Sidebar() {
212212
);
213213

214214
const traces = hasOrganization && (
215-
<Feature features={['performance-trace-explorer', 'performance-view']}>
216-
<SidebarItem
217-
{...sidebarItemProps}
218-
label={<GuideAnchor target="traces">{t('Traces')}</GuideAnchor>}
219-
to={`/organizations/${organization.slug}/traces/`}
220-
id="performance-trace-explorer"
221-
icon={<SubitemDot collapsed />}
222-
/>
215+
<Feature features={['performance-view']}>
216+
<Feature
217+
features={['performance-trace-explorer', 'visibility-explore-view']}
218+
requireAll={false}
219+
>
220+
<SidebarItem
221+
{...sidebarItemProps}
222+
label={<GuideAnchor target="traces">{t('Traces')}</GuideAnchor>}
223+
to={`/organizations/${organization.slug}/traces/`}
224+
id="performance-trace-explorer"
225+
icon={<SubitemDot collapsed />}
226+
/>
227+
</Feature>
223228
</Feature>
224229
);
225230

static/app/views/explore/utils.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,10 @@ export function limitMaxPickableDays(organization: Organization): PickableDays {
415415
}
416416

417417
export function getDefaultExploreRoute(organization: Organization) {
418-
if (organization.features.includes('performance-trace-explorer')) {
418+
if (
419+
organization.features.includes('performance-trace-explorer') ||
420+
organization.features.includes('visibility-explore-view')
421+
) {
419422
return 'traces';
420423
}
421424

static/app/views/nav/index.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const ALL_AVAILABLE_FEATURES = [
3838
'performance-trace-explorer',
3939
'profiling',
4040
'enforce-stacked-navigation',
41+
'visibility-explore-view',
4142
];
4243

4344
const mockUsingCustomerDomain = jest.fn();

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,19 @@ export function ExploreSecondaryNav() {
3636
</SecondaryNav.Header>
3737
<SecondaryNav.Body>
3838
<SecondaryNav.Section id="explore-main">
39-
<Feature features={['performance-trace-explorer', 'performance-view']}>
40-
<SecondaryNav.Item
41-
to={`${baseUrl}/traces/`}
42-
analyticsItemName="explore_traces"
43-
isActive={isLinkActive(`${baseUrl}/traces/`, location.pathname)}
39+
<Feature features={['performance-view']}>
40+
<Feature
41+
features={['performance-trace-explorer', 'visibility-explore-view']}
42+
requireAll={false}
4443
>
45-
{t('Traces')}
46-
</SecondaryNav.Item>
44+
<SecondaryNav.Item
45+
to={`${baseUrl}/traces/`}
46+
analyticsItemName="explore_traces"
47+
isActive={isLinkActive(`${baseUrl}/traces/`, location.pathname)}
48+
>
49+
{t('Traces')}
50+
</SecondaryNav.Item>
51+
</Feature>
4752
</Feature>
4853
<Feature features="ourlogs-enabled">
4954
<SecondaryNav.Item

static/app/views/traces/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export default function TracesPage({children}: Props) {
2323

2424
return (
2525
<Feature
26-
features={['performance-trace-explorer']}
26+
features={['performance-trace-explorer', 'visibility-explore-view']}
27+
requireAll={false}
2728
organization={organization}
2829
renderDisabled={NoAccess}
2930
>

0 commit comments

Comments
 (0)