Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Load More persisting when no more issues load #296

Open
amandamartin-dev opened this issue Feb 8, 2023 · 6 comments
Open

Load More persisting when no more issues load #296

amandamartin-dev opened this issue Feb 8, 2023 · 6 comments
Assignees

Comments

@amandamartin-dev
Copy link

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

loadmore.mov

Additional information

No response

@Cahllagerfeld
Copy link
Member

Cahllagerfeld commented Feb 8, 2023

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? 😅

@amandamartin-dev
Copy link
Author

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.

@yuviS003
Copy link

yuviS003 commented Feb 15, 2023

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?

@Cahllagerfeld
Copy link
Member

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?

@yuviS003
Copy link

Great, thanks for the help Cahllagerfeld

@tbhaxor
Copy link
Member

tbhaxor commented Aug 19, 2023

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
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants