@@ -141,7 +141,7 @@ class Results extends React.Component<Props, State> {
141
141
location = { location }
142
142
eventView = { eventView }
143
143
/>
144
- < ContentBox >
144
+ < StyledPageContent >
145
145
< Top >
146
146
< StyledSearchBar
147
147
organization = { organization }
@@ -176,19 +176,36 @@ class Results extends React.Component<Props, State> {
176
176
/>
177
177
</ Main >
178
178
< Side eventView = { eventView } > { this . renderTagsTable ( ) } </ Side >
179
- </ ContentBox >
179
+ </ StyledPageContent >
180
180
</ NoProjectMessage >
181
181
</ React . Fragment >
182
182
</ SentryDocumentTitle >
183
183
) ;
184
184
}
185
185
}
186
186
187
+ const StyledPageContent = styled ( PageContent ) `
188
+ margin: 0;
189
+
190
+ @media (min-width: ${ p => p . theme . breakpoints [ 1 ] } ) {
191
+ display: grid;
192
+ /* HACK(leedongwei): Hardcoded height for search bar and graph */
193
+ grid-template-rows: 270px auto;
194
+ grid-template-columns: 66% auto;
195
+ grid-column-gap: ${ space ( 3 ) } ;
196
+ }
197
+
198
+ @media (min-width: ${ p => p . theme . breakpoints [ 2 ] } ) {
199
+ grid-template-columns: auto 325px;
200
+ }
201
+ ` ;
202
+
187
203
const StyledSearchBar = styled ( SearchBar ) `
188
204
margin-bottom: ${ space ( 2 ) } ;
189
205
` ;
190
-
191
206
const StyledPanel = styled ( Panel ) `
207
+ /* HACK(leedongwei): Hardcoded height for graph */
208
+ height: 200px;
192
209
margin-bottom: ${ space ( 1.5 ) } ;
193
210
194
211
.echarts-for-react div:first-child {
@@ -200,38 +217,16 @@ const Top = styled('div')`
200
217
grid-column: 1/3;
201
218
flex-grow: 0;
202
219
` ;
203
-
204
220
const Main = styled ( 'div' ) < { eventView : EventView } > `
205
221
grid-column: ${ p => ( p . eventView . tags . length <= 0 ? '1/3' : '1/2' ) } ;
206
-
207
- /* Defining the width prevent child elements from expanding the grid
208
- past the width of the screen */
209
- width: 100%;
210
222
max-width: 100%;
211
223
overflow: hidden;
212
224
` ;
213
-
214
225
const Side = styled ( 'div' ) < { eventView : EventView } > `
215
226
display: ${ p => ( p . eventView . tags . length <= 0 ? 'none' : 'initial' ) } ;
216
227
grid-column: 2/3;
217
228
` ;
218
229
219
- const ContentBox = styled ( PageContent ) `
220
- margin: 0;
221
-
222
- @media (min-width: ${ p => p . theme . breakpoints [ 1 ] } ) {
223
- display: grid;
224
- grid-template-rows: 270px auto; /* HACK(leedongwei): Hard-coded height for
225
- search bar and graph */
226
- grid-template-columns: 65% auto;
227
- grid-column-gap: ${ space ( 3 ) } ;
228
- }
229
-
230
- @media (min-width: ${ p => p . theme . breakpoints [ 2 ] } ) {
231
- grid-template-columns: auto 325px;
232
- }
233
- ` ;
234
-
235
230
export function generateDiscoverResultsRoute ( orgSlug : string ) : string {
236
231
return `/organizations/${ orgSlug } /eventsv2/results/` ;
237
232
}
0 commit comments