-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Implement infinite scroll on dashboards to fix account switcher closing #27
Conversation
const wScroll = window.pageYOffset || document.scrollTop; | ||
const btnOffset = $('.ajax-pagination-btn').offset().top; | ||
|
||
// mash the button if it's coming close to being in view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 smash perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Good idea! |
Just a follow-up question, would it be possible to always have the next page loaded when you scroll down? So you wouldn't have to see the loading indicator and wait. |
I suppose you could just remove the scroll distance if (wScroll > (btnOffset - wHeight)) {
btn.click();
} Leave only the |
If you want to do that LMK and I'll make a new PR. Keep in mind that |
@paulmolluzzo Hmm, not that important. Let's leave it like it is for now. |
This is an alternative to PR #25 that also fixes Issue #19, just in a different way.
The
more()
function is gone, and instead there's an infinite scroll on the dashboard. It mashes the button from one page height away, so you shouldn't see the "More" button even with fast scrolling.Also, this improves the
isDashboard
definition, catching ~/dashboard and organization dashboards too.Closes #25
Fixes #19