Repository navigation
Allow filtering patches by committer - #124
jonasrochasilva-prog wants to merge 2 commits into
Conversation
On the page of a commitfest, the Committer column header can now be clicked to sort the patch list by committer, just like the other sortable columns. Combined with the Committed status filter, this makes it easy to see who committed what in a commitfest. Committers are sorted by last name, then first name and username, which is the same order that the Committer model uses. Patches without a committer are always shown last, and the patch ID is used as a tiebreaker. Like with the other sort orders, open patches are still shown before closed ones. The dashboard is left unchanged, since this was only requested for the commitfest page. Fixes postgres#112
This adds a Committer filter to the page of a commitfest. It lists the committers of the patches in that commitfest, including committers that are no longer active. Since that list is short, it's a plain dropdown instead of a searchable one. It's sorted by first name, like the other user dropdowns, because that's how the names are shown. The filter uses the current committer of a patch. Values that are not a number, or that are not one of the committers in the dropdown, are ignored. The dashboard and global search use the same filter form, but they don't get this filter: they don't show it and ignore the committer parameter.
| tag = forms.MultipleChoiceField(required=False, label="Tag (type to search)") | ||
| author = forms.ChoiceField(required=False, label="Author (type to search)") | ||
| reviewer = forms.ChoiceField(required=False, label="Reviewer (type to search)") | ||
| committer = forms.ChoiceField(required=False, label="Committer") |
There was a problem hiding this comment.
The filter bar is already pretty wide. I think we might need a redesign before we can add more filter options.
There was a problem hiding this comment.
Thanks for the feedback, JelteF.
I took another look at the current filter form. Since "filter_form.html" renders all fields in a single table row, I think we might be able to address the width issue with a smaller, responsive layout change.
My initial preference would be to let the existing filters wrap into multiple rows, keeping the current Search/filter behavior and avoiding another collapsible section.
Would that be an acceptable direction, or do you think the filtering UI needs a broader redesign first?
I can prepare a small prototype before making changes to this PR.
This builds on #123. Until that is merged, this PR also shows its
commit. Only the last commit, "Allow filtering patches by committer",
is new here.
This adds a Committer filter to the page of a commitfest. It lists the
committers of the patches in that commitfest, including committers that
are no longer active. Since that list is short, it's a plain dropdown
instead of a searchable one. It's sorted by first name, like the other
user dropdowns, because that's how the names are shown.
The filter uses the current committer of a patch. Values that are not a
number, or that are not one of the committers in the dropdown, are
ignored.
The dashboard and global search use the same filter form, but they
don't get this filter: they don't show it and ignore the committer
parameter.
Notes
the Committed status filter and the sorting from Allow sorting patches by committer #123, it lets you
list everything one committer committed in a commitfest. If you'd
rather not have it, Allow sorting patches by committer #123 works on its own.
include_committer_filterflagon
CommitFestFilterFormandpatchlist(), which defaults toFalse. I didn't use the presence of a commitfest as the switch,because the dashboard passes one too.
Patch.committer, so it doesn't know about earliercommitters of a patch.
🤖 Generated with Claude Code