Browse Source

fix(discover): Fix bad padding around `SearchQueryBuilder` (#77028)

Adding a styled variant doesn't actually work in this case, the styles
aren't propagated down.

Instead, use the pre-existing `Wrapper` that adds the right padding.
Fixes a regression I introduced in
https://github.com/getsentry/sentry/pull/76958
George Gritsouk 6 months ago
parent
commit
13795e9caa
1 changed files with 11 additions and 13 deletions
  1. 11 13
      static/app/views/discover/results.tsx

+ 11 - 13
static/app/views/discover/results.tsx

@@ -685,15 +685,17 @@ export class Results extends Component<Props, State> {
 
     if (organization.features.includes('search-query-builder-discover')) {
       return (
-        <StyledResultsSearchQueryBuilder
-          projectIds={eventView.project}
-          query={eventView.query}
-          fields={fields}
-          onSearch={this.handleSearch}
-          customMeasurements={customMeasurements}
-          dataset={eventView.dataset}
-          includeTransactions
-        />
+        <Wrapper>
+          <ResultsSearchQueryBuilder
+            projectIds={eventView.project}
+            query={eventView.query}
+            fields={fields}
+            onSearch={this.handleSearch}
+            customMeasurements={customMeasurements}
+            dataset={eventView.dataset}
+            includeTransactions
+          />
+        </Wrapper>
       );
     }
 
@@ -872,10 +874,6 @@ const Wrapper = styled('div')`
   }
 `;
 
-const StyledResultsSearchQueryBuilder = styled(ResultsSearchQueryBuilder)`
-  margin-bottom: ${space(2)};
-`;
-
 const StyledSearchBar = styled(SearchBar)`
   margin-bottom: ${space(2)};
 `;