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

Fix Endless Scrolling #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix Endless Scrolling #30

wants to merge 2 commits into from

Conversation

SamHasler
Copy link

@SamHasler SamHasler commented Feb 24, 2017

Fixes #23

Tracking testing progress. This is the current state of the patch:

Page Types

NB: Threads "above the fold" bug is probably present on all pages given the right data/screen-size

Page Types no longer used? Remove code:

  • My saved — td.title a[href^="saved"]
    Now called 'Favorite Stories'. See above.
  • Threads (x) — td.title a[href^="/x"]

Misc

  • is dropping the td.title from the selectors more performant/future-proof?

@tommoor
Copy link
Owner

tommoor commented Feb 25, 2017

Wow, thanks! In your testing did it only load one page and then not load further pages?

@SamHasler
Copy link
Author

SamHasler commented Feb 25, 2017 via email

@tommoor
Copy link
Owner

tommoor commented Apr 19, 2017

Maybe we should merge this, it's much better than what's in use already

@SamHasler
Copy link
Author

SamHasler commented Apr 19, 2017 via email

@SamHasler
Copy link
Author

SamHasler commented Apr 20, 2017

I've added my current version. It's much better than the live version, however, there are some issues which I've listed below. They're relatively minor apart from the ":warning:" layout one. I'll see if I can fix that but I probably won't be looking at the rest any time soon.

Untested

  • Favorite Comments - Haven't found a user with >30 comments to require paging.

Known issues:

  • Upvoted Comments (private)
    • ⚠️ 2 column layout issue after page for first more link appended.
    • spinner gifs aren't removed (not after a .morespace row)
  • Threads
    • If More is visible above the fold on first page then endless scrolling doesn't trigger. Resizing browser to make page smaller and then scrolling down will trigger it.
  • Item / Stories
    • Extra story heading inserted at bottom
  • New Comments
    • spinner gifs aren't removed (not after a .morespace row)
  • Favourite Submissions
    • extra "submissions | comments" links inserted
  • Show
    • extra "Please read the rules. You can also browse the newest Show HNs." inserted
  • Jobs
  • extra "These are jobs at startups that were funded by Y Combinator. You can also get a job at a YC startup through Triplebyte." inserted

NB: I also tested the links on the lists page and couldn't find anything other the the issues above.

@seanf
Copy link

seanf commented Feb 27, 2018

@SamHasler
I haven't tried this extension yet, let alone the PR, but here's a user with lots of favorite comments: https://news.ycombinator.com/favorites?id=danso (#4 author on HN according to this old list https://github.com/antontarasenko/smq/blob/master/reports/hackernews-top-authors-by-h-index.md)

I think HN has blocked me for opening too many comments pages at once, so I hope this info is useful :-/

@SamHasler
Copy link
Author

SamHasler commented Feb 27, 2018

@seanf Thanks for the test page. If the block doesn't lift try emailing hn@ycombinator.com

I'm fairly sure HN changed since I made this PR (I think the selectors are simpler now). I've fixed more pages now so I'll have to update it if I find the time.

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.

None yet

3 participants