Skip to content

Commit c15ab4f

Browse files
mikellykelsmatejminargetsantry[bot]
authored
feat(release-comparison): Add issue filter tabs to release details (#26826)
* feat(release-comparison): Add issue filter tabs to release details Add issue filter tabs to release details for Release Comparison feature. FIXES WOR-968 * refactor, use different endpoints, fix styles * fix query for count for unhandled * refactor * refactor * fix: double refetch, correct counts, race condition * style(lint): Auto commit lint changes * update tests * refactor, add new color aliases for light/dark mode * refactor, include 0 in button count * null count init * fix ts count type * nullable queryCount Co-authored-by: Matej Minar <[email protected]> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent ccb8bd6 commit c15ab4f

File tree

6 files changed

+276
-51
lines changed

6 files changed

+276
-51
lines changed

static/app/components/buttonBar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,5 @@ const ButtonGrid = styled('div')<{gap: ValidSize; merged: boolean}>`
125125
${p => p.merged && MergedStyles}
126126
`;
127127

128+
export {ButtonGrid, MergedStyles};
128129
export default ButtonBar;

static/app/components/issues/groupList.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as React from 'react';
22
import {browserHistory, withRouter, WithRouterProps} from 'react-router';
33
import * as Sentry from '@sentry/react';
44
import isEqual from 'lodash/isEqual';
5+
import omit from 'lodash/omit';
56
import * as qs from 'query-string';
67

78
import {fetchOrgMembers, indexMembersByProject} from 'app/actionCreators/members';
@@ -85,11 +86,16 @@ class GroupList extends React.Component<Props, State> {
8586
}
8687

8788
componentDidUpdate(prevProps: Props) {
89+
const ignoredQueryParams = ['end'];
90+
8891
if (
8992
prevProps.orgId !== this.props.orgId ||
9093
prevProps.endpointPath !== this.props.endpointPath ||
9194
prevProps.query !== this.props.query ||
92-
!isEqual(prevProps.queryParams, this.props.queryParams)
95+
!isEqual(
96+
omit(prevProps.queryParams, ignoredQueryParams),
97+
omit(this.props.queryParams, ignoredQueryParams)
98+
)
9399
) {
94100
this.fetchData();
95101
}
@@ -106,6 +112,7 @@ class GroupList extends React.Component<Props, State> {
106112
fetchData = () => {
107113
GroupStore.loadInitialData([]);
108114
const {api, orgId} = this.props;
115+
api.clear();
109116

110117
this.setState({loading: true, error: false});
111118

static/app/components/queryCount.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {defined} from 'app/utils';
22

33
type Props = {
4-
count?: number;
4+
count?: number | null;
55
max?: number;
66
hideIfEmpty?: boolean;
77
hideParens?: boolean;

static/app/utils/theme.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ const lightAliases = {
235235
* Search filter "token" border
236236
*/
237237
searchTokenBorder: '#B5DAFF',
238+
239+
/**
240+
* Count on button when active
241+
*/
242+
buttonCountActive: colors.gray100,
243+
244+
/**
245+
* Count on button
246+
*/
247+
buttonCount: colors.gray400,
238248
};
239249

240250
const dataCategory = {
@@ -639,6 +649,8 @@ const darkAliases = {
639649
badgeText: colors.black,
640650
searchTokenBackground: '#1F1A3D',
641651
searchTokenBorder: '#554E80',
652+
buttonCountActive: colors.gray100,
653+
buttonCount: colors.gray400,
642654
};
643655

644656
export const lightTheme = {

0 commit comments

Comments
 (0)