Skip to content

Add clickable button to filter issues and PRs#498

Merged
NorbertLoh merged 9 commits intoCATcher-org:mainfrom
bipplane:issue-pr-clickable-filter
Aug 7, 2025
Merged

Add clickable button to filter issues and PRs#498
NorbertLoh merged 9 commits intoCATcher-org:mainfrom
bipplane:issue-pr-clickable-filter

Conversation

@bipplane
Copy link
Copy Markdown
Contributor

@bipplane bipplane commented Jul 17, 2025

Summary:

Fixes #496
Add clickable header buttons for issues and PRs. This allows for unrestricted account-based filtering of issues/PRs, while also improving usability by reducing the number of clicks and mouse movements needed for filtering.

Type of change:

  • ✨ New Feature/ Enhancement

Changes Made:

  • Added issue type filtering logic instead of leveraging on the existing filter to prevent introducing bugs to the original state filter.
  • Issues or PRs with a count of 0 will not be allowed to be filtered.
  • Added hover state, active state, inactive state CSS styling to the buttons

Screenshots:

Before

To look at only one type of card, you would need to go into status and tick/untick the respective boxes.

WATcher.1.4.1.-.AY2425S2-CS2103T-T16-4_tp.-.Google.Chrome.2025-07-17.23-13-03.-.Trim.mp4

After

Now, you can just click to see whichever type of card on each user.
Note: this will be able to work alongside the original status filter.

WATcher.1.4.1.-.AY2425S2-CS2103T-T16-4_tp.-.Google.Chrome.2025-07-17.23-13-47.-.Trim.mp4

Proposed Commit Message:

Adds the ability for users to filter cards by type (issue or PR) 
directly from the card view headers.

Clicking the issue or PR count toggles a filter to show only 
items of that type. Clicking the active filter again reverts this 
filter back to the original state.

This enhancement provides a more responsive, one-click method 
for filtering, which is especially useful in high-volume scenarios 
such as the huge influx of issues during PE-D or actual PE.

Checklist:

  • I have tested my changes thoroughly.
  • I have created tests for any new code files created in this PR or provided a link to a issue/PR that addresses this.
  • I have added or modified code comments to improve code readability where necessary.
  • I have updated the project's documentation as necessary.

Copy link
Copy Markdown
Contributor

@NorbertLoh NorbertLoh left a comment

Choose a reason for hiding this comment

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

Some things to think about:

  • do we need a clear all or a way to reset such that users do not have to manually deselect all
    • for example when user filters by pr -> filter by status, should it reset?
  • could we make the icon change colour as well to follow the number
  • perhaps we could prevent highlighting of the number to make it cleaner

Copy link
Copy Markdown
Contributor

@NorbertLoh NorbertLoh left a comment

Choose a reason for hiding this comment

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

LGTM! I quite like this feature 👍. Maybe for future implementations, we can clear the filters when the overall filter changes

@NorbertLoh NorbertLoh merged commit f058058 into CATcher-org:main Aug 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to filter issue/PR individually

2 participants