Add "Load more" pagination to pipeline list#6200
Add "Load more" pagination to pipeline list#6200savv wants to merge 2 commits intowoodpecker-ci:mainfrom
Conversation
|
Thanks! We are using infinite scroll for pagination though: Would be nice to use this instead of a load more button. |
|
@qwerty287 I gave this a try, but understand this logic a bit less well (which is why I had opted for something simpler). What do you think? |
|
Thanks, yes. The issue is that we load the pipelines centrally in |
@qwerty287 Sorry, I can't find a cleaner way either and I'm not even 100% sure I understand everything. If you have a proposal how data should flow I could give it a crack. I should also say that Woodpecker has been amazing for us so far (so amazing, that I was initially shocked that this feature is missing). With the aggressive caching that we were able to do on our own CI instance, we got builds down from 5+ min to ~20 seconds. Thanks for maintaining! |
|
Ok I looked at the code again, and I actually don't think it's easy to make this working right now in a clean way. What should be done better is esp. how the filtering works. Because if you right now view pipelines for a single branch/PR, it will take the ones the frontend has loaded already and filters it in the frontend. This is really bad style. It should use server-side filtering. For branches, this would be available. For PRs not, and it isn't possibly to implement that cleanly because right now we compare the PRs based on the ref, but every forge uses a different ref for PRs. After #4626 it should be easier to implement the server-side filtering for pull requests. When we have server-side filtering, we can move the pipeline loading from the repo wrapper to the individual list views, and implement the pagination there. This would be the clean solution I'd prefer, but it likely won't be doable in the next time. @woodpecker-ci/maintainers What do you think about this? |
|
I also tried to implement the infinite scroll without success. Having at leadt one working solution for pagination is better than nothing. Would vote to add it if someone as a better approach this can be replaced later. |
|
agree, refactoring and imprufing can be done later on too :) |
|
Then please add a TODO comment so we don't forget about it |
Closes #2976
Demo of what it looks like: