-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Issue page: "Authors" drop-down loads ALL authors and their avatars #22586
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
Comments
I think this is a limitation of Fomantic UI Dropdown. What should probably be done is to create these dropdowns with tippy.js and find a way to lazy-load and/or paginate the user dropdowns. |
I don't think paginate is necessary, maybe a search box with limited results i.e. 10 or 20 is better. |
Paginate with a infinite on-scroll loader would be ideal I guess. Problem with limited filter is that if you search common terms, some valuable results may become hidden from view. |
I know it can be implemented. But it's really unnecessary to do that. If we want to at somebody, we will remember his name or copy his name. Searching |
Please keep in mind that we have some short names as well. Searching for “Ton” should have Ton at the top. We’ve had this as an issue with other systems, just want to avoid seeing the same issue here. |
Yeah that is what I was getting at. If you only know "John" first name and there are 50 Johns, you have a problem with a limited display number. |
…ng wait time) (#23890) Right now the authors search dropdown might take a long time to load if amount of authors is huge. Example: (In the video below, there are about 10000 authors, and it takes about 10 seconds to open the author dropdown) https://user-images.githubusercontent.com/17645053/229422229-98aa9656-3439-4f8c-9f4e-83bd8e2a2557.mov Possible improvements can be made, which will take 2 steps (Thanks to @wolfogre for advice): Step 1: Backend: Add a new api, which returns a limit of 30 posters with matched prefix. Frontend: Change the search behavior from frontend search(fomantic search) to backend search(when input is changed, send a request to get authors matching the current search prefix) Step 2: Backend: Optimize the api in step 1 using indexer to support fuzzy search. This PR is implements the first step. The main changes: 1. Added api: `GET /{type:issues|pulls}/posters` , which return a limit of 30 users with matched prefix (prefix sent as query). If `DEFAULT_SHOW_FULL_NAME` in `custom/conf/app.ini` is set to true, will also include fullnames fuzzy search. 2. Added a tooltip saying "Shows a maximum of 30 users" to the author search dropdown 3. Change the search behavior from frontend search to backend search After: https://user-images.githubusercontent.com/17645053/229430960-f88fafd8-fd5d-4f84-9df2-2677539d5d08.mov Fixes: #22586 --------- Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: silverwind <[email protected]>
Description
The "Authors" drop-down on the repo issues page (so on the
/{owner}/{repo}/issues
URL) has HTML elements for all authors, and will load all of their avatars. This does not use a virtual DOM, this does not wait until the drop-down is actually opened, this happens immediately on page load.I'm one of the Blender developers tasked with porting our data from https://developer.blender.org/ to Gitea. My local Gitea database holds 33164 users, 4 organizations, 44 repositories, 93035 issues, 731996 comments, and 749 labels. The list of "issue authors" in the Blender repository has 24919 items.
The culprit is
templates/repo/issue/list.tmpl
, which has this snippet in the "Authors" drop-down code:That
.Posters
list is thus 24919 items long, and it generates an<a>
tag with an<img>
tag for every single one of them.You can see this on any issues page, for example https://try.gitea.io/orgddfafgsjj/rep/pulls
Screenshots
Gitea Version
29b78bc
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
No response
Browser Version
Firefox 109.0
The text was updated successfully, but these errors were encountered: