@@ -3,14 +3,12 @@ import {css, useTheme} from '@emotion/react';
3
3
import styled from '@emotion/styled' ;
4
4
5
5
import { Button } from 'sentry/components/core/button' ;
6
- import { Flex } from 'sentry/components/core/layout' ;
7
6
import ErrorBoundary from 'sentry/components/errorBoundary' ;
8
7
import { EnvironmentPageFilter } from 'sentry/components/organizations/environmentPageFilter' ;
9
8
import { TimeRangeSelector } from 'sentry/components/timeRangeSelector' ;
10
9
import { getRelativeSummary } from 'sentry/components/timeRangeSelector/utils' ;
11
10
import { TourElement } from 'sentry/components/tours/components' ;
12
11
import { t } from 'sentry/locale' ;
13
- import { space } from 'sentry/styles/space' ;
14
12
import type { Event } from 'sentry/types/event' ;
15
13
import type { Group } from 'sentry/types/group' ;
16
14
import type { Project } from 'sentry/types/project' ;
@@ -113,58 +111,55 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
113
111
) }
114
112
position = "bottom-start"
115
113
>
116
- < FilterContainer >
117
- < EnvironmentSelector group = { group } event = { event } project = { project } />
118
- < DateFilter
119
- menuTitle = { t ( 'Filter Time Range' ) }
120
- start = { period ?. start }
121
- end = { period ?. end }
122
- utc = { location . query . utc === 'true' }
123
- relative = { period ?. statsPeriod }
124
- relativeOptions = { props => {
125
- return {
126
- ...props . arbitraryOptions ,
127
- // Always display arbitrary issue open period
128
- ...( defaultStatsPeriod ?. statsPeriod
129
- ? {
130
- [ defaultStatsPeriod . statsPeriod ] : t (
131
- '%s (since first seen)' ,
132
- getRelativeSummary ( defaultStatsPeriod . statsPeriod )
133
- ) ,
134
- }
135
- : { } ) ,
136
- ...props . defaultOptions ,
137
- } ;
138
- } }
139
- onChange = { ( { relative, start, end, utc} ) => {
140
- navigate ( {
141
- ...location ,
142
- query : {
143
- ...location . query ,
144
- // If selecting the issue open period, remove the stats period query param
145
- statsPeriod :
146
- relative === defaultStatsPeriod ?. statsPeriod
147
- ? undefined
148
- : relative ,
149
- start : start ? getUtcDateString ( start ) : undefined ,
150
- end : end ? getUtcDateString ( end ) : undefined ,
151
- utc : utc ? 'true' : undefined ,
152
- } ,
153
- } ) ;
154
- } }
155
- triggerLabel = {
156
- period === defaultStatsPeriod && ! defaultStatsPeriod . isMaxRetention
157
- ? t ( 'Since First Seen' )
158
- : undefined
159
- }
160
- triggerProps = { {
161
- borderless : true ,
162
- style : {
163
- borderRadius : 0 ,
164
- } ,
165
- } }
166
- />
167
- < Flex gap = "xs" >
114
+ < FilterSection >
115
+ < FilterContainer >
116
+ < EnvironmentSelector group = { group } event = { event } project = { project } />
117
+ < DateFilter
118
+ menuTitle = { t ( 'Filter Time Range' ) }
119
+ start = { period ?. start }
120
+ end = { period ?. end }
121
+ utc = { location . query . utc === 'true' }
122
+ relative = { period ?. statsPeriod }
123
+ relativeOptions = { props => {
124
+ return {
125
+ ...props . arbitraryOptions ,
126
+ // Always display arbitrary issue open period
127
+ ...( defaultStatsPeriod ?. statsPeriod
128
+ ? {
129
+ [ defaultStatsPeriod . statsPeriod ] : t (
130
+ '%s (since first seen)' ,
131
+ getRelativeSummary ( defaultStatsPeriod . statsPeriod )
132
+ ) ,
133
+ }
134
+ : { } ) ,
135
+ ...props . defaultOptions ,
136
+ } ;
137
+ } }
138
+ onChange = { ( { relative, start, end, utc} ) => {
139
+ navigate ( {
140
+ ...location ,
141
+ query : {
142
+ ...location . query ,
143
+ // If selecting the issue open period, remove the stats period query param
144
+ statsPeriod :
145
+ relative === defaultStatsPeriod ?. statsPeriod
146
+ ? undefined
147
+ : relative ,
148
+ start : start ? getUtcDateString ( start ) : undefined ,
149
+ end : end ? getUtcDateString ( end ) : undefined ,
150
+ utc : utc ? 'true' : undefined ,
151
+ } ,
152
+ } ) ;
153
+ } }
154
+ triggerLabel = {
155
+ period === defaultStatsPeriod && ! defaultStatsPeriod . isMaxRetention
156
+ ? t ( 'Since First Seen' )
157
+ : undefined
158
+ }
159
+ triggerProps = { {
160
+ borderless : true ,
161
+ } }
162
+ />
168
163
< SearchFilter
169
164
group = { group }
170
165
handleSearch = { query => {
@@ -181,9 +176,9 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
181
176
label : searchText ,
182
177
} }
183
178
/>
184
- < ToggleSidebar / >
185
- </ Flex >
186
- </ FilterContainer >
179
+ </ FilterContainer >
180
+ < ToggleSidebar / >
181
+ </ FilterSection >
187
182
</ TourElement >
188
183
) }
189
184
{ issueTypeConfig . header . graph . enabled && (
@@ -227,8 +222,8 @@ function EnvironmentSelector({group, event, project}: EventDetailsHeaderProps) {
227
222
display : block;
228
223
& : before {
229
224
right : 0 ;
230
- top : ${ space ( 1 ) } ;
231
- bottom : ${ space ( 1 ) } ;
225
+ top : ${ theme . space . md } ;
226
+ bottom : ${ theme . space . md } ;
232
227
width : 1px ;
233
228
content : '' ;
234
229
position : absolute;
@@ -250,9 +245,6 @@ function EnvironmentSelector({group, event, project}: EventDetailsHeaderProps) {
250
245
css = { environmentCss }
251
246
triggerProps = { {
252
247
borderless : true ,
253
- style : {
254
- borderRadius : 0 ,
255
- } ,
256
248
} }
257
249
/>
258
250
) ;
@@ -261,33 +253,46 @@ function EnvironmentSelector({group, event, project}: EventDetailsHeaderProps) {
261
253
const DetailsContainer = styled ( 'div' ) < {
262
254
hasFilterBar : boolean ;
263
255
} > `
264
- padding-left: 24px ;
256
+ position: relative ;
265
257
display: flex;
266
258
flex-direction: column;
267
- border: 0px solid ${ p => p . theme . translucentBorder } ;
268
- border-width: 0 1px 1px 0;
259
+ gap: ${ p => p . theme . space . md } ;
260
+ background: ${ p => p . theme . backgroundSecondary } ;
261
+ padding-left: ${ p => p . theme . space . lg } ;
262
+ padding-right: ${ p => p . theme . space . lg } ;
263
+ padding-top: ${ p => p . theme . space . md } ;
264
+
265
+ @media (min-width: ${ p => p . theme . breakpoints . lg } ) {
266
+ border-right: 1px solid ${ p => p . theme . translucentBorder } ;
267
+ }
268
+ ` ;
269
+ const FilterSection = styled ( 'div' ) `
270
+ display: flex;
271
+ gap: ${ p => p . theme . space . xs } ;
269
272
` ;
270
273
271
274
const FilterContainer = styled ( 'div' ) `
272
275
display: grid;
273
276
grid-template-columns: auto auto minmax(100px, 1fr) auto;
274
277
grid-template-rows: minmax(38px, auto);
275
278
width: 100%;
279
+ background: ${ p => p . theme . background } ;
280
+ border-radius: ${ p => p . theme . borderRadius } ;
281
+ border: 1px solid ${ p => p . theme . translucentBorder } ;
276
282
` ;
277
283
278
284
const SearchFilter = styled ( EventSearch ) `
279
285
display: block;
280
286
border-color: transparent;
281
- border-radius: 0;
282
287
box-shadow: none;
283
288
` ;
284
289
285
290
const DateFilter = styled ( TimeRangeSelector ) `
286
291
display: block;
287
292
&:before {
288
293
right: 0;
289
- top: ${ space ( 1 ) } ;
290
- bottom: ${ space ( 1 ) } ;
294
+ top: ${ p => p . theme . space . md } ;
295
+ bottom: ${ p => p . theme . space . md } ;
291
296
width: 1px;
292
297
content: '';
293
298
position: absolute;
@@ -297,24 +302,26 @@ const DateFilter = styled(TimeRangeSelector)`
297
302
298
303
const GraphSection = styled ( 'div' ) `
299
304
display: flex;
300
- &:not(:first-child) {
301
- border-top: 1px solid ${ p => p . theme . translucentBorder } ;
305
+ gap: ${ p => p . theme . space . md } ;
306
+ & > * {
307
+ background: ${ p => p . theme . background } ;
308
+ border-radius: ${ p => p . theme . borderRadius } ;
309
+ border: 1px solid ${ p => p . theme . translucentBorder } ;
302
310
}
303
311
` ;
304
312
305
313
const OccurrenceSummarySection = styled ( OccurrenceSummary ) `
306
314
white-space: unset;
307
- padding: ${ space ( 1 ) } ;
308
- padding-left: 0;
309
- &:not(:first-child) {
310
- border-top: 1px solid ${ p => p . theme . translucentBorder } ;
311
- }
315
+ background: ${ p => p . theme . background } ;
316
+ padding: ${ p => p . theme . space . lg } ;
317
+ border-radius: ${ p => p . theme . borderRadius } ;
318
+ border: 1px solid ${ p => p . theme . translucentBorder } ;
312
319
` ;
313
320
314
321
const PageErrorBoundary = styled ( ErrorBoundary ) `
315
322
margin: 0;
316
323
border: 0px solid ${ p => p . theme . translucentBorder } ;
317
324
border-width: 0 1px 1px 0;
318
325
border-radius: 0;
319
- padding: ${ space ( 1.5 ) } 24px ;
326
+ padding: ${ p => p . theme . space . lg } ${ p => p . theme . space [ '2xl' ] } ;
320
327
` ;
0 commit comments