good-first-issue-finder icon indicating copy to clipboard operation
good-first-issue-finder copied to clipboard

Load More persisting when no more issues load

Open amandamartin-dev opened this issue 2 years ago • 6 comments

Description

The load more button will persist even when there are no more issues loading and takes multiple clicks to hide.

This issue is potentially related to #295 as Load More appears to persist and populate more filters but no new issue cards. (video attached below)

Steps to repro Login to finder toggle to github search for javascript click load more - no more issues populate, but checkboxes update click load more again - same as above click load more a 3rd time - hides as expected

Proposed solution: Load more should hide/show based on available issues (unlink from filter updating)

Screenshots

https://user-images.githubusercontent.com/97615019/217587124-837d588f-8006-4df3-bc83-6153b97dc79f.mov

Additional information

No response

amandamartin-dev avatar Feb 08 '23 16:02 amandamartin-dev

I think this behavior is caused by the implementation of the filter: It's just client-side not applying to the search query that's run against Github:

All Issues that are returned are filtered on the Client-Side for "JavaScript", you can keep loading more and more issues, that aren't displayed, because the ones that are loaded don't match the filter.

When applying a filter to the issues, we don't know if there are more issues to load that match that filter, because as I said it's solely on the Client.

A possible workaround might be hiding the "Load more" in case a filter gets applied

Does this make sense? 😅

Cahllagerfeld avatar Feb 08 '23 16:02 Cahllagerfeld

Oh interesting. Yes, it makes sense.

With a filter applied do you think there is ever a situation where "Load More" will be needed? If not, then yes hiding on filter makes sense. But in the case of a large amount of issues, a load more could be needed there but like you said - it wouldn't "know" how many more so would have to figure that part out too.

When I have some time I can take a look at the code too and see if I can think of any other ideas.

amandamartin-dev avatar Feb 08 '23 18:02 amandamartin-dev

Hey amandamartin-dev Please assign this issue to me. I can fix it.

Edit: I want to resolve a number of issues in this repo but for some reason after hitting 'Login with GitHub' button I get an error saying 'CSRF token not matching'. I have followed exact steps in the contributions guide. Can somebody please help me out?

yuviS003 avatar Feb 15 '23 13:02 yuviS003

Based on the CSRF issue I assume something with the Github-App isn't working as expected. Did you configure the Oauth app to point to your dev-environment and the correct endpoint?

Cahllagerfeld avatar Feb 15 '23 15:02 Cahllagerfeld

Great, thanks for the help Cahllagerfeld

yuviS003 avatar Feb 16 '23 00:02 yuviS003

I think this behavior is caused by the implementation of the filter: It's just client-side not applying to the search query that's run against Github:

All Issues that are returned are filtered on the Client-Side for "JavaScript", you can keep loading more and more issues, that aren't displayed, because the ones that are loaded don't match the filter.

When applying a filter to the issues, we don't know if there are more issues to load that match that filter, because as I said it's solely on the Client.

A possible workaround might be hiding the "Load more" in case a filter gets applied

Does this make sense? 😅

Yes, hasNextPage is true, also I tried setting the text in the query. It only works when you enter exact word with same case-sensitivity.

{
  "queryString": "is:open archived:false label:\"EddieHub:good-first-issue\" no:assignee Footer",
  "skip": 10,
  "after": null
}

tbhaxor avatar Aug 19 '23 17:08 tbhaxor