Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(releases): Use query parameter when switching filters #52937

Merged
merged 3 commits into from
Jul 17, 2023

Conversation

scttcper
Copy link
Member

@scttcper scttcper commented Jul 15, 2023

There was a large ternary with a mistake setting the current filter to the wrong option. We can use the query parameter instead of state altogether.

fixes #52880

There was a large ternary with a mistake setting the current filter to state. We can use the query parameter instead of state.
@scttcper scttcper requested a review from a team as a code owner July 15, 2023 00:15
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 15, 2023
Comment on lines -90 to -91
: query.includes(IssuesType.REGRESSED)
? IssuesType.UNHANDLED
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the mistake, but the real mistake was this massive ternary

@@ -56,7 +56,6 @@ type Props = {
location: Location;
organization: Organization;
releaseBounds: ReleaseBounds;
selection: PageFilters;
Copy link
Member Author

Choose a reason for hiding this comment

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

unused

@scttcper scttcper requested a review from malwilley July 17, 2023 17:56
Copy link
Member

@malwilley malwilley left a comment

Choose a reason for hiding this comment

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

Logic is much better now 💯

RESOLVED = 'is:resolved',
ALL = 'release',
}
const IssuesQuery: Record<IssuesType, string> = {
Copy link
Member

Choose a reason for hiding this comment

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

nit: should this still be pascal case now that it's not an enum?

@scttcper scttcper enabled auto-merge (squash) July 17, 2023 18:36
@scttcper scttcper merged commit 25c3cdd into master Jul 17, 2023
@scttcper scttcper deleted the scttcper/switch-tabs-releases branch July 17, 2023 18:54
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
2 participants