From 31ed81bac01917c8afc6432312be67b6d088db0a Mon Sep 17 00:00:00 2001 From: MichaelSun48 Date: Wed, 28 Aug 2024 09:26:12 -0700 Subject: [PATCH 1/4] Remove unncessary dependencies from useEffect --- static/app/views/issueList/customViewsHeader.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/static/app/views/issueList/customViewsHeader.tsx b/static/app/views/issueList/customViewsHeader.tsx index 6fad7c70c02b00..887f3ab88be820 100644 --- a/static/app/views/issueList/customViewsHeader.tsx +++ b/static/app/views/issueList/customViewsHeader.tsx @@ -241,16 +241,8 @@ function CustomViewsIssueListHeaderTabsContent({ tabListState?.setSelectedKey('temporary-tab'); return; } - }, [ - tabListState, - draggableTabs, - navigate, - organization.slug, - query, - queryParams, - sort, - viewId, - ]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [tabListState, navigate, organization.slug, query, sort, viewId]); // Update local tabs when new views are received from mutation request useEffect(() => { From 0fc8cbab423dc947352e2d2a600184b0fe502409 Mon Sep 17 00:00:00 2001 From: MichaelSun48 Date: Wed, 28 Aug 2024 09:51:26 -0700 Subject: [PATCH 2/4] Remove tabliststate from dependency array --- static/app/views/issueList/customViewsHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/views/issueList/customViewsHeader.tsx b/static/app/views/issueList/customViewsHeader.tsx index 887f3ab88be820..368a830037ddd7 100644 --- a/static/app/views/issueList/customViewsHeader.tsx +++ b/static/app/views/issueList/customViewsHeader.tsx @@ -242,7 +242,7 @@ function CustomViewsIssueListHeaderTabsContent({ return; } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [tabListState, navigate, organization.slug, query, sort, viewId]); + }, [navigate, organization.slug, query, sort, viewId]); // Update local tabs when new views are received from mutation request useEffect(() => { From 6908eee74116845fc7f0890cb1210a9b99a73edf Mon Sep 17 00:00:00 2001 From: MichaelSun48 Date: Wed, 28 Aug 2024 11:32:10 -0700 Subject: [PATCH 3/4] Add error boundary --- static/app/views/issueList/overview.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/static/app/views/issueList/overview.tsx b/static/app/views/issueList/overview.tsx index e2de38c8b6b522..5a297d66b66818 100644 --- a/static/app/views/issueList/overview.tsx +++ b/static/app/views/issueList/overview.tsx @@ -15,6 +15,7 @@ import {addMessage} from 'sentry/actionCreators/indicator'; import {fetchOrgMembers, indexMembersByProject} from 'sentry/actionCreators/members'; import {fetchTagValues, loadOrganizationTags} from 'sentry/actionCreators/tags'; import type {Client} from 'sentry/api'; +import ErrorBoundary from 'sentry/components/errorBoundary'; import HookOrDefault from 'sentry/components/hookOrDefault'; import * as Layout from 'sentry/components/layouts/thirds'; import LoadingIndicator from 'sentry/components/loadingIndicator'; @@ -1226,12 +1227,14 @@ class IssueListOverview extends Component { return ( {organization.features.includes('issue-stream-custom-views') ? ( - + + + ) : ( Date: Wed, 28 Aug 2024 11:37:49 -0700 Subject: [PATCH 4/4] Update comment --- static/app/views/issueList/customViewsHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/views/issueList/customViewsHeader.tsx b/static/app/views/issueList/customViewsHeader.tsx index 368a830037ddd7..f606ccaa31bef9 100644 --- a/static/app/views/issueList/customViewsHeader.tsx +++ b/static/app/views/issueList/customViewsHeader.tsx @@ -163,7 +163,7 @@ function CustomViewsIssueListHeaderTabsContent({ [organization.slug, updateViews] ); - // This insane useEffect ensures that the correct tab is selected when the page loads and url updates + // This insane useEffect ensures that the correct tab is selected when the url updates useEffect(() => { // If no query, sort, or viewId is present, set the first tab as the selected tab, update query accordingly if (!query && !sort && !viewId) {