Skip to content

Commit 69ba9fa

Browse files
authored
ref(views): Delete editableTabTitle component and tests (#91750)
Renames any issue views components that included "Nav" in the signature. This was done to differentiate the old tabs component for issue views from the new navigation component for issue views. Now that the tabs are removed and the navigation is the only surface area for issue views, we can remove this distinction. Full list of changes: * `<IssueViewNavItems/>` => `<IssueViews>` * `type NavIssueView` => `type IssueView` * `<IssueViewNavQueryCount/>` => `<IssueViewQueryCount/>` * `<IssueViewNavItemContent/>` => `<IssueViewItem/>` * Delete `<IssueViewNavEditableTitle/>` (I missed this in a PR to delete old issue views components)
1 parent 7511c29 commit 69ba9fa

8 files changed

+29
-309
lines changed

static/app/views/nav/secondary/sections/issues/issueViews/issueViewNavItemContent.tsx renamed to static/app/views/nav/secondary/sections/issues/issueViews/issueViewItem.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import {useIssueViewUnsavedChanges} from 'sentry/views/issueList/issueViews/useI
1616
import {useNavContext} from 'sentry/views/nav/context';
1717
import ProjectIcon from 'sentry/views/nav/projectIcon';
1818
import {SecondaryNav} from 'sentry/views/nav/secondary/secondary';
19+
import {IssueViewQueryCount} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewQueryCount';
1920
import {
2021
constructViewLink,
21-
type NavIssueView,
22-
} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewNavItems';
23-
import {IssueViewNavQueryCount} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewNavQueryCount';
22+
type IssueView,
23+
} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViews';
2424

25-
interface IssueViewNavItemContentProps {
25+
interface IssueViewItemProps {
2626
/**
2727
* Whether the item is active.
2828
*/
@@ -47,7 +47,7 @@ interface IssueViewNavItemContentProps {
4747
/**
4848
* The issue view to display
4949
*/
50-
view: NavIssueView;
50+
view: IssueView;
5151
/**
5252
* Ref to the body of the section that contains the reorderable items.
5353
* This is used as the portal container for the ellipsis menu, and as
@@ -56,14 +56,14 @@ interface IssueViewNavItemContentProps {
5656
sectionRef?: React.RefObject<HTMLDivElement | null>;
5757
}
5858

59-
export function IssueViewNavItemContent({
59+
export function IssueViewItem({
6060
view,
6161
sectionRef,
6262
isActive,
6363
onReorderComplete,
6464
isDragging,
6565
setIsDragging,
66-
}: IssueViewNavItemContentProps) {
66+
}: IssueViewItemProps) {
6767
const organization = useOrganization();
6868
const {projects} = useProjects();
6969

@@ -135,7 +135,7 @@ export function IssueViewNavItemContent({
135135
}
136136
trailingItems={
137137
<TrailingItemsWrapper>
138-
<IssueViewNavQueryCount view={view} isActive={isActive} />
138+
<IssueViewQueryCount view={view} isActive={isActive} />
139139
</TrailingItemsWrapper>
140140
}
141141
onPointerDown={e => {

static/app/views/nav/secondary/sections/issues/issueViews/issueViewNavEditableTitle.spec.tsx

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

static/app/views/nav/secondary/sections/issues/issueViews/issueViewNavEditableTitle.tsx

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

static/app/views/nav/secondary/sections/issues/issueViews/issueViewNavQueryCount.spec.tsx renamed to static/app/views/nav/secondary/sections/issues/issueViews/issueViewQueryCount.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {GroupSearchViewFixture} from 'sentry-fixture/groupSearchView';
33
import {render, screen} from 'sentry-test/reactTestingLibrary';
44

55
import {IssueSortOptions} from 'sentry/views/issueList/utils';
6-
import {IssueViewNavQueryCount} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewNavQueryCount';
6+
import {IssueViewQueryCount} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewQueryCount';
77

8-
describe('IssueViewNavQueryCount', () => {
8+
describe('IssueViewQueryCount', () => {
99
const mockView = {
1010
...GroupSearchViewFixture({
1111
id: '1',
@@ -38,7 +38,7 @@ describe('IssueViewNavQueryCount', () => {
3838
},
3939
});
4040

41-
render(<IssueViewNavQueryCount view={mockView} isActive />);
41+
render(<IssueViewQueryCount view={mockView} isActive />);
4242

4343
expect(await screen.findByText('71')).toBeInTheDocument();
4444
});
@@ -52,7 +52,7 @@ describe('IssueViewNavQueryCount', () => {
5252
},
5353
});
5454

55-
render(<IssueViewNavQueryCount view={mockView} isActive />);
55+
render(<IssueViewQueryCount view={mockView} isActive />);
5656

5757
expect(await screen.findByText('99+')).toBeInTheDocument();
5858
});

static/app/views/nav/secondary/sections/issues/issueViews/issueViewNavQueryCount.tsx renamed to static/app/views/nav/secondary/sections/issues/issueViews/issueViewQueryCount.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {useLocation} from 'sentry/utils/useLocation';
99
import useOrganization from 'sentry/utils/useOrganization';
1010
import {createIssueViewFromUrl} from 'sentry/views/issueList/issueViews/createIssueViewFromUrl';
1111
import {useFetchIssueCounts} from 'sentry/views/issueList/queries/useFetchIssueCounts';
12-
import type {NavIssueView} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewNavItems';
12+
import type {IssueView} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViews';
1313

1414
const TAB_MAX_COUNT = 99;
1515

@@ -30,12 +30,12 @@ const constructCountTimeFrame = (
3030
};
3131
};
3232

33-
interface IssueViewNavQueryCountProps {
33+
interface IssueViewQueryCountProps {
3434
isActive: boolean;
35-
view: NavIssueView;
35+
view: IssueView;
3636
}
3737

38-
export function IssueViewNavQueryCount({view, isActive}: IssueViewNavQueryCountProps) {
38+
export function IssueViewQueryCount({view, isActive}: IssueViewQueryCountProps) {
3939
const organization = useOrganization();
4040
const theme = useTheme();
4141
const location = useLocation();

0 commit comments

Comments
 (0)