Skip to content

Conversation

@mikellykels
Copy link
Contributor

Add issue filter tabs with issue counts to the release details page. Browser URL query will also update based on the selected tab and provide a direct link to that tab.

FIXES WOR-968

Before

Screen Shot 2021-06-23 at 1 15 44 AM

Screen Shot 2021-06-23 at 1 15 52 AM

After

Screen Shot 2021-06-23 at 6 35 05 AM

Add issue filter tabs to release details for Release Comparison feature.

FIXES WOR-968
@mikellykels mikellykels requested a review from a team June 23, 2021 13:43
Copy link
Member

@matejminar matejminar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikellykels

Kapture.2021-06-25.at.11.09.19.mp4

There seems to be a race condition or something when you switch tabs quickly.

Comment on lines 64 to 65
and not features.has(
"organizations:release-comparison", organization, actor=request.user
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this? From release details we always ask for single project.

Comment on lines 242 to 247
issueCountActiveText: colors.gray100,

/**
* Issue count when tab not active
*/
issueCountNotActiveText: colors.gray400,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we name these in a more generic way? Perhaps buttonCount?

onClick={() => this.handleIssuesTypeSelection(value)}
>
{label}
<QueryCount count={issueCount} max={99} hideParens hideIfEmpty />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want number 0 to show up.

Suggested change
<QueryCount count={issueCount} max={99} hideParens hideIfEmpty />
<QueryCount count={issueCount} max={99} hideParens hideIfEmpty={false} />

Comment on lines 240 to 244
all: issueResponse[`${IssuesQuery.ALL}:${version}`],
new: issueResponse[`${IssuesQuery.NEW}:${version}`],
resolved: resolvedResponse.length,
unhandled:
issueResponse[`${IssuesQuery.UNHANDLED} ${IssuesQuery.ALL}:${version}`],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fallback to 0 because this endpoint returns null in case of no issues and we want to see 0 in the buttonbar.

Suggested change
all: issueResponse[`${IssuesQuery.ALL}:${version}`],
new: issueResponse[`${IssuesQuery.NEW}:${version}`],
resolved: resolvedResponse.length,
unhandled:
issueResponse[`${IssuesQuery.UNHANDLED} ${IssuesQuery.ALL}:${version}`],
all: issueResponse[`${IssuesQuery.ALL}:${version}`] || 0,
new: issueResponse[`${IssuesQuery.NEW}:${version}`] || 0,
resolved: resolvedResponse.length,
unhandled:
issueResponse[`${IssuesQuery.UNHANDLED} ${IssuesQuery.ALL}:${version}`] || 0,

Comment on lines 465 to 467
span:last-child {
color: ${p => p.theme.issueCountNotActiveText};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need to do it now, but the preferred way in the future would be to define StyledQueryCount instead of nested selectors.

Copy link
Member

@matejminar matejminar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work 👏👏👏

@mikellykels mikellykels merged commit c15ab4f into master Jul 2, 2021
@mikellykels mikellykels deleted the kelly/issue-filter-tabs branch July 2, 2021 18:29
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants