Skip to content

Commit

Permalink
fix(insights): team key transaction button says no option found (#79208)
Browse files Browse the repository at this point in the history
Fixes an issue within domain views where clicking the star icon next to
a transaction showed "no options found"
Before
<img width="125" alt="image"
src="https://github.com/user-attachments/assets/eee0de89-5519-41d1-8a3c-543ab783964a">


After
<img width="264" alt="image"
src="https://github.com/user-attachments/assets/fdb095ee-d58e-4f03-9e1f-d98c508af0c9">
  • Loading branch information
DominikB2014 authored Oct 17, 2024
1 parent 7bebda0 commit 5c77515
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 29 deletions.
27 changes: 20 additions & 7 deletions static/app/views/insights/pages/ai/aiOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
import TransactionNameSearchBar from 'sentry/components/performance/searchBar';
import * as TeamKeyTransactionManager from 'sentry/components/performance/teamKeyTransactionsManager';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {trackAnalytics} from 'sentry/utils/analytics';
import {
Expand All @@ -23,6 +24,7 @@ import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';
import useOrganization from 'sentry/utils/useOrganization';
import useProjects from 'sentry/utils/useProjects';
import {useUserTeams} from 'sentry/utils/useUserTeams';
import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout';
import {ToolRibbon} from 'sentry/views/insights/common/components/ribbon';
import {useOnboardingProject} from 'sentry/views/insights/common/queries/useOnboardingProject';
Expand Down Expand Up @@ -58,6 +60,7 @@ function AiOverviewPage() {
const {projects} = useProjects();
const onboardingProject = useOnboardingProject();
const navigate = useNavigate();
const {teams} = useUserTeams();
const mepSetting = useMEPSettingContext();

const withStaticFilters = canUseMetricsData(organization);
Expand Down Expand Up @@ -164,13 +167,23 @@ function AiOverviewPage() {
<PerformanceDisplayProvider
value={{performanceType: ProjectPerformanceType.ANY}}
>
<TripleChartRow allowedCharts={tripleChartRowCharts} {...sharedProps} />
<Table
projects={projects}
columnTitles={AI_COLUMN_TITLES}
setError={setPageError}
{...sharedProps}
/>
<TeamKeyTransactionManager.Provider
organization={organization}
teams={teams}
selectedTeams={['myteams']}
selectedProjects={eventView.project.map(String)}
>
<TripleChartRow
allowedCharts={tripleChartRowCharts}
{...sharedProps}
/>
<Table
projects={projects}
columnTitles={AI_COLUMN_TITLES}
setError={setPageError}
{...sharedProps}
/>
</TeamKeyTransactionManager.Provider>
</PerformanceDisplayProvider>
)}

Expand Down
32 changes: 24 additions & 8 deletions static/app/views/insights/pages/backend/backendOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
import TransactionNameSearchBar from 'sentry/components/performance/searchBar';
import * as TeamKeyTransactionManager from 'sentry/components/performance/teamKeyTransactionsManager';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {trackAnalytics} from 'sentry/utils/analytics';
import {
Expand All @@ -23,6 +24,7 @@ import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';
import useOrganization from 'sentry/utils/useOrganization';
import useProjects from 'sentry/utils/useProjects';
import {useUserTeams} from 'sentry/utils/useUserTeams';
import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout';
import {ToolRibbon} from 'sentry/views/insights/common/components/ribbon';
import {useOnboardingProject} from 'sentry/views/insights/common/queries/useOnboardingProject';
Expand Down Expand Up @@ -64,6 +66,7 @@ function BackendOverviewPage() {
const {projects} = useProjects();
const onboardingProject = useOnboardingProject();
const navigate = useNavigate();
const {teams} = useUserTeams();
const mepSetting = useMEPSettingContext();

const withStaticFilters = canUseMetricsData(organization);
Expand Down Expand Up @@ -186,14 +189,27 @@ function BackendOverviewPage() {
<PerformanceDisplayProvider
value={{performanceType: ProjectPerformanceType.BACKEND}}
>
<DoubleChartRow allowedCharts={doubleChartRowCharts} {...sharedProps} />
<TripleChartRow allowedCharts={tripleChartRowCharts} {...sharedProps} />
<Table
projects={projects}
columnTitles={BACKEND_COLUMN_TITLES}
setError={setPageError}
{...sharedProps}
/>
<TeamKeyTransactionManager.Provider
organization={organization}
teams={teams}
selectedTeams={['myteams']}
selectedProjects={eventView.project.map(String)}
>
<DoubleChartRow
allowedCharts={doubleChartRowCharts}
{...sharedProps}
/>
<TripleChartRow
allowedCharts={tripleChartRowCharts}
{...sharedProps}
/>
<Table
projects={projects}
columnTitles={BACKEND_COLUMN_TITLES}
setError={setPageError}
{...sharedProps}
/>
</TeamKeyTransactionManager.Provider>
</PerformanceDisplayProvider>
)}

Expand Down
22 changes: 16 additions & 6 deletions static/app/views/insights/pages/frontend/frontendOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
import TransactionNameSearchBar from 'sentry/components/performance/searchBar';
import * as TeamKeyTransactionManager from 'sentry/components/performance/teamKeyTransactionsManager';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {trackAnalytics} from 'sentry/utils/analytics';
import {
Expand All @@ -23,6 +24,7 @@ import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';
import useOrganization from 'sentry/utils/useOrganization';
import useProjects from 'sentry/utils/useProjects';
import {useUserTeams} from 'sentry/utils/useUserTeams';
import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout';
import {ToolRibbon} from 'sentry/views/insights/common/components/ribbon';
import {ViewTrendsButton} from 'sentry/views/insights/common/components/viewTrendsButton';
Expand Down Expand Up @@ -63,6 +65,7 @@ function FrontendOverviewPage() {
const {projects} = useProjects();
const onboardingProject = useOnboardingProject();
const navigate = useNavigate();
const {teams} = useUserTeams();
const mepSetting = useMEPSettingContext();

const withStaticFilters = canUseMetricsData(organization);
Expand Down Expand Up @@ -192,12 +195,19 @@ function FrontendOverviewPage() {
eventView={doubleChartRowEventView}
/>
<TripleChartRow allowedCharts={tripleChartRowCharts} {...sharedProps} />
<Table
projects={projects}
columnTitles={FRONTEND_COLUMN_TITLES}
setError={setPageError}
{...sharedProps}
/>
<TeamKeyTransactionManager.Provider
organization={organization}
teams={teams}
selectedTeams={['myteams']}
selectedProjects={eventView.project.map(String)}
>
<Table
projects={projects}
columnTitles={FRONTEND_COLUMN_TITLES}
setError={setPageError}
{...sharedProps}
/>
</TeamKeyTransactionManager.Provider>
</PerformanceDisplayProvider>
)}

Expand Down
32 changes: 24 additions & 8 deletions static/app/views/insights/pages/mobile/mobileOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
import TransactionNameSearchBar from 'sentry/components/performance/searchBar';
import * as TeamKeyTransactionManager from 'sentry/components/performance/teamKeyTransactionsManager';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {trackAnalytics} from 'sentry/utils/analytics';
import {
Expand All @@ -22,6 +23,7 @@ import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';
import useOrganization from 'sentry/utils/useOrganization';
import useProjects from 'sentry/utils/useProjects';
import {useUserTeams} from 'sentry/utils/useUserTeams';
import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout';
import {ToolRibbon} from 'sentry/views/insights/common/components/ribbon';
import {useOnboardingProject} from 'sentry/views/insights/common/queries/useOnboardingProject';
Expand Down Expand Up @@ -77,6 +79,7 @@ function MobileOverviewPage() {
const {projects} = useProjects();
const onboardingProject = useOnboardingProject();
const navigate = useNavigate();
const {teams} = useUserTeams();
const mepSetting = useMEPSettingContext();

const withStaticFilters = canUseMetricsData(organization);
Expand Down Expand Up @@ -206,14 +209,27 @@ function MobileOverviewPage() {
<PerformanceDisplayProvider
value={{performanceType: ProjectPerformanceType.MOBILE}}
>
<DoubleChartRow allowedCharts={doubleChartRowCharts} {...sharedProps} />
<TripleChartRow allowedCharts={tripleChartRowCharts} {...sharedProps} />
<Table
projects={projects}
columnTitles={columnTitles}
setError={setPageError}
{...sharedProps}
/>
<TeamKeyTransactionManager.Provider
organization={organization}
teams={teams}
selectedTeams={['myteams']}
selectedProjects={eventView.project.map(String)}
>
<DoubleChartRow
allowedCharts={doubleChartRowCharts}
{...sharedProps}
/>
<TripleChartRow
allowedCharts={tripleChartRowCharts}
{...sharedProps}
/>
<Table
projects={projects}
columnTitles={columnTitles}
setError={setPageError}
{...sharedProps}
/>
</TeamKeyTransactionManager.Provider>
</PerformanceDisplayProvider>
)}

Expand Down

0 comments on commit 5c77515

Please sign in to comment.