Browse Source

ref(replay/feedback): remove flag check for GA'd search bars 2 (#78663)

Followup to https://github.com/getsentry/sentry/pull/78415, missed a
spot
Andrew Liu 5 months ago
parent
commit
e7318428e6

+ 3 - 11
static/app/components/feedback/feedbackSearch.tsx

@@ -6,7 +6,6 @@ import {SearchQueryBuilder} from 'sentry/components/searchQueryBuilder';
 import type {FilterKeySection} from 'sentry/components/searchQueryBuilder/types';
 import type {FilterKeySection} from 'sentry/components/searchQueryBuilder/types';
 import {t} from 'sentry/locale';
 import {t} from 'sentry/locale';
 import type {Tag, TagCollection, TagValue} from 'sentry/types/group';
 import type {Tag, TagCollection, TagValue} from 'sentry/types/group';
-import type {Organization} from 'sentry/types/organization';
 import {getUtcDateString} from 'sentry/utils/dates';
 import {getUtcDateString} from 'sentry/utils/dates';
 import {isAggregateField} from 'sentry/utils/discover/fields';
 import {isAggregateField} from 'sentry/utils/discover/fields';
 import {
 import {
@@ -83,14 +82,7 @@ function getFeedbackFilterKeys(supportedTags: TagCollection) {
   return Object.fromEntries(keys.map(key => [key, allTags[key]]));
   return Object.fromEntries(keys.map(key => [key, allTags[key]]));
 }
 }
 
 
-const getFilterKeySections = (
-  tags: TagCollection,
-  organization: Organization
-): FilterKeySection[] => {
-  if (!organization.features.includes('search-query-builder-user-feedback')) {
-    return [];
-  }
-
+const getFilterKeySections = (tags: TagCollection): FilterKeySection[] => {
   const customTags: Tag[] = Object.values(tags).filter(
   const customTags: Tag[] = Object.values(tags).filter(
     tag =>
     tag =>
       tag.kind === FieldKind.TAG &&
       tag.kind === FieldKind.TAG &&
@@ -160,8 +152,8 @@ export default function FeedbackSearch() {
   );
   );
 
 
   const filterKeySections = useMemo(() => {
   const filterKeySections = useMemo(() => {
-    return getFilterKeySections(issuePlatformTags, organization);
-  }, [issuePlatformTags, organization]);
+    return getFilterKeySections(issuePlatformTags);
+  }, [issuePlatformTags]);
 
 
   const getTagValues = useCallback(
   const getTagValues = useCallback(
     (tag: Tag, searchQuery: string): Promise<string[]> => {
     (tag: Tag, searchQuery: string): Promise<string[]> => {

+ 3 - 10
static/app/views/replays/list/replaySearchBar.tsx

@@ -70,14 +70,7 @@ function getReplayFilterKeys(supportedTags: TagCollection): TagCollection {
   };
   };
 }
 }
 
 
-const getFilterKeySections = (
-  tags: TagCollection,
-  organization: Organization
-): FilterKeySection[] => {
-  if (!organization.features.includes('search-query-builder-replays')) {
-    return [];
-  }
-
+const getFilterKeySections = (tags: TagCollection): FilterKeySection[] => {
   const customTags: Tag[] = Object.values(tags).filter(
   const customTags: Tag[] = Object.values(tags).filter(
     tag =>
     tag =>
       !EXCLUDED_TAGS.includes(tag.key) &&
       !EXCLUDED_TAGS.includes(tag.key) &&
@@ -149,8 +142,8 @@ function ReplaySearchBar(props: Props) {
 
 
   const filterKeys = useMemo(() => getReplayFilterKeys(customTags), [customTags]);
   const filterKeys = useMemo(() => getReplayFilterKeys(customTags), [customTags]);
   const filterKeySections = useMemo(() => {
   const filterKeySections = useMemo(() => {
-    return getFilterKeySections(customTags, organization);
-  }, [customTags, organization]);
+    return getFilterKeySections(customTags);
+  }, [customTags]);
 
 
   const getTagValues = useCallback(
   const getTagValues = useCallback(
     (tag: Tag, searchQuery: string): Promise<string[]> => {
     (tag: Tag, searchQuery: string): Promise<string[]> => {