Skip to content

Commit eafc821

Browse files
authored
ref(issue-details): Remove useHasStreamlinedUI hook and legacy UI code (#112465)
Remove the `useHasStreamlinedUI` hook which always returned `true`, along with all legacy (non-streamlined) UI code paths gated behind it. Changes: - Delete `useHasStreamlinedUI` from `utils.tsx` - Remove all call sites and simplify conditional branches in `groupEventDetailsContent`, `groupEventDetails`, and `groupDetails` - Remove dead imports, styled components, and functions that were only reachable from the legacy path (`renderGroupStatusBanner`, `trackTabChanged`, `StyledLayoutBody`, `StyledLayoutMain`, `GroupStatusBannerWrapper`, `GroupTabPanels`, `NotFoundMessage`, `StyledDataSection`, etc.) - Remove `jest.mock` overrides of the hook in test files - Simplify `inputWithStorage.tsx` to no longer gate on the hook Agent transcript: https://claudescope.sentry.dev/share/N42GnuAIP46Yfs6hbcGKQ4Uybjtnlxsgws23v5IjV_o
1 parent 78e84a2 commit eafc821

29 files changed

+30
-3794
lines changed

static/app/components/activity/note/inputWithStorage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type {MentionChangeEvent} from 'sentry/components/activity/note/types';
77
import type {NoteType} from 'sentry/types/alerts';
88
import {localStorageWrapper} from 'sentry/utils/localStorage';
99
import {StreamlinedNoteInput} from 'sentry/views/issueDetails/streamline/sidebar/note';
10-
import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';
1110

1211
type InputProps = React.ComponentProps<typeof NoteInput>;
1312

@@ -61,7 +60,6 @@ function NoteInputWithStorage({
6160
source,
6261
...props
6362
}: Props) {
64-
const hasStreamlinedUi = useHasStreamlinedUI();
6563
const value = useMemo(() => {
6664
if (text) {
6765
return text;
@@ -137,7 +135,7 @@ function NoteInputWithStorage({
137135
);
138136

139137
// Make sure `this.props` does not override `onChange` and `onCreate`
140-
if (hasStreamlinedUi && source === 'issue-details') {
138+
if (source === 'issue-details') {
141139
return (
142140
<StreamlinedNoteInput
143141
text={value}

static/app/components/archivedBox.spec.tsx

Lines changed: 0 additions & 78 deletions
This file was deleted.

static/app/components/archivedBox.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {DateTime} from 'sentry/components/dateTime';
22
import {Duration} from 'sentry/components/duration';
3-
import {BannerContainer, BannerSummary} from 'sentry/components/events/styles';
43
import {t} from 'sentry/locale';
54
import type {Group, IgnoredStatusDetails} from 'sentry/types/group';
65
import {GroupSubstatus} from 'sentry/types/group';
@@ -58,13 +57,3 @@ export function renderArchiveReason({substatus, statusDetails}: ArchivedBoxProps
5857

5958
return t('This issue has been archived forever.');
6059
}
61-
62-
export function ArchivedBox({substatus, statusDetails}: ArchivedBoxProps) {
63-
return (
64-
<BannerContainer priority="default">
65-
<BannerSummary>
66-
<span>{renderArchiveReason({substatus, statusDetails})}</span>
67-
</BannerSummary>
68-
</BannerContainer>
69-
);
70-
}

static/app/components/errors/groupEventDetailsLoadingError.tsx

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)