Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions static/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {ModuleName} from 'sentry/views/insights/types';
import {GroupEventDetailsLoading} from 'sentry/views/issueDetails/groupEventDetails/groupEventDetailsLoading';
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
import {OverviewWrapper} from 'sentry/views/issueList/overviewWrapper';
import {IssueTaxonomy} from 'sentry/views/issueList/taxonomies';
import OrganizationContainer from 'sentry/views/organizationContainer';
import OrganizationLayout from 'sentry/views/organizationLayout';
import {OrganizationStatsWrapper} from 'sentry/views/organizationStats/organizationStatsWrapper';
Expand Down Expand Up @@ -2212,16 +2213,16 @@ function buildRoutes() {
<Route path="/issues/" withOrgPath>
<IndexRoute component={errorHandler(OverviewWrapper)} />
<Route
path="errors-outages/"
path={`${IssueTaxonomy.ERRORS_AND_OUTAGES}/`}
component={make(() => import('sentry/views/issueList/pages/errorsOutages'))}
/>
<Route
path="metrics/"
component={make(() => import('sentry/views/issueList/pages/metrics'))}
path={`${IssueTaxonomy.REGRESSIONS}/`}
component={make(() => import('sentry/views/issueList/pages/regressions'))}
/>
<Route
path="best-practices/"
component={make(() => import('sentry/views/issueList/pages/bestPractices'))}
path={`${IssueTaxonomy.WARNINGS}/`}
component={make(() => import('sentry/views/issueList/pages/warnings'))}
/>
<Route
path="views/"
Expand Down
10 changes: 5 additions & 5 deletions static/app/views/issueList/pages/errorsOutages.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import NoProjectMessage from 'sentry/components/noProjectMessage';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import Redirect from 'sentry/components/redirect';
import {t} from 'sentry/locale';
import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
import useOrganization from 'sentry/utils/useOrganization';
import IssueListContainer from 'sentry/views/issueList';
import IssueListOverview from 'sentry/views/issueList/overview';
import {ISSUE_TAXONOMY_CONFIG, IssueTaxonomy} from 'sentry/views/issueList/taxonomies';

type Props = RouteComponentProps;

const TITLE = t('Errors & Outages');
const QUERY = 'is:unresolved issue.category:[error,outage]';
const CONFIG = ISSUE_TAXONOMY_CONFIG[IssueTaxonomy.ERRORS_AND_OUTAGES];
const QUERY = `is:unresolved issue.category:[${CONFIG.categories.join(',')}]`;

export default function ErrorsOutagesPage(props: Props) {
const organization = useOrganization();
Expand All @@ -21,10 +21,10 @@ export default function ErrorsOutagesPage(props: Props) {
}

return (
<IssueListContainer title={TITLE}>
<IssueListContainer title={CONFIG.label}>
<PageFiltersContainer>
<NoProjectMessage organization={organization}>
<IssueListOverview {...props} initialQuery={QUERY} title={TITLE} />
<IssueListOverview {...props} initialQuery={QUERY} title={CONFIG.label} />
</NoProjectMessage>
</PageFiltersContainer>
</IssueListContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import NoProjectMessage from 'sentry/components/noProjectMessage';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import Redirect from 'sentry/components/redirect';
import {t} from 'sentry/locale';
import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
import useOrganization from 'sentry/utils/useOrganization';
import IssueListContainer from 'sentry/views/issueList';
import IssueListOverview from 'sentry/views/issueList/overview';
import {ISSUE_TAXONOMY_CONFIG, IssueTaxonomy} from 'sentry/views/issueList/taxonomies';

type Props = RouteComponentProps;

const TITLE = t('Metrics');
const QUERY = 'is:unresolved issue.category:performance_regression';
const CONFIG = ISSUE_TAXONOMY_CONFIG[IssueTaxonomy.REGRESSIONS];
const QUERY = `is:unresolved issue.category:[${CONFIG.categories.join(',')}]`;

export default function ErrorsOutagesPage(props: Props) {
export default function RegressionsPage(props: Props) {
const organization = useOrganization();
const hasIssueTaxonomy = organization.features.includes('issue-taxonomy');
if (!hasIssueTaxonomy) {
return <Redirect to={`/organizations/${organization.slug}/issues/`} />;
}

return (
<IssueListContainer title={TITLE}>
<IssueListContainer title={CONFIG.label}>
<PageFiltersContainer>
<NoProjectMessage organization={organization}>
<IssueListOverview {...props} initialQuery={QUERY} title={TITLE} />
<IssueListOverview {...props} initialQuery={QUERY} title={CONFIG.label} />
</NoProjectMessage>
</PageFiltersContainer>
</IssueListContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
import NoProjectMessage from 'sentry/components/noProjectMessage';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
import Redirect from 'sentry/components/redirect';
import {t} from 'sentry/locale';
import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
import useOrganization from 'sentry/utils/useOrganization';
import IssueListContainer from 'sentry/views/issueList';
import IssueListOverview from 'sentry/views/issueList/overview';
import {ISSUE_TAXONOMY_CONFIG, IssueTaxonomy} from 'sentry/views/issueList/taxonomies';

type Props = RouteComponentProps;

const TITLE = t('Best Practices');
const QUERY =
'is:unresolved issue.category:[user_experience,responsiveness,performance_best_practice]';
const CONFIG = ISSUE_TAXONOMY_CONFIG[IssueTaxonomy.WARNINGS];
const QUERY = `is:unresolved issue.category:[${CONFIG.categories.join(',')}]`;

export default function ErrorsOutagesPage(props: Props) {
export default function WarningsPage(props: Props) {
const organization = useOrganization();
const hasIssueTaxonomy = organization.features.includes('issue-taxonomy');
if (!hasIssueTaxonomy) {
return <Redirect to={`/organizations/${organization.slug}/issues/`} />;
}

return (
<IssueListContainer title={TITLE}>
<IssueListContainer title={CONFIG.label}>
<PageFiltersContainer>
<NoProjectMessage organization={organization}>
<IssueListOverview {...props} initialQuery={QUERY} title={TITLE} />
<IssueListOverview {...props} initialQuery={QUERY} title={CONFIG.label} />
</NoProjectMessage>
</PageFiltersContainer>
</IssueListContainer>
Expand Down
37 changes: 37 additions & 0 deletions static/app/views/issueList/taxonomies.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {t} from 'sentry/locale';
import {IssueCategory} from 'sentry/types/group';

export enum IssueTaxonomy {
ERRORS_AND_OUTAGES = 'errors-outages',
REGRESSIONS = 'regressions',
WARNINGS = 'warnings',
}

export const ISSUE_TAXONOMY_CONFIG: Record<
IssueTaxonomy,
{
categories: IssueCategory[];
key: string;
label: string;
}
> = {
[IssueTaxonomy.ERRORS_AND_OUTAGES]: {
categories: [IssueCategory.ERROR, IssueCategory.OUTAGE],
label: t('Errors & Outages'),
key: 'errors-outages',
},
[IssueTaxonomy.REGRESSIONS]: {
categories: [IssueCategory.PERFORMANCE_REGRESSION],
label: t('Regressions'),
key: 'regressions',
},
[IssueTaxonomy.WARNINGS]: {
categories: [
IssueCategory.RESPONSIVENESS,
IssueCategory.USER_EXPERIENCE,
IssueCategory.PERFORMANCE_BEST_PRACTICE,
],
label: t('Warnings'),
key: 'warnings',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {FeatureBadge} from 'sentry/components/core/badge/featureBadge';
import {useWorkflowEngineFeatureGate} from 'sentry/components/workflowEngine/useWorkflowEngineFeatureGate';
import {t} from 'sentry/locale';
import useOrganization from 'sentry/utils/useOrganization';
import {ISSUE_TAXONOMY_CONFIG} from 'sentry/views/issueList/taxonomies';
import {PRIMARY_NAV_GROUP_CONFIG} from 'sentry/views/nav/primary/config';
import {SecondaryNav} from 'sentry/views/nav/secondary/secondary';
import {IssueViewNavItems} from 'sentry/views/nav/secondary/sections/issues/issueViews/issueViewNavItems';
Expand Down Expand Up @@ -31,7 +32,7 @@ export function IssuesSecondaryNav() {
to={`${baseUrl}/feedback/`}
analyticsItemName="issues_feedback"
>
{t('Feedback')}
{t('User Feedback')}
</SecondaryNav.Item>
</SecondaryNav.Section>
)}
Expand All @@ -43,32 +44,21 @@ export function IssuesSecondaryNav() {
</SecondaryNav.Item>
</SecondaryNav.Section>
<SecondaryNav.Section>
<SecondaryNav.Item
to={`${baseUrl}/errors-outages/`}
end
analyticsItemName="issues_types_errors_outages"
>
{t('Errors & Outages')}
</SecondaryNav.Item>
<SecondaryNav.Item
to={`${baseUrl}/metrics/`}
end
analyticsItemName="issues_types_metrics"
>
{t('Metrics')}
</SecondaryNav.Item>
<SecondaryNav.Item
to={`${baseUrl}/best-practices/`}
end
analyticsItemName="issues_types_best_practices"
>
{t('Best Practices')}
</SecondaryNav.Item>
{Object.values(ISSUE_TAXONOMY_CONFIG).map(({key, label}) => (
<SecondaryNav.Item
key={key}
to={`${baseUrl}/${key}/`}
end
analyticsItemName={`issues_types_${key}`}
>
{label}
</SecondaryNav.Item>
))}
<SecondaryNav.Item
to={`${baseUrl}/feedback/`}
analyticsItemName="issues_feedback"
>
{t('Feedback')}
{t('User Feedback')}
</SecondaryNav.Item>
</SecondaryNav.Section>
</Fragment>
Expand Down
Loading