diff --git a/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx b/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx index 1047813b513b07..e6acafb7fe1a3e 100644 --- a/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx @@ -11,7 +11,6 @@ import type {PlatformKey} from 'sentry/types/project'; import {StackType, StackView} from 'sentry/types/stacktrace'; import {defined} from 'sentry/utils'; import {isNativePlatform} from 'sentry/utils/platform'; -import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils'; type Props = { chainedException: boolean; @@ -44,7 +43,6 @@ export function StackTrace({ frameSourceMapDebuggerData, stackType, }: Props) { - const hasStreamlinedUI = useHasStreamlinedUI(); if (!defined(stacktrace)) { return null; } @@ -90,7 +88,6 @@ export function StackTrace({ newestFirst={newestFirst} event={event} meta={meta} - hideIcon={hasStreamlinedUI} /> ); } @@ -107,7 +104,6 @@ export function StackTrace({ threadId={threadId} frameSourceMapDebuggerData={frameSourceMapDebuggerData} hideSourceMapDebugger={stackType === StackType.MINIFIED} - hideIcon={hasStreamlinedUI} /> ); } diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/content.spec.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/content.spec.tsx index 65a467940673f3..92c1bd51c072a4 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/content.spec.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/content.spec.tsx @@ -1,6 +1,5 @@ import {EventFixture} from 'sentry-fixture/event'; import {EventEntryStacktraceFixture} from 'sentry-fixture/eventEntryStacktrace'; -import {EventStacktraceFrameFixture} from 'sentry-fixture/eventStacktraceFrame'; import {GitHubIntegrationFixture} from 'sentry-fixture/githubIntegration'; import {OrganizationFixture} from 'sentry-fixture/organization'; import {ProjectFixture} from 'sentry-fixture/project'; @@ -63,9 +62,6 @@ describe('StackTrace', () => { const stackTraceContent = screen.getByTestId('stack-trace-content'); expect(stackTraceContent).toBeInTheDocument(); - // platform icon - expect(screen.getByTestId('platform-icon-python')).toBeInTheDocument(); - // frame list const frames = screen.getByTestId('frames'); expect(frames.children).toHaveLength(5); @@ -453,94 +449,4 @@ describe('StackTrace', () => { expect(frameTitles[1]).toHaveTextContent('raven/base.py in build_msg at line 303'); }); }); - - describe('platform icons', () => { - it('uses the top in-app frame file extension for mixed stack trace platforms', () => { - render( - - ); - - // foo.py is the most recent in-app frame with a valid file extension - expect(screen.getByTestId('platform-icon-python')).toBeInTheDocument(); - }); - - it('uses frame.platform if file extension does not work', () => { - render( - - ); - - expect(screen.getByTestId('platform-icon-node')).toBeInTheDocument(); - }); - - it('falls back to the event platform if there is no other information', () => { - render( - - ); - - expect(screen.getByTestId('platform-icon-python')).toBeInTheDocument(); - }); - }); }); diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx index 0ff4f2d4b1023a..a3f4b8c47210c7 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx @@ -1,5 +1,4 @@ import {Fragment, useState} from 'react'; -import {css} from '@emotion/react'; import styled from '@emotion/styled'; import type {DeprecatedLineProps} from 'sentry/components/events/interfaces/frame/deprecatedLine'; @@ -9,7 +8,6 @@ import { getHiddenFrameIndices, getLastFrameIndex, isRepeatedFrame, - stackTracePlatformIcon, } from 'sentry/components/events/interfaces/utils'; import {Panel} from 'sentry/components/panels/panel'; import type {Event, Frame} from 'sentry/types/event'; @@ -18,7 +16,6 @@ import type {StackTraceMechanism, StacktraceType} from 'sentry/types/stacktrace' import {defined} from 'sentry/utils'; import {OmittedFrames} from './omittedFrames'; -import {StacktracePlatformIcon} from './platformIcon'; type DefaultProps = { expandFirstFrame: boolean; @@ -32,7 +29,6 @@ type Props = { platform: PlatformKey; className?: string; frameSourceMapDebuggerData?: FrameSourceMapDebuggerData[]; - hideIcon?: boolean; hideSourceMapDebugger?: boolean; isHoverPreviewed?: boolean; lockAddress?: string; @@ -53,7 +49,6 @@ export function Content({ isHoverPreviewed = false, maxDepth, meta, - hideIcon, threadId, lockAddress, frameSourceMapDebuggerData, @@ -202,15 +197,11 @@ export function Content({ includeSystemFrames ? 'full-traceback' : 'in-app-traceback' }`; - const platformIcon = stackTracePlatformIcon(platform, data.frames ?? []); - return ( - {hideIcon ? null : } {newestFirst ? [...convertedFrames].reverse() : convertedFrames} @@ -224,18 +215,9 @@ const Wrapper = styled('div')` position: relative; `; -export const StackTraceContentPanel = styled(Panel)<{hideIcon?: boolean}>` +export const StackTraceContentPanel = styled(Panel)` position: relative; overflow: hidden; - - ${p => - !p.hideIcon && - css` - border-top-left-radius: 0; - @media (max-width: ${p.theme.breakpoints.md}) { - border-top-left-radius: ${p.theme.radius.md}; - } - `} `; const StyledList = styled('ul')` diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/index.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/index.tsx index 73a6c278e7dc6b..c988cc0ec850ff 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/index.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/index.tsx @@ -6,7 +6,6 @@ import type {PlatformKey} from 'sentry/types/project'; import type {StacktraceType} from 'sentry/types/stacktrace'; import {StackView} from 'sentry/types/stacktrace'; import {isNativePlatform} from 'sentry/utils/platform'; -import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils'; import {Content} from './content'; import {NativeContent} from './nativeContent'; @@ -39,7 +38,6 @@ export function StackTraceContent({ threadId, lockAddress, }: Props) { - const hasStreamlinedUI = useHasStreamlinedUI(); if (stackView === StackView.RAW) { return ( @@ -62,7 +60,6 @@ export function StackTraceContent({ groupingCurrentLevel={groupingCurrentLevel} meta={meta} inlined={inlined} - hideIcon={inlined || hasStreamlinedUI} maxDepth={maxDepth} /> @@ -79,7 +76,6 @@ export function StackTraceContent({ event={event} newestFirst={newestFirst} meta={meta} - hideIcon={inlined || hasStreamlinedUI} inlined={inlined} maxDepth={maxDepth} threadId={threadId} diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx index 46f6ab123b16f0..a54e825e1f2d75 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx @@ -8,7 +8,6 @@ import { getLastFrameIndex, isRepeatedFrame, parseAddress, - stackTracePlatformIcon, } from 'sentry/components/events/interfaces/utils'; import {Panel} from 'sentry/components/panels/panel'; import type {Event, Frame} from 'sentry/types/event'; @@ -18,7 +17,6 @@ import type {StacktraceType} from 'sentry/types/stacktrace'; import {defined} from 'sentry/utils'; import {OmittedFrames} from './omittedFrames'; -import {StacktracePlatformIcon} from './platformIcon'; function isFrameUsedForGrouping( frame: Frame, @@ -40,7 +38,6 @@ type Props = { platform: PlatformKey; className?: string; groupingCurrentLevel?: Group['metadata']['current_level']; - hideIcon?: boolean; includeSystemFrames?: boolean; inlined?: boolean; isHoverPreviewed?: boolean; @@ -56,7 +53,6 @@ export function NativeContent({ newestFirst, isHoverPreviewed, inlined, - hideIcon, groupingCurrentLevel, includeSystemFrames = true, maxDepth, @@ -241,15 +237,9 @@ export function NativeContent({ return ( - {hideIcon ? null : ( - - )} {convertedFrames} @@ -261,9 +251,8 @@ const Wrapper = styled('div')` position: relative; `; -const ContentPanel = styled(Panel)<{hideIcon?: boolean}>` +const ContentPanel = styled(Panel)` position: relative; - border-top-left-radius: ${p => (p.hideIcon ? p.theme.radius.md : 0)}; overflow: hidden; `; diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/platformIcon.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/platformIcon.tsx deleted file mode 100644 index c3a47e97a34388..00000000000000 --- a/static/app/components/events/interfaces/crashContent/stackTrace/platformIcon.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import styled from '@emotion/styled'; -import {PlatformIcon} from 'platformicons'; - -type Props = { - platform: string; -}; - -export function StacktracePlatformIcon({platform}: Props) { - return ( - - ); -} - -const StyledPlatformIcon = styled(PlatformIcon)` - position: absolute; - top: 0; - right: 100%; - border-radius: 3px 0 0 3px; - - @media (max-width: ${p => p.theme.breakpoints.md}) { - display: none; - } -`; diff --git a/static/app/components/events/interfaces/exception.tsx b/static/app/components/events/interfaces/exception.tsx index bcc2b724a51035..5d99cb27c37e65 100644 --- a/static/app/components/events/interfaces/exception.tsx +++ b/static/app/components/events/interfaces/exception.tsx @@ -10,7 +10,6 @@ import {EntryType} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; import {SectionDivider} from 'sentry/views/issueDetails/streamline/foldSection'; -import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils'; import {ExceptionContent} from './crashContent/exception'; import {NoStackTraceMessage} from './noStackTraceMessage'; @@ -33,8 +32,6 @@ export function Exception({ groupingCurrentLevel, }: Props) { const eventHasThreads = !!event.entries.some(entry => entry.type === EntryType.THREADS); - const hasStreamlinedUI = useHasStreamlinedUI(); - // in case there are threads in the event data, we don't render the // exception block. Instead the exception is contained within the // thread interface. @@ -106,7 +103,7 @@ export function Exception({ groupingCurrentLevel={groupingCurrentLevel} meta={meta} /> - {hasStreamlinedUI && group && ( + {group && ( {data.values && data.values.length > 1 && ( diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index c5bf5419df6064..d1ec8b6e37c51e 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -46,7 +46,6 @@ import {useSyncedLocalStorageState} from 'sentry/utils/useSyncedLocalStorageStat import {withSentryAppComponents} from 'sentry/utils/withSentryAppComponents'; import {SectionKey, useIssueDetails} from 'sentry/views/issueDetails/streamline/context'; import {getFoldSectionKey} from 'sentry/views/issueDetails/streamline/foldSection'; -import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils'; import {combineStatus} from './debugMeta/utils'; import {Context} from './frame/context'; @@ -112,8 +111,6 @@ function NativeFrame({ getFoldSectionKey(SectionKey.DEBUGMETA), debugSectionConfig?.initialCollapse ?? false ); - const hasStreamlinedUI = useHasStreamlinedUI(); - const fullStackTrace = stackView === StackView.FULL; const absolute = displayOptions.includes('absolute-addresses'); @@ -127,8 +124,7 @@ function NativeFrame({ !!frame.symbolicatorStatus && frame.symbolicatorStatus !== SymbolicatorStatus.UNKNOWN_IMAGE && !isHoverPreviewed && - // We know the debug section is rendered (only once streamline ui is enabled) - (hasStreamlinedUI ? !!debugSectionConfig : true); + !!debugSectionConfig; const leadsToApp = !frame.inApp && (nextFrame?.inApp || !nextFrame); const expandable = isExpandable({ @@ -255,10 +251,8 @@ function NativeFrame({ DebugMetaStore.updateFilter(searchTerm); } - if (hasStreamlinedUI) { - // Expand the section - setIsCollapsed(false); - } + // Expand the section + setIsCollapsed(false); // Scroll to the section document diff --git a/static/app/components/events/interfaces/utils.tsx b/static/app/components/events/interfaces/utils.tsx index a1b5b18ee6400d..32182e6b382685 100644 --- a/static/app/components/events/interfaces/utils.tsx +++ b/static/app/components/events/interfaces/utils.tsx @@ -1,4 +1,3 @@ -import partition from 'lodash/partition'; import * as qs from 'query-string'; import {getThreadException} from 'sentry/components/events/interfaces/threads/threadSelector/getThreadException'; @@ -11,7 +10,6 @@ import type {PlatformKey} from 'sentry/types/project'; import type {StacktraceType} from 'sentry/types/stacktrace'; import {StacktraceOrder, type AvatarUser} from 'sentry/types/user'; import {defined} from 'sentry/utils'; -import {fileExtensionToPlatform, getFileExtension} from 'sentry/utils/fileExtension'; /** * Attempts to escape a string from any bash double quote special characters. @@ -299,50 +297,6 @@ export function parseAssembly(assembly: string | null) { return {name, version, culture, publicKeyToken}; } -function getFramePlatform(frame: Frame) { - const fileExtension = getFileExtension(frame.filename ?? ''); - const fileExtensionPlatform = fileExtension - ? fileExtensionToPlatform(fileExtension) - : null; - - if (fileExtensionPlatform) { - return fileExtensionPlatform; - } - - if (frame.platform) { - return frame.platform; - } - - return null; -} - -/** - * Returns the representative platform for the given stack trace frames. - * Prioritizes recent in-app frames, checking first for a matching file extension - * and then for a frame.platform attribute [1]. - * - * If none of the frames have a platform, falls back to the event platform. - * - * [1] https://develop.sentry.dev/sdk/event-payloads/stacktrace/#frame-attributes - */ -export function stackTracePlatformIcon(eventPlatform: PlatformKey, frames: Frame[]) { - const [inAppFrames, systemFrames] = partition( - // Reverse frames to get newest-first ordering - [...frames].reverse(), - frame => frame.inApp - ); - - for (const frame of [...inAppFrames, ...systemFrames]) { - const framePlatform = getFramePlatform(frame); - - if (framePlatform) { - return framePlatform; - } - } - - return eventPlatform; -} - export function isStacktraceNewestFirst() { const user = ConfigStore.get('user'); // user may not be authenticated diff --git a/static/app/components/groupPreviewTooltip/stackTracePreview.tsx b/static/app/components/groupPreviewTooltip/stackTracePreview.tsx index 859867594b7b06..50058dedb92451 100644 --- a/static/app/components/groupPreviewTooltip/stackTracePreview.tsx +++ b/static/app/components/groupPreviewTooltip/stackTracePreview.tsx @@ -79,16 +79,10 @@ export function StackTracePreviewContent({ | Partial>; if (isNativePlatform(platform)) { - return ( - - ); + return ; } - return ; + return ; } type StackTracePreviewProps = {