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

Task: Implement effective infinite scroll on the new home page #1632

Closed
Tracked by #1617
errorassassin opened this issue Dec 5, 2023 · 25 comments
Closed
Tracked by #1617

Task: Implement effective infinite scroll on the new home page #1632

errorassassin opened this issue Dec 5, 2023 · 25 comments
Labels

Comments

@errorassassin
Copy link
Contributor

Bugheist is adapting a new homepage with all the bugs listed on the homepage. Currently, all the bugs load without even scrolling.
The new home page is currently hosted at https://www.bugheist.com/newhome.

@sidling1
Copy link

Hey @errorassassin ,

The issue is that in views.py , we gather all the bugs in one go from the database, but we want it to happen as the user scrolls forward in the home page ?

Is this what is to be implemented ?

@errorassassin
Copy link
Contributor Author

Hey @errorassassin ,

The issue is that in views.py , we gather all the bugs in one go from the database, but we want it to happen as the user scrolls forward in the home page ?

Is this what is to be implemented ?

Yes, that would improve the user experience a lot.

@sidling1
Copy link

Can i work on this issue ?

@CodeWithBishal
Copy link
Contributor

CodeWithBishal commented Dec 17, 2023

Sure, Feel free to assign the issue to yourself using /assign.

P.S. also make sure the url changes after the pagination, e.g. after scroll when the page 2 is being loaded URL should contain "?page=2" hence it is easier to share a link to someone else with a specific page number.

@sidling1

@CodeWithBishal CodeWithBishal removed their assignment Dec 17, 2023
@nick2432
Copy link

/assign

@aakash2330
Copy link

please correct me if I'm wrong @CodeWithBishal , we are here trying to remove the pagination bar and implement it by scrolling through the page instead ?

@CodeWithBishal
Copy link
Contributor

@aakash2330 yes correct

@aakash2330
Copy link

/assign

@github-actions github-actions bot assigned aakash2330 and unassigned aakash2330 Jan 3, 2024
@Prakhar-Shankar
Copy link
Contributor

/assign

@Prakhar-Shankar
Copy link
Contributor

@errorassassin How can we navigate to newhome page locally ?

@errorassassin
Copy link
Contributor Author

errorassassin commented Jan 10, 2024

just go to [base url]/newhome which would be localhost:8000/newhome by default

@Prakhar-Shankar
Copy link
Contributor

Got it thanks.

@HanilJain
Copy link
Contributor

/assign

@HanilJain
Copy link
Contributor

HanilJain commented Jan 13, 2024

bugs in newhome which have are of different user and is_hidden=true they must be listed in the page or not.
https://github.com/OWASP/BLT/blob/80702b0c02e68aec123bc90685846c74118a75dd/website/views.py#L198C1-L199C1
here the bugs uses & operator which leads to list all but I think there must be an | operator there. am I correct ?

@errorassassin
Copy link
Contributor Author

bugs in newhome which have are of different user and is_hidden=true they must be listed in the page or not. https://github.com/OWASP/BLT/blob/80702b0c02e68aec123bc90685846c74118a75dd/website/views.py#L198C1-L199C1 here the bugs uses & operator which leads to list all but I think there must be an | operator there. am I correct ?

No! Replacing the and with or would hide every Issue that's not mine as the second condition would be true whenever the Issue is not mine (mine means the user seeing the homepage). We want to hide all the Issues that are hidden and not mine.
Also, your way of creating an infinite scroll homepage is not effective as it loads all bugs on the first load of the website, even when the user is not scrolling down. We want to load the bugs as the user scrolls down, one page at a time.

@HanilJain
Copy link
Contributor

thanks, got it.
making the required changes.

@HanilJain
Copy link
Contributor

I fixed the issue in this commit db9d344

@CodeWithBishal
Copy link
Contributor

CodeWithBishal commented Jan 18, 2024

Hi @HanilJain,

If you have created a PR for this commit feel free to mention it with #[PR-ID]

@HanilJain
Copy link
Contributor

fixed #1672

@DonnieBLT DonnieBLT mentioned this issue Jan 27, 2024
15 tasks
@DonnieBLT DonnieBLT changed the title Feature Request: Implement effective infinite scroll on the new home page Task: Implement effective infinite scroll on the new home page Jan 27, 2024
@HanilJain
Copy link
Contributor

@errorassassin Hi can you close this issue
#1672
PR is merged !

@errorassassin
Copy link
Contributor Author

@HanilJain I dont think that was quite as expected, the page still loads all the bugs on the initial reload. Once again, what I had in my mind was something similar to twitter, loading content as the user scrolls down. Loading all the bugs initially has massively increased the loading time too.

@errorassassin
Copy link
Contributor Author

observe the scrollbar on these social media websites like twitter

@HanilJain
Copy link
Contributor

@errorassassin Hi thanks for informing.
it was small change in the code
I have resolved in the #1767

@HanilJain
Copy link
Contributor

@errorassassin I think it seems correct to me now. as new content can be seen loading and also the scroll bar.
are they any more change required?

@DonnieBLT
Copy link
Collaborator

Let's revert this please. I like the pagination better.

@DonnieBLT DonnieBLT closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants