From 935edeb46baa69a7c3f7be4f62160e1722e73c8b Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Tue, 27 Jun 2023 15:42:44 -0700 Subject: [PATCH 01/18] Use gray and italicized text for system frames --- static/app/components/events/interfaces/nativeFrame.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index a26cdcbac878a7..77c0445b2899d3 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -272,7 +272,7 @@ function NativeFrame({ {!relativeAddress || absolute ? frame.instructionAddr : relativeAddress} - + {functionName ? ( ) : ( @@ -351,8 +351,10 @@ const AddressCell = styled('div')` ${p => p.onClick && `color:` + p.theme.linkColor}; `; -const FunctionNameCell = styled('div')` +const FunctionNameCell = styled('div')<{isSystemLabel: boolean}>` word-break: break-all; + color: ${p => (p.isSystemLabel ? p.theme.subText : 'default')}; + font-style: ${p => (p.isSystemLabel ? 'italic' : 'default')}; @media (max-width: ${p => p.theme.breakpoints.small}) { grid-column: 2/6; From d21c2067ff556dfc5ac09d05d828a07c417e2928 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Tue, 27 Jun 2023 15:51:10 -0700 Subject: [PATCH 02/18] Remove System pill --- static/app/components/events/interfaces/nativeFrame.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 77c0445b2899d3..eb6541c45deb8d 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -300,13 +300,7 @@ function NativeFrame({ )} - - {frame.inApp ? ( - {t('In App')} - ) : ( - {t('System')} - )} - + {frame.inApp ? {t('In App')} : null} {expandable && ( Date: Thu, 29 Jun 2023 10:01:05 -0700 Subject: [PATCH 03/18] Gray italics for non-native stacktrace --- .../components/events/interfaces/frame/deprecatedLine.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 5e9e3a4a9f05ae..76bb44a2dee655 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -285,7 +285,7 @@ export class DeprecatedLine extends Component { return ( - +
@@ -445,10 +445,12 @@ const RepeatedFrames = styled('div')` display: inline-block; `; -const DefaultLineTitleWrapper = styled('div')` +const DefaultLineTitleWrapper = styled('div')<{isSystemLabel: boolean}>` display: flex; align-items: center; justify-content: space-between; + color: ${p => (p.isSystemLabel ? p.theme.subText : 'default')}; + font-style: ${p => (p.isSystemLabel ? 'italic' : 'default')}; `; const LeftLineTitle = styled('div')` From 05153d2849da34bb6ed688b5045c2da49e7619b2 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Thu, 29 Jun 2023 10:04:57 -0700 Subject: [PATCH 04/18] Remove System tag --- .../app/components/events/interfaces/frame/deprecatedLine.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 76bb44a2dee655..9926e654231bb1 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -305,7 +305,7 @@ export class DeprecatedLine extends Component { {t('Suspect Frame')} ) : null} - {!data.inApp ? {t('System')} : {t('In App')}} + {data.inApp ? {t('In App')} : null} {this.renderExpander()} From 3d7b5db8d9b0cade38b298c160b10b48ed3584de Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Thu, 29 Jun 2023 15:55:06 -0700 Subject: [PATCH 05/18] Apply styling to whole row --- .../events/interfaces/nativeFrame.tsx | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 0942b8d8272f11..6c43fe22dc37eb 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -219,7 +219,11 @@ function NativeFrame({ return ( - + {status === 'error' ? ( - + {functionName ? ( ) : ( @@ -340,10 +344,8 @@ const AddressCell = styled('div')` ${p => p.onClick && `color:` + p.theme.linkColor}; `; -const FunctionNameCell = styled('div')<{isSystemLabel: boolean}>` +const FunctionNameCell = styled('div')` word-break: break-all; - color: ${p => (p.isSystemLabel ? p.theme.subText : 'default')}; - font-style: ${p => (p.isSystemLabel ? 'italic' : 'default')}; @media (max-width: ${p => p.theme.breakpoints.small}) { grid-column: 2/6; @@ -398,7 +400,11 @@ const FileName = styled('span')` border-bottom: 1px dashed ${p => p.theme.border}; `; -const RowHeader = styled('span')<{expandable: boolean; expanded: boolean}>` +const RowHeader = styled('span')<{ + expandable: boolean; + expanded: boolean; + isSystemLabel: boolean; +}>` display: grid; grid-template-columns: repeat(2, auto) 1fr repeat(2, auto); grid-template-rows: repeat(2, auto); @@ -408,6 +414,8 @@ const RowHeader = styled('span')<{expandable: boolean; expanded: boolean}>` background-color: ${p => p.theme.bodyBackground}; font-size: ${p => p.theme.codeFontSize}; padding: ${space(1)}; + color: ${p => (p.isSystemLabel ? p.theme.subText : '')}; + font-style: ${p => (p.isSystemLabel ? 'italic' : '')}; ${p => p.expandable && `cursor: pointer;`}; ${p => p.expandable && `grid-template-columns: repeat(2, auto) 1fr repeat(2, auto) 16px;`}; From 8915d632db87bda573e8cb323c77380bf6c4b4fd Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Thu, 29 Jun 2023 16:05:14 -0700 Subject: [PATCH 06/18] Replace default with empty string --- .../app/components/events/interfaces/frame/deprecatedLine.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 9926e654231bb1..5a1e353d9abc4a 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -449,8 +449,8 @@ const DefaultLineTitleWrapper = styled('div')<{isSystemLabel: boolean}>` display: flex; align-items: center; justify-content: space-between; - color: ${p => (p.isSystemLabel ? p.theme.subText : 'default')}; - font-style: ${p => (p.isSystemLabel ? 'italic' : 'default')}; + color: ${p => (p.isSystemLabel ? p.theme.subText : '')}; + font-style: ${p => (p.isSystemLabel ? 'italic' : '')}; `; const LeftLineTitle = styled('div')` From af986b338283584200b51ea0b30f9b0b66a260ba Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 10 Jul 2023 12:30:14 -0700 Subject: [PATCH 07/18] Add 1px padding so italic text is not cut-off --- static/app/components/events/interfaces/nativeFrame.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 6c43fe22dc37eb..a535c6dac522ec 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -393,6 +393,7 @@ const Package = styled('span')` overflow: hidden; text-overflow: ellipsis; width: 100%; + padding-right: 1px; `; const FileName = styled('span')` From 82fa64535ead1d41f43dda00b9c4201e9e8c55c7 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 10 Jul 2023 13:13:48 -0700 Subject: [PATCH 08/18] Add comment --- static/app/components/events/interfaces/nativeFrame.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index a535c6dac522ec..79f64413c0c2e5 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -393,7 +393,7 @@ const Package = styled('span')` overflow: hidden; text-overflow: ellipsis; width: 100%; - padding-right: 1px; + padding-right: 1px; /* Needed to prevent text cropping with italic font */ `; const FileName = styled('span')` From 7db802341c29c464ee526174f666d85d199ba66a Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 10 Jul 2023 14:27:16 -0700 Subject: [PATCH 09/18] Add 1px more padding --- static/app/components/events/interfaces/nativeFrame.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 79f64413c0c2e5..dc4c2609bfb83e 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -393,7 +393,7 @@ const Package = styled('span')` overflow: hidden; text-overflow: ellipsis; width: 100%; - padding-right: 1px; /* Needed to prevent text cropping with italic font */ + padding-right: 2px; /* Needed to prevent text cropping with italic font */ `; const FileName = styled('span')` From b158d01beddbcca23a9be4788e55e7badf22ae30 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 17 Jul 2023 10:34:01 -0700 Subject: [PATCH 10/18] Fix location of calls --- .../sources/customRepositories/index.tsx | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx b/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx index 6a20553a58a96b..5305f7e6890ac8 100644 --- a/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx +++ b/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx @@ -55,46 +55,15 @@ function CustomRepositories({ repository => repository.type === CustomRepoType.APP_STORE_CONNECT ).length; - const openDebugFileSourceDialog = useCallback(() => { - const {customRepository} = location.query; - - if (!customRepository) { - return; - } - - const itemIndex = repositories.findIndex( - repository => repository.id === customRepository - ); - - const item = repositories[itemIndex]; - - if (!item) { - return; - } - - openDebugFileSourceModal({ - organization, - sourceConfig: item, - sourceType: item.type, - appStoreConnectSourcesQuantity, - appStoreConnectStatusData: appStoreConnectContext?.[item.id], - onSave: updatedItem => - persistData({updatedItem: updatedItem as CustomRepo, index: itemIndex}), - onClose: handleCloseModal, + const handleCloseModal = useCallback(() => { + router.push({ + ...location, + query: { + ...location.query, + customRepository: undefined, + }, }); - }, [ - appStoreConnectContext, - appStoreConnectSourcesQuantity, - handleCloseModal, - location.query, - organization, - persistData, - repositories, - ]); - - useEffect(() => { - openDebugFileSourceDialog(); - }, [openDebugFileSourceDialog]); + }, [location, router]); const persistData = useCallback( ({updatedItems, updatedItem, index, refresh}) => { @@ -138,15 +107,46 @@ function CustomRepositories({ [repositories, api, orgSlug, projSlug] ); - const handleCloseModal = useCallback(() => { - router.push({ - ...location, - query: { - ...location.query, - customRepository: undefined, - }, + const openDebugFileSourceDialog = useCallback(() => { + const {customRepository} = location.query; + + if (!customRepository) { + return; + } + + const itemIndex = repositories.findIndex( + repository => repository.id === customRepository + ); + + const item = repositories[itemIndex]; + + if (!item) { + return; + } + + openDebugFileSourceModal({ + organization, + sourceConfig: item, + sourceType: item.type, + appStoreConnectSourcesQuantity, + appStoreConnectStatusData: appStoreConnectContext?.[item.id], + onSave: updatedItem => + persistData({updatedItem: updatedItem as CustomRepo, index: itemIndex}), + onClose: handleCloseModal, }); - }, [location, router]); + }, [ + appStoreConnectContext, + appStoreConnectSourcesQuantity, + handleCloseModal, + location.query, + organization, + persistData, + repositories, + ]); + + useEffect(() => { + openDebugFileSourceDialog(); + }, [openDebugFileSourceDialog]); function handleAddRepository(repoType: CustomRepoType) { openDebugFileSourceModal({ From 7dfb1c0ca889e8e5b1347ade063821b865866338 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 17 Jul 2023 10:48:15 -0700 Subject: [PATCH 11/18] remove eslint fixes --- .../sources/customRepositories/index.tsx | 132 +++++++++--------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx b/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx index 5305f7e6890ac8..74445e1d9228c4 100644 --- a/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx +++ b/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx @@ -1,4 +1,4 @@ -import {useCallback, useContext, useEffect} from 'react'; +import {useContext, useEffect} from 'react'; import {InjectedRouter} from 'react-router'; import styled from '@emotion/styled'; import {Location} from 'history'; @@ -50,64 +50,17 @@ function CustomRepositories({ isLoading, }: Props) { const appStoreConnectContext = useContext(AppStoreConnectContext); + + useEffect(() => { + openDebugFileSourceDialog(); + }, [location.query, appStoreConnectContext]); + const orgSlug = organization.slug; const appStoreConnectSourcesQuantity = repositories.filter( repository => repository.type === CustomRepoType.APP_STORE_CONNECT ).length; - const handleCloseModal = useCallback(() => { - router.push({ - ...location, - query: { - ...location.query, - customRepository: undefined, - }, - }); - }, [location, router]); - - const persistData = useCallback( - ({updatedItems, updatedItem, index, refresh}) => { - let items = updatedItems ?? []; - - if (updatedItem && defined(index)) { - items = [...repositories]; - items.splice(index, 1, updatedItem); - } - - const {successMessage, errorMessage} = getRequestMessages( - items.length, - repositories.length - ); - - const symbolSources = JSON.stringify(items.map(expandKeys)); - - const promise: Promise = api.requestPromise( - `/projects/${orgSlug}/${projSlug}/`, - { - method: 'PUT', - data: {symbolSources}, - } - ); - - promise.catch(() => { - addErrorMessage(errorMessage); - }); - - promise.then(result => { - ProjectsStore.onUpdateSuccess(result); - addSuccessMessage(successMessage); - - if (refresh) { - window.location.reload(); - } - }); - - return promise; - }, - [repositories, api, orgSlug, projSlug] - ); - - const openDebugFileSourceDialog = useCallback(() => { + function openDebugFileSourceDialog() { const {customRepository} = location.query; if (!customRepository) { @@ -134,19 +87,66 @@ function CustomRepositories({ persistData({updatedItem: updatedItem as CustomRepo, index: itemIndex}), onClose: handleCloseModal, }); - }, [ - appStoreConnectContext, - appStoreConnectSourcesQuantity, - handleCloseModal, - location.query, - organization, - persistData, - repositories, - ]); + } - useEffect(() => { - openDebugFileSourceDialog(); - }, [openDebugFileSourceDialog]); + function persistData({ + updatedItems, + updatedItem, + index, + refresh, + }: { + index?: number; + refresh?: boolean; + updatedItem?: CustomRepo; + updatedItems?: CustomRepo[]; + }) { + let items = updatedItems ?? []; + + if (updatedItem && defined(index)) { + items = [...repositories]; + items.splice(index, 1, updatedItem); + } + + const {successMessage, errorMessage} = getRequestMessages( + items.length, + repositories.length + ); + + const symbolSources = JSON.stringify(items.map(expandKeys)); + + const promise: Promise = api.requestPromise( + `/projects/${orgSlug}/${projSlug}/`, + { + method: 'PUT', + data: {symbolSources}, + } + ); + + promise.catch(() => { + addErrorMessage(errorMessage); + }); + + promise.then(result => { + ProjectsStore.onUpdateSuccess(result); + addSuccessMessage(successMessage); + + if (refresh) { + window.location.reload(); + } + }); + + return promise; + } + + function handleCloseModal() { + router.push({ + ...location, + query: { + ...location.query, + customRepository: undefined, + }, + }); + } function handleAddRepository(repoType: CustomRepoType) { openDebugFileSourceModal({ From d4dfe7d793b63a25886e8dc1653830ff7eccb80c Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 17 Jul 2023 15:16:59 -0700 Subject: [PATCH 12/18] Put changes under feature flag --- .../interfaces/frame/deprecatedLine.tsx | 53 +++++++++++++++---- .../events/interfaces/nativeFrame.tsx | 27 ++++++++-- 2 files changed, 64 insertions(+), 16 deletions(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index f78062ff4033ee..93db086cac8630 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -274,6 +274,9 @@ export class DeprecatedLine extends Component { const {isHoverPreviewed, debugFrames, data, isANR, threadId, lockAddress} = this.props; const organization = this.props.organization; + const stacktraceChangesEnabled = !!organization?.features.includes( + 'issue-details-stacktrace-improvements' + ); const anrCulprit = isANR && analyzeFrameForRootCause( @@ -284,8 +287,12 @@ export class DeprecatedLine extends Component { return ( - - + +
@@ -305,7 +312,13 @@ export class DeprecatedLine extends Component { {t('Suspect Frame')} ) : null} - {data.inApp ? {t('In App')} : null} + {!data.inApp ? ( + stacktraceChangesEnabled ? null : ( + {t('System')} + ) + ) : ( + {t('In App')} + )} {this.renderExpander()} @@ -328,10 +341,18 @@ export class DeprecatedLine extends Component { const leadHint = this.renderLeadHint(); const packageStatus = this.packageStatus(); + const organization = this.props.organization; + const stacktraceChangesEnabled = !!organization?.features.includes( + 'issue-details-stacktrace-improvements' + ); return ( - + {leadHint} @@ -370,9 +391,16 @@ export class DeprecatedLine extends Component { isHoverPreviewed={isHoverPreviewed} /> - {this.renderExpander()} + + {this.renderExpander()} + + {!data.inApp ? ( - {t('System')} + stacktraceChangesEnabled ? null : ( + {t('System')} + ) ) : ( {t('In App')} )} @@ -449,12 +477,12 @@ const RepeatedFrames = styled('div')` display: inline-block; `; -const DefaultLineTitleWrapper = styled('div')<{isSystemLabel: boolean}>` +const DefaultLineTitleWrapper = styled('div')<{stacktraceChangesEnabled: boolean}>` display: flex; align-items: center; justify-content: space-between; - color: ${p => (p.isSystemLabel ? p.theme.subText : '')}; - font-style: ${p => (p.isSystemLabel ? 'italic' : '')}; + color: ${p => (p.stacktraceChangesEnabled ? p.theme.subText : '')}; + font-style: ${p => (p.stacktraceChangesEnabled ? 'italic' : '')}; `; const LeftLineTitle = styled('div')` @@ -490,9 +518,12 @@ const NativeLineContent = styled('div')<{isFrameAfterLastNonApp: boolean}>` } `; -const DefaultLine = styled('div')` +const DefaultLine = styled('div')<{stacktraceChangesEnabled: boolean}>` display: grid; - grid-template-columns: 1fr auto ${space(2)}; /* sm icon size */ + grid-template-columns: ${p => + p.stacktraceChangesEnabled + ? `1fr auto auto` + : `1fr auto ${space(2)}`}; /* sm icon size */ align-items: center; `; diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 9525f893cf235c..47938f969c9471 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -29,6 +29,7 @@ import {space} from 'sentry/styles/space'; import {Frame, PlatformType, SentryAppComponent} from 'sentry/types'; import {Event} from 'sentry/types/event'; import {defined} from 'sentry/utils'; +import useOrganization from 'sentry/utils/useOrganization'; import withSentryAppComponents from 'sentry/utils/withSentryAppComponents'; import DebugImage from './debugMeta/debugImage'; @@ -215,6 +216,10 @@ function NativeFrame({ const addressTooltip = getAddressTooltip(); const functionName = getFunctionName(); const status = getStatus(); + const organization = useOrganization(); + const stacktraceChangesEnabled = !!organization?.features.includes( + 'issue-details-stacktrace-improvements' + ); return ( @@ -222,7 +227,7 @@ function NativeFrame({ {status === 'error' ? ( @@ -301,7 +306,15 @@ function NativeFrame({ )} - {frame.inApp ? {t('In App')} : null} + + {!frame.inApp ? ( + stacktraceChangesEnabled ? null : ( + {t('System')} + ) + ) : ( + {t('In App')} + )} + {expandable && ( ` display: grid; grid-template-columns: repeat(2, auto) 1fr repeat(2, auto); @@ -421,8 +434,8 @@ const RowHeader = styled('span')<{ background-color: ${p => p.theme.bodyBackground}; font-size: ${p => p.theme.codeFontSize}; padding: ${space(1)}; - color: ${p => (p.isSystemLabel ? p.theme.subText : '')}; - font-style: ${p => (p.isSystemLabel ? 'italic' : '')}; + color: ${p => (p.stacktraceChangesEnabled ? p.theme.subText : '')}; + font-style: ${p => (p.stacktraceChangesEnabled ? 'italic' : '')}; ${p => p.expandable && `cursor: pointer;`}; ${p => p.expandable && `grid-template-columns: repeat(2, auto) 1fr repeat(2, auto) 16px;`}; @@ -446,3 +459,7 @@ const StackTraceFrame = styled('li')` const SymbolicatorIcon = styled('div')` width: ${p => p.theme.iconSizes.sm}; `; + +const InAppTag = styled(Tag)` + margin-right: ${space(1)}; +`; From 2689d14d626d431fbc6354db771a52dd9a4ddc54 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 17 Jul 2023 15:51:06 -0700 Subject: [PATCH 13/18] Rename flag --- src/sentry/conf/server.py | 2 +- src/sentry/features/__init__.py | 2 +- .../app/components/events/interfaces/frame/deprecatedLine.tsx | 4 ++-- static/app/components/events/interfaces/nativeFrame.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py index 2de1323bf20fd6..68a7e78b731694 100644 --- a/src/sentry/conf/server.py +++ b/src/sentry/conf/server.py @@ -1622,7 +1622,7 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str: # Enable tag improvements in the issue details page "organizations:issue-details-tag-improvements": False, # Enable updates to the stacktrace ui - "organizations:issue-details-stacktrace-improvements": False, + "organizations:issue-details-stacktrace-changes": False, # Enable the release details performance section "organizations:release-comparison-performance": False, # Enable team insights page diff --git a/src/sentry/features/__init__.py b/src/sentry/features/__init__.py index 1e949f4faed426..d4880656c9c0bb 100644 --- a/src/sentry/features/__init__.py +++ b/src/sentry/features/__init__.py @@ -91,7 +91,7 @@ default_manager.add("organizations:issue-details-replay-event", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-details-most-helpful-event", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-details-tag-improvements", OrganizationFeature, FeatureHandlerStrategy.REMOTE) -default_manager.add("organizations:issue-details-stacktrace-improvements", OrganizationFeature, FeatureHandlerStrategy.REMOTE) +default_manager.add("organizations:issue-details-stacktrace-changes", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-platform", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-search-allow-postgres-only-search", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-search-use-cdc-primary", OrganizationFeature, FeatureHandlerStrategy.REMOTE) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 93db086cac8630..7ae68b5402a2df 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -275,7 +275,7 @@ export class DeprecatedLine extends Component { this.props; const organization = this.props.organization; const stacktraceChangesEnabled = !!organization?.features.includes( - 'issue-details-stacktrace-improvements' + 'issue-details-stacktrace-changes' ); const anrCulprit = isANR && @@ -343,7 +343,7 @@ export class DeprecatedLine extends Component { const packageStatus = this.packageStatus(); const organization = this.props.organization; const stacktraceChangesEnabled = !!organization?.features.includes( - 'issue-details-stacktrace-improvements' + 'issue-details-stacktrace-changes' ); return ( diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 47938f969c9471..7f159ad7a59ee6 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -218,7 +218,7 @@ function NativeFrame({ const status = getStatus(); const organization = useOrganization(); const stacktraceChangesEnabled = !!organization?.features.includes( - 'issue-details-stacktrace-improvements' + 'issue-details-stacktrace-changes' ); return ( From 9097ddd2d6acbe60c7eadd25fd796d7e68f641b4 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Mon, 17 Jul 2023 15:57:35 -0700 Subject: [PATCH 14/18] Revert "Rename flag" This reverts commit 2689d14d626d431fbc6354db771a52dd9a4ddc54. --- src/sentry/conf/server.py | 2 +- src/sentry/features/__init__.py | 2 +- .../app/components/events/interfaces/frame/deprecatedLine.tsx | 4 ++-- static/app/components/events/interfaces/nativeFrame.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py index 68a7e78b731694..2de1323bf20fd6 100644 --- a/src/sentry/conf/server.py +++ b/src/sentry/conf/server.py @@ -1622,7 +1622,7 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str: # Enable tag improvements in the issue details page "organizations:issue-details-tag-improvements": False, # Enable updates to the stacktrace ui - "organizations:issue-details-stacktrace-changes": False, + "organizations:issue-details-stacktrace-improvements": False, # Enable the release details performance section "organizations:release-comparison-performance": False, # Enable team insights page diff --git a/src/sentry/features/__init__.py b/src/sentry/features/__init__.py index d4880656c9c0bb..1e949f4faed426 100644 --- a/src/sentry/features/__init__.py +++ b/src/sentry/features/__init__.py @@ -91,7 +91,7 @@ default_manager.add("organizations:issue-details-replay-event", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-details-most-helpful-event", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-details-tag-improvements", OrganizationFeature, FeatureHandlerStrategy.REMOTE) -default_manager.add("organizations:issue-details-stacktrace-changes", OrganizationFeature, FeatureHandlerStrategy.REMOTE) +default_manager.add("organizations:issue-details-stacktrace-improvements", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-platform", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-search-allow-postgres-only-search", OrganizationFeature, FeatureHandlerStrategy.REMOTE) default_manager.add("organizations:issue-search-use-cdc-primary", OrganizationFeature, FeatureHandlerStrategy.REMOTE) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 7ae68b5402a2df..93db086cac8630 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -275,7 +275,7 @@ export class DeprecatedLine extends Component { this.props; const organization = this.props.organization; const stacktraceChangesEnabled = !!organization?.features.includes( - 'issue-details-stacktrace-changes' + 'issue-details-stacktrace-improvements' ); const anrCulprit = isANR && @@ -343,7 +343,7 @@ export class DeprecatedLine extends Component { const packageStatus = this.packageStatus(); const organization = this.props.organization; const stacktraceChangesEnabled = !!organization?.features.includes( - 'issue-details-stacktrace-changes' + 'issue-details-stacktrace-improvements' ); return ( diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 7f159ad7a59ee6..47938f969c9471 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -218,7 +218,7 @@ function NativeFrame({ const status = getStatus(); const organization = useOrganization(); const stacktraceChangesEnabled = !!organization?.features.includes( - 'issue-details-stacktrace-changes' + 'issue-details-stacktrace-improvements' ); return ( From 569800003c5e59ed42330094e06d1d7f94386c51 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Tue, 18 Jul 2023 09:29:55 -0700 Subject: [PATCH 15/18] Doesn't need to be under feature flag --- .../components/events/interfaces/frame/deprecatedLine.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 93db086cac8630..8ffb6d1057ed73 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -518,12 +518,9 @@ const NativeLineContent = styled('div')<{isFrameAfterLastNonApp: boolean}>` } `; -const DefaultLine = styled('div')<{stacktraceChangesEnabled: boolean}>` +const DefaultLine = styled('div')` display: grid; - grid-template-columns: ${p => - p.stacktraceChangesEnabled - ? `1fr auto auto` - : `1fr auto ${space(2)}`}; /* sm icon size */ + grid-template-columns: 1fr auto ${space(2)}; /* sm icon size */ align-items: center; `; From c29b7c35550f0795b9cf8381d97ee31a3e714402 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Tue, 18 Jul 2023 10:42:27 -0700 Subject: [PATCH 16/18] Does need to be under feature flag --- .../components/events/interfaces/frame/deprecatedLine.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 8ffb6d1057ed73..93db086cac8630 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -518,9 +518,12 @@ const NativeLineContent = styled('div')<{isFrameAfterLastNonApp: boolean}>` } `; -const DefaultLine = styled('div')` +const DefaultLine = styled('div')<{stacktraceChangesEnabled: boolean}>` display: grid; - grid-template-columns: 1fr auto ${space(2)}; /* sm icon size */ + grid-template-columns: ${p => + p.stacktraceChangesEnabled + ? `1fr auto auto` + : `1fr auto ${space(2)}`}; /* sm icon size */ align-items: center; `; From b818071d906e4a4d5642dbcdee24128df6ac5289 Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Tue, 18 Jul 2023 10:48:53 -0700 Subject: [PATCH 17/18] Apply logic in other instances --- .../app/components/events/interfaces/frame/deprecatedLine.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/app/components/events/interfaces/frame/deprecatedLine.tsx b/static/app/components/events/interfaces/frame/deprecatedLine.tsx index 93db086cac8630..bc32fca709018d 100644 --- a/static/app/components/events/interfaces/frame/deprecatedLine.tsx +++ b/static/app/components/events/interfaces/frame/deprecatedLine.tsx @@ -292,7 +292,9 @@ export class DeprecatedLine extends Component { data-test-id="title" stacktraceChangesEnabled={stacktraceChangesEnabled} > - +
From ac719e8228468c8a63c6ff217b2b5b087e90acde Mon Sep 17 00:00:00 2001 From: 17hogeju <17hogeju@gmail.com> Date: Tue, 18 Jul 2023 11:27:32 -0700 Subject: [PATCH 18/18] Remove unnecessary margin --- static/app/components/events/interfaces/nativeFrame.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index b44fe9ffa2cb7f..2118d007a9c559 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -309,10 +309,10 @@ function NativeFrame({ {!frame.inApp ? ( stacktraceChangesEnabled ? null : ( - {t('System')} + {t('System')} ) ) : ( - {t('In App')} + {t('In App')} )} @@ -456,7 +456,3 @@ const StackTraceFrame = styled('li')` const SymbolicatorIcon = styled('div')` width: ${p => p.theme.iconSizes.sm}; `; - -const InAppTag = styled(Tag)` - margin-right: ${space(1)}; -`;