@@ -3,18 +3,14 @@ import {css} from '@emotion/react';
33import styled from '@emotion/styled' ;
44import isEqual from 'lodash/isEqual' ;
55
6- import Feature from 'sentry/components/acl/feature' ;
76import ArchivedBox from 'sentry/components/archivedBox' ;
8- import ErrorBoundary from 'sentry/components/errorBoundary' ;
97import GroupEventDetailsLoadingError from 'sentry/components/errors/groupEventDetailsLoadingError' ;
108import { withMeta } from 'sentry/components/events/meta/metaProxy' ;
11- import { GroupSummary } from 'sentry/components/group/groupSummary' ;
129import HookOrDefault from 'sentry/components/hookOrDefault' ;
1310import * as Layout from 'sentry/components/layouts/thirds' ;
1411import LoadingIndicator from 'sentry/components/loadingIndicator' ;
1512import { TransactionProfileIdProvider } from 'sentry/components/profiling/transactionProfileIdProvider' ;
1613import ResolutionBox from 'sentry/components/resolutionBox' ;
17- import { t } from 'sentry/locale' ;
1814import useSentryAppComponentsData from 'sentry/stores/useSentryAppComponentsData' ;
1915import { space } from 'sentry/styles/space' ;
2016import type { Event } from 'sentry/types/event' ;
@@ -28,14 +24,9 @@ import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig';
2824import { VisuallyCompleteWithData } from 'sentry/utils/performanceForSentry' ;
2925import normalizeUrl from 'sentry/utils/url/normalizeUrl' ;
3026import usePrevious from 'sentry/utils/usePrevious' ;
31- import { useSyncedLocalStorageState } from 'sentry/utils/useSyncedLocalStorageState' ;
3227import GroupEventDetailsContent from 'sentry/views/issueDetails/groupEventDetails/groupEventDetailsContent' ;
3328import GroupEventHeader from 'sentry/views/issueDetails/groupEventHeader' ;
3429import GroupSidebar from 'sentry/views/issueDetails/groupSidebar' ;
35- import { EventDetailsHeader } from 'sentry/views/issueDetails/streamline/eventDetailsHeader' ;
36- import { IssueEventNavigation } from 'sentry/views/issueDetails/streamline/eventNavigation' ;
37- import { useEventQuery } from 'sentry/views/issueDetails/streamline/eventSearch' ;
38- import StreamlinedSidebar from 'sentry/views/issueDetails/streamline/sidebar' ;
3930
4031import ReprocessingProgress from '../reprocessingProgress' ;
4132import {
@@ -80,9 +71,6 @@ function GroupEventDetails(props: GroupEventDetailsProps) {
8071 const prevEnvironment = usePrevious ( environments ) ;
8172 const prevEvent = usePrevious ( event ) ;
8273 const hasStreamlinedUI = useHasStreamlinedUI ( ) ;
83- const searchQuery = useEventQuery ( { group} ) ;
84-
85- const [ sidebarOpen , _ ] = useSyncedLocalStorageState ( 'issue-details-sidebar-open' , true ) ;
8674
8775 // load the data
8876 useSentryAppComponentsData ( { projectId} ) ;
@@ -168,6 +156,7 @@ function GroupEventDetails(props: GroupEventDetailsProps) {
168156
169157 const eventWithMeta = withMeta ( event ) ;
170158 const issueTypeConfig = getConfigForIssueType ( group , project ) ;
159+ const LayoutBody = hasStreamlinedUI ? 'div' : StyledLayoutBody ;
171160 const MainLayoutComponent = hasStreamlinedUI ? 'div' : StyledLayoutMain ;
172161
173162 return (
@@ -181,11 +170,7 @@ function GroupEventDetails(props: GroupEventDetailsProps) {
181170 hasData = { ! loadingEvent && ! eventError && defined ( eventWithMeta ) }
182171 isLoading = { loadingEvent }
183172 >
184- < StyledLayoutBody
185- data-test-id = "group-event-details"
186- hasStreamlinedUi = { hasStreamlinedUI }
187- sidebarOpen = { sidebarOpen }
188- >
173+ < LayoutBody data-test-id = "group-event-details" >
189174 { groupReprocessingStatus === ReprocessingStatus . REPROCESSING ? (
190175 < ReprocessingProgress
191176 totalEvents = {
@@ -208,42 +193,9 @@ function GroupEventDetails(props: GroupEventDetailsProps) {
208193 project = { project }
209194 />
210195 ) }
211- { hasStreamlinedUI ? (
212- < EventDetailsHeader event = { event } group = { group } />
213- ) : null }
214- { hasStreamlinedUI ? (
215- < GroupContent >
216- < PageErrorBoundary
217- mini
218- message = { t ( 'There was an error loading the issue summary' ) }
219- >
220- < Feature features = { [ 'organizations:ai-summary' ] } >
221- < GroupSummary
222- groupId = { group . id }
223- groupCategory = { group . issueCategory }
224- />
225- </ Feature >
226- </ PageErrorBoundary >
227- < div >
228- < IssueEventNavigation
229- event = { event }
230- group = { group }
231- query = { searchQuery }
232- />
233- { renderContent ( ) }
234- </ div >
235- </ GroupContent >
236- ) : (
237- < GroupContent > { renderContent ( ) } </ GroupContent >
238- ) }
196+ { renderContent ( ) }
239197 </ MainLayoutComponent >
240- { hasStreamlinedUI ? (
241- sidebarOpen ? (
242- < StyledLayoutSide hasStreamlinedUi = { hasStreamlinedUI } >
243- < StreamlinedSidebar group = { group } event = { event } project = { project } />
244- </ StyledLayoutSide >
245- ) : null
246- ) : (
198+ { hasStreamlinedUI ? null : (
247199 < StyledLayoutSide hasStreamlinedUi = { hasStreamlinedUI } >
248200 < GroupSidebar
249201 organization = { organization }
@@ -256,31 +208,18 @@ function GroupEventDetails(props: GroupEventDetailsProps) {
256208 ) }
257209 </ Fragment >
258210 ) }
259- </ StyledLayoutBody >
211+ </ LayoutBody >
260212 </ VisuallyCompleteWithData >
261213 </ TransactionProfileIdProvider >
262214 ) ;
263215}
264216
265- const StyledLayoutBody = styled ( Layout . Body ) < {
266- hasStreamlinedUi : boolean ;
267- sidebarOpen : boolean ;
268- } > `
217+ const StyledLayoutBody = styled ( Layout . Body ) `
269218 /* Makes the borders align correctly */
270219 padding: 0 !important;
271220 @media (min-width: ${ p => p . theme . breakpoints . large } ) {
272221 align-content: stretch;
273222 }
274-
275- ${ p =>
276- p . hasStreamlinedUi &&
277- css `
278- min-height : 100vh ;
279- @media (min-width: ${ p . theme . breakpoints . large } ) {
280- gap : ${ space ( 1.5 ) } ;
281- display : ${ p . sidebarOpen ? 'grid' : 'block' } ;
282- }
283- ` }
284223` ;
285224
286225const GroupStatusBannerWrapper = styled ( 'div' ) `
@@ -300,20 +239,6 @@ const StyledLayoutMain = styled(Layout.Main)`
300239 }
301240` ;
302241
303- const GroupContent = styled ( Layout . Main ) `
304- background: ${ p => p . theme . backgroundSecondary } ;
305- display: flex;
306- flex-direction: column;
307- padding: ${ space ( 1.5 ) } ;
308- gap: ${ space ( 1.5 ) } ;
309- @media (min-width: ${ p => p . theme . breakpoints . large } ) {
310- border-right: 1px solid ${ p => p . theme . translucentBorder } ;
311- }
312- @media (max-width: ${ p => p . theme . breakpoints . large } ) {
313- border-bottom-width: 1px solid ${ p => p . theme . translucentBorder } ;
314- }
315- ` ;
316-
317242const StyledLayoutSide = styled ( Layout . Side ) < { hasStreamlinedUi : boolean } > `
318243 ${ p =>
319244 p . hasStreamlinedUi
@@ -333,9 +258,4 @@ const StyledLayoutSide = styled(Layout.Side)<{hasStreamlinedUi: boolean}>`
333258 }
334259` ;
335260
336- const PageErrorBoundary = styled ( ErrorBoundary ) `
337- margin: 0;
338- border: 1px solid ${ p => p . theme . translucentBorder } ;
339- ` ;
340-
341261export default GroupEventDetails ;
0 commit comments