Skip to content
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

Add pagination to GitHub issue finder #249

Merged
merged 9 commits into from
Aug 6, 2024
Merged

Conversation

RieBi
Copy link
Contributor

@RieBi RieBi commented Aug 5, 2024

Description

Intended to close #242
Added pagination and fixed the whole thing. Here's a quick overview of changes made:

Improved looks by CSS
When no items - show it instead of infinite loading
Show loading when data is actually not loaded
Fix bug when pressing clear on FILTERS would prevent changing tabs
All filters work as AND instead of god knows how
Add pages component with pages that can be clicked to change the page
Optimized css for different sizes
Add option to option to choose number of results per page

More details

Basically, the thing was very bugged, when no issues were satisfying the chosen options, infinite loading was shown. Now it shows an informative message.

Now all the options work as AND - meaning if you have something in search, checkbox "is assigned", and filters for labels, it will show only issues that satisfy all the criteria.

The filter by labels was completely broken, working very weird, and pressing the trash button (clearing filters) was preventing the tabs from being able to change. Now all of it works.

Further possible improvements:

So, now the info for pull requests is only fetched for issues of this repository. I think it should not be changed because the number of issues here is not so big, and because there's a limit of 60 requests per hour, it should be enough. On the other hand, fetching pull requests info for all generic github issues would not be possible because it would very quickly surpass the api limit.

Right now it fetches only 100 issues from github, saves them, and all filters only apply to the 100 issues. But it turns out, the github api's search limit is much more generous - 10 queries per minute. So it probably should be feasible to make a request to github api for each combination of labels, but that would need to be implemented well, so for examle if I in quick succession choose 3 labels, it would not send 3 requests in a second. Even though rate is very generous, it could still surpass 10 queries per minute quite quickly. Maybe adding an "apply" button or something.

Video:

Here's a screencast of how it looks now:

brave_vHBkMoGkyI.mp4

Copy link

vercel bot commented Aug 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web-dev-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 5:56pm

Copy link
Owner

@Bashamega Bashamega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@Bashamega Bashamega merged commit c0aeff9 into Bashamega:main Aug 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Pagination
2 participants