Skip to content

Commit 998580f

Browse files
authored
ref(nav): extract header actions, use pageframe slots (#113083)
Refactors the Issue Details header actions: - extracts actions into a self-contained component - switch control flow to `if-return` over inline ternaries - introduces a `MaybeTopBarSlot` component that does slot projection behind the `page-frame` flag | Before | After | |--------|--------| | <img width="1280" height="298" alt="issue-detail-before" src="https://github.com/user-attachments/assets/9ff4ffc5-dec1-417f-8aa9-3d7f8291c9aa" /> | <img width="1280" height="346" alt="issue-detail-after" src="https://github.com/user-attachments/assets/1b38f231-810a-4cb3-9da5-cd3af5b1c188" /> | Closes DE-1134
1 parent 1093817 commit 998580f

File tree

5 files changed

+64
-425
lines changed

5 files changed

+64
-425
lines changed

static/app/views/issueDetails/actions/newIssueExperienceButton.spec.tsx

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

static/app/views/issueDetails/actions/newIssueExperienceButton.tsx

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

static/app/views/issueDetails/issueDetailsTour.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {createContext, useContext} from 'react';
1+
import {createContext} from 'react';
22

33
import type {TourContextType} from 'sentry/components/tours/tourContext';
44

@@ -30,11 +30,3 @@ export const ISSUE_DETAILS_TOUR_GUIDE_KEY = 'tour.issue_details';
3030

3131
export const IssueDetailsTourContext =
3232
createContext<TourContextType<IssueDetailsTour> | null>(null);
33-
34-
export function useIssueDetailsTour(): TourContextType<IssueDetailsTour> {
35-
const tourContext = useContext(IssueDetailsTourContext);
36-
if (!tourContext) {
37-
throw new Error('Must be used within a TourContextProvider<IssueDetailsTour>');
38-
}
39-
return tourContext;
40-
}

static/app/views/issueDetails/streamline/header/header.spec.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,30 +101,10 @@ describe('StreamlinedGroupHeader', () => {
101101
screen.getByRole('button', {name: 'Modify issue assignee'})
102102
).toBeInTheDocument();
103103
expect(screen.getByText('Leander')).toBeInTheDocument();
104-
expect(
105-
screen.getByRole('button', {name: 'Manage issue experience'})
106-
).toBeInTheDocument();
107104
expect(screen.getByRole('button', {name: 'Resolve'})).toBeInTheDocument();
108105
expect(screen.getByRole('button', {name: 'Archive'})).toBeInTheDocument();
109106
});
110107

111-
it('displays new experience button if flag is set', async () => {
112-
render(
113-
<StreamlinedGroupHeader
114-
{...defaultProps}
115-
group={group}
116-
project={project}
117-
event={null}
118-
/>,
119-
{
120-
organization,
121-
}
122-
);
123-
expect(
124-
await screen.findByRole('button', {name: 'Manage issue experience'})
125-
).toBeInTheDocument();
126-
});
127-
128108
it('displays share icon if issue has been shared', async () => {
129109
render(
130110
<StreamlinedGroupHeader

0 commit comments

Comments
 (0)