-
Notifications
You must be signed in to change notification settings - Fork 25
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
Filter for 'Merged' #182
Filter for 'Merged' #182
Conversation
'Issue' and status was 'Merged'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes
/** | ||
* Changes status to a valid, default value when an incompatible combination of type and status is encountered. | ||
*/ | ||
checkValidCombination() { | ||
if (this.dropdownFilter.status === 'merged' && this.dropdownFilter.type === 'issue') { | ||
this.dropdownFilter.status = 'all'; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add some logic to change the dropdown filter type to Pull Request if Merged is selected?
I don't think we need this logic? Because it seems impossible to select Merged when Issue is selected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it so that PR will be selected if merged is selected!
I think we will still need to check for the combination 'issue + merged' because users can select 'pr + merged' and then change the type from pr to issue.
Another possibility could be to remove the 'issue' option when 'merged' is selected, but this would mean more coupling and I'm not sure if this would cause the behaviour to deviate too much from the original.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to not hide the Issue option, since that filter is more important than filtering by status. Thanks this implementation is good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary:
Fixes #167
Currently, PRs cannot be filtered by its 'merged' status even though merged PRs are displayed when no filters are set.
However, as issues should only be filtered with status 'all/open/closed', 'all' is used as a default status when user tries to achieve an invalid combination (status: merged + type: all/PR -> status: merged + type: issue).
Option to select 'merged' status is removed when the current selected type is 'issue'.
Type of change:
Changes Made:
Screenshots:
filter.status.screen.recording.mov
Proposed Commit Message:
Checklist: