Skip to content

Commit

Permalink
feat(issue-priority): Rename issue stream tab inbox -> priority and r…
Browse files Browse the repository at this point in the history
…emove unresolved tab (#66269)
  • Loading branch information
malwilley committed Mar 5, 2024
1 parent 5db8b1f commit 7689af7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
8 changes: 5 additions & 3 deletions static/app/views/issueList/utils.spec.tsx
Expand Up @@ -16,10 +16,12 @@ describe('getTabs', () => {
]);
});

it('should add inbox tab for issue-priority-ui feature', () => {
expect(getTabs(OrganizationFixture({features: ['issue-priority-ui']}))[0]).toEqual([
it('should replace "unresolved" with "prioritized" for issue-priority-ui feature', () => {
const tabs = getTabs(OrganizationFixture({features: ['issue-priority-ui']}));

expect(tabs[0]).toEqual([
'is:unresolved issue.priority:[high, medium]',
expect.objectContaining({name: 'Inbox'}),
expect.objectContaining({name: 'Prioritized'}),
]);
});
});
14 changes: 8 additions & 6 deletions static/app/views/issueList/utils.tsx
Expand Up @@ -5,7 +5,7 @@ import type {Organization} from 'sentry/types';

export enum Query {
FOR_REVIEW = 'is:unresolved is:for_review assigned_or_suggested:[me, my_teams, none]',
INBOX = NEW_DEFAULT_QUERY,
PRIORITIZED = NEW_DEFAULT_QUERY,
UNRESOLVED = 'is:unresolved',
IGNORED = 'is:ignored',
NEW = 'is:new',
Expand Down Expand Up @@ -46,14 +46,16 @@ type OverviewTab = {
* Get a list of currently active tabs
*/
export function getTabs(organization: Organization) {
const hasIssuePriority = organization.features.includes('issue-priority-ui');

const tabs: Array<[string, OverviewTab]> = [
[
Query.INBOX,
Query.PRIORITIZED,
{
name: t('Inbox'),
analyticsName: 'inbox',
name: t('Prioritized'),
analyticsName: 'prioritized',
count: true,
enabled: organization.features.includes('issue-priority-ui'),
enabled: hasIssuePriority,
},
],
[
Expand All @@ -62,7 +64,7 @@ export function getTabs(organization: Organization) {
name: t('Unresolved'),
analyticsName: 'unresolved',
count: true,
enabled: true,
enabled: !hasIssuePriority,
},
],
[
Expand Down

0 comments on commit 7689af7

Please sign in to comment.