gitea
gitea copied to clipboard
Add issue filter for Author
This adds a new filter option on the issues and pulls pages to filter by the author/poster/creator of the issue or PR.
Fixes #9408
Our group really wanted the ability to filter issues/PRs by author, so I added the feature for us. I am not sure if this is something that the Gitea authors would also like to add, so I figured I'd open the PR in its current state and see if there's any feedback for it. If it's not desired, I am happy to close it, but since it's useful for us I thought it might be useful for others. This list of filters is getting crowded now, though. 😄
edit: looks like this has been attempted once before, a few years ago: #9432
Dropdown seems cut off in the screenshot, or at least it's missing padding. Can you check if usage is same as other dropdowns and there is no CSS interference?
![]()
Dropdown seems cut off in the screenshot, or at least it's missing padding. Can you check if usage is same as other dropdowns and there is no CSS interference?
I agree it looks cut off. The CSS and HTML for this is identical to the Assignee menu next to it, so I'll show how Assignee looks below.
That ^ screenshot was from my dev environment on Windows where I never quite got the frontend build process fully ironed out. In our production environment where I'm running this feature, compiled correctly on Linux, all of these menus have horizontal scrollbars because of some CSS (.ui.menu .dropdown.item .menu) restricting the min-width to calc(100% - 1px). Heavily redacted screenshot:
If I disable the min-width everything looks better but it causes other issues, especially on mobile:
This felt out of scope for this particular change, so I left it alone.
edit: here's what try.gitea.io looks like https://try.gitea.io/parnic/submodule-replace-test/pulls:

No problem if other dropdowns are affected as well. IIRC, there's some CSS hacks abound there, definitely partly broken currently.
No problem if other dropdowns are affected as well. IIRC, there's some CSS hacks abound there, definitely partly broken currently.
Yeah I'm not going to approve this PR until that's fixed. As it now just overflows always.
So quick look at the CSS and there's a selector from semantic .ui.menu .dropdown.item .menu which adds:
min-width: calc(100% - 1px)
which for some absurd reason is actually causing that the width has a max value. I'm not so sure why there's a min-width there as removing it will actually result in the correct width being applied. Seems trivial to add a min-width: unset or something similar to these dropdowns.
No problem if other dropdowns are affected as well. IIRC, there's some CSS hacks abound there, definitely partly broken currently.
Yeah I'm not going to approve this PR until that's fixed. As it now just overflows always.
So quick look at the CSS and there's a selector from semantic
.ui.menu .dropdown.item .menuwhich adds:min-width: calc(100% - 1px)which for some absurd reason is actually causing that the width has a max value. I'm not so sure why there's a min-width there as removing it will actually result in the correct width being applied. Seems trivial to add a
min-width: unsetor something similar to these dropdowns.
Shouldn't fixing this be a separate PR? The Assignee menu looks the same right now: https://try.gitea.io/parnic/submodule-replace-test/pulls
Shouldn't fixing this be a separate PR?
Fine either way, could also be more backported 🤷🏽
The UX for "user dropdown" is bad in general ... we should return only reasend 10one and add a filter by username ...
Github did switched to something similar ... (This suggestion will affect a lot of ui elements ... so its outside of this pull scope)
Codecov Report
:exclamation: No coverage uploaded for pull request base (
main@be82489). Click here to learn what that means. The diff coverage is76.47%.
@@ Coverage Diff @@
## main #20578 +/- ##
=======================================
Coverage ? 46.81%
=======================================
Files ? 981
Lines ? 136229
Branches ? 0
=======================================
Hits ? 63775
Misses ? 64618
Partials ? 7836
| Impacted Files | Coverage Δ | |
|---|---|---|
| routers/web/repo/issue.go | 36.74% <50.00%> (ø) |
|
| models/repo/user_repo.go | 62.12% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us.