Browse Source

ref(performance): Remove feature flag logic in performance (#34081)

David Wang 2 years ago
parent
commit
5ae0291765

+ 9 - 1
static/app/components/organizations/pageFilters/utils.tsx

@@ -90,7 +90,15 @@ export function doesPathHaveNewFilters(pathname: string, organization: Organizat
           'discover',
           'performance',
         ]
-      : ['user-feedback', 'alerts', 'monitors', 'projects', 'dashboards', 'releases']
+      : [
+          'user-feedback',
+          'alerts',
+          'monitors',
+          'projects',
+          'dashboards',
+          'releases',
+          'performance',
+        ]
   ).map(route => `/organizations/${organization.slug}/${route}/`);
 
   return newFilterPaths.some(pageFilterPath => pathname.includes(pageFilterPath));

+ 1 - 1
static/app/views/performance/content.tsx

@@ -136,7 +136,7 @@ function PerformanceContent({selection, location, demoMode}: Props) {
                 period: DEFAULT_STATS_PERIOD,
               },
             }}
-            hideGlobalHeader={organization.features.includes('selection-filters-v2')}
+            hideGlobalHeader
           >
             <PerformanceLanding
               eventView={eventView}

+ 2 - 4
static/app/views/performance/landing/index.tsx

@@ -128,15 +128,13 @@ export function PerformanceLanding(props: Props) {
     );
   };
 
-  let pageFilters: React.ReactNode = organization.features.includes(
-    'selection-filters-v2'
-  ) ? (
+  let pageFilters: React.ReactNode = (
     <PageFilterBar condensed>
       <ProjectPageFilter />
       <EnvironmentPageFilter />
       <DatePageFilter alignDropdown="left" />
     </PageFilterBar>
-  ) : null;
+  );
 
   if (showOnboarding) {
     pageFilters = <SearchContainerWithFilter>{pageFilters}</SearchContainerWithFilter>;

+ 1 - 1
static/app/views/performance/transactionSummary/pageLayout.tsx

@@ -109,7 +109,7 @@ function PageLayout(props: Props) {
             showProjectSettingsLink
             relativeDateOptions={relativeDateOptions}
             maxPickableDays={maxPickableDays}
-            hideGlobalHeader={organization.features.includes('selection-filters-v2')}
+            hideGlobalHeader
           >
             <StyledPageContent>
               <NoProjectMessage organization={organization}>

+ 4 - 6
static/app/views/performance/transactionSummary/transactionAnomalies/content.tsx

@@ -275,12 +275,10 @@ function AnomaliesContent(props: Props) {
   }
   return (
     <Layout.Main fullWidth>
-      {organization.features.includes('selection-filters-v2') && (
-        <StyledPageFilterBar condensed>
-          <EnvironmentPageFilter />
-          <DatePageFilter alignDropdown="left" />
-        </StyledPageFilterBar>
-      )}
+      <StyledPageFilterBar condensed>
+        <EnvironmentPageFilter />
+        <DatePageFilter alignDropdown="left" />
+      </StyledPageFilterBar>
       <SearchBar
         organization={organization}
         projectIds={eventView.project}

+ 4 - 6
static/app/views/performance/transactionSummary/transactionEvents/content.tsx

@@ -77,12 +77,10 @@ function EventsContent(props: Props) {
 
   return (
     <Layout.Main fullWidth>
-      {organization.features.includes('selection-filters-v2') && (
-        <StyledPageFilterBar condensed>
-          <EnvironmentPageFilter />
-          <DatePageFilter alignDropdown="left" />
-        </StyledPageFilterBar>
-      )}
+      <StyledPageFilterBar condensed>
+        <EnvironmentPageFilter />
+        <DatePageFilter alignDropdown="left" />
+      </StyledPageFilterBar>
       <Search {...props} />
       <StyledTable>
         <EventsTable

+ 4 - 6
static/app/views/performance/transactionSummary/transactionOverview/content.tsx

@@ -272,12 +272,10 @@ function SummaryContent({
             currentFilter={spanOperationBreakdownFilter}
             onChangeFilter={onChangeFilter}
           />
-          {organization.features.includes('selection-filters-v2') && (
-            <PageFilterBar condensed>
-              <EnvironmentPageFilter />
-              <DatePageFilter alignDropdown="left" />
-            </PageFilterBar>
-          )}
+          <PageFilterBar condensed>
+            <EnvironmentPageFilter />
+            <DatePageFilter alignDropdown="left" />
+          </PageFilterBar>
           <SearchBar
             searchSource="transaction_summary"
             organization={organization}

+ 4 - 6
static/app/views/performance/transactionSummary/transactionSpans/content.tsx

@@ -94,12 +94,10 @@ function SpansContent(props: Props) {
 
   return (
     <Layout.Main fullWidth>
-      {organization.features.includes('selection-filters-v2') && (
-        <StyledPageFilterBar condensed>
-          <EnvironmentPageFilter />
-          <DatePageFilter alignDropdown="left" />
-        </StyledPageFilterBar>
-      )}
+      <StyledPageFilterBar condensed>
+        <EnvironmentPageFilter />
+        <DatePageFilter alignDropdown="left" />
+      </StyledPageFilterBar>
       <Actions>
         <OpsFilter
           location={location}

+ 1 - 1
static/app/views/performance/transactionSummary/transactionSpans/spanDetails/index.tsx

@@ -65,7 +65,7 @@ export default function SpanDetails(props: Props) {
           showProjectSettingsLink
           relativeDateOptions={SPAN_RELATIVE_PERIODS}
           maxPickableDays={SPAN_RETENTION_DAYS}
-          hideGlobalHeader={organization.features.includes('selection-filters-v2')}
+          hideGlobalHeader
         >
           <StyledPageContent>
             <NoProjectMessage organization={organization}>

+ 4 - 6
static/app/views/performance/transactionSummary/transactionTags/content.tsx

@@ -156,12 +156,10 @@ const InnerContent = (
       />
       <StyledMain>
         <StyledActions>
-          {organization.features.includes('selection-filters-v2') && (
-            <StyledPageFilterBar condensed>
-              <EnvironmentPageFilter />
-              <DatePageFilter alignDropdown="left" />
-            </StyledPageFilterBar>
-          )}
+          <StyledPageFilterBar condensed>
+            <EnvironmentPageFilter />
+            <DatePageFilter alignDropdown="left" />
+          </StyledPageFilterBar>
           <StyledSearchBar
             organization={organization}
             projectIds={eventView.project}

Some files were not shown because too many files changed in this diff