Infinite Scroll

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Infinite Scroll
« Reply #45, on June 8th, 2013, 12:29 AM »
I like infinite scrolling enough to spend some time on it. I'm just not sure right now what use I am with it :/

It's really up to you at this stage whether you want to continue or leave it for now and we'll come back to it. I think ultimately, though, for it to work it'll require spending more bytes in topic view's JS.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Infinite Scroll
« Reply #46, on June 8th, 2013, 01:01 AM »
Quote from Arantor on June 8th, 2013, 12:29 AM
I like infinite scrolling enough to spend some time on it. I'm just not sure right now what use I am with it :/

It's really up to you at this stage whether you want to continue or leave it for now and we'll come back to it. I think ultimately, though, for it to work it'll require spending more bytes in topic view's JS.
New version up...
Should work: everything.
Doesn't work, from what I can see: multi-quote, inline moderation.

Hmm, getting close...! ;)
Right in time for bed, eheh...

:edit: Testing quick edit, in infinite mode. Works :)
Posted: June 8th, 2013, 12:49 AM

Also, quick reply seems to be broken, clicking it closes it.... I guess it's due to it executing its setup twice, eheh. I'll make sure to fix that.

So, basically, we can simply tell people that they should be careful that their code can be run several times, and possibly several times per item they're looking to modify. In conclusion, I'll have to 'fix' bugs as we find them, but from now on, it should be relatively 'easy', as these bugs, I can properly understand what they come from, eheh.

godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361
Re: Infinite Scroll
« Reply #47, on June 8th, 2013, 01:54 AM »
Looking pretty neato :) No other comments at this time.
Thank you,
Boko

xrunner

  • Posts: 192
Re: Infinite Scroll
« Reply #48, on June 8th, 2013, 01:59 AM »Last edited on June 8th, 2013, 02:08 AM
OK, I'm going to plead complete ignorance at this time and beg for mercy.

What is "infinite scrolling" and how do I check it out? :hmm:

 :edit: Nevermind I Googled it, I didn't before because I thought it was a local idea.

But does it work here?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Infinite Scroll
« Reply #49, on June 8th, 2013, 02:09 AM »
Go to the first page of a multi-page topic. Scroll down to the very bottom of the page, then a little bit more (with the mouse wheel), marvel at the next page magic loading. (Unless you're an admin in debug mode when you have to scroll down way way past the content through the debug information :lol:)

xrunner

  • Posts: 192
Re: Infinite Scroll
« Reply #50, on June 8th, 2013, 02:17 AM »
Quote from Arantor on June 8th, 2013, 02:09 AM
Go to the first page of a multi-page topic. Scroll down to the very bottom of the page, then a little bit more (with the mouse wheel), marvel at the next page magic loading.
Oh my gawd! That sent a shiver up my legs!

 :+1:

How many more toys are waiting to be played with around here?

Don't tell me now - I don't want to open all the presents at once.[1] :p

 1. But it's just SMF with a few minor additions right? :rotfl:

MultiformeIngegno

  • Posts: 1,337
Re: Infinite Scroll
« Reply #51, on June 8th, 2013, 03:58 AM »
I have some issues when I try to like posts or post thoughts. The "loading" text loads forever and nothing happens. To solve I have to reload the page, post/like again and now works. Maybe this is related to the JS changes?

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Infinite Scroll
« Reply #52, on June 8th, 2013, 09:59 AM »
Quote from MultiformeIngegno on June 8th, 2013, 03:58 AM
I have some issues when I try to like posts or post thoughts. The "loading" text loads forever and nothing happens. To solve I have to reload the page, post/like again and now works. Maybe this is related to the JS changes?
That's odd...
- Loading stops for me.
- Like button works. (I just did it on xrunner's post above, from an infinitely scrolled page.)
And even if it didn't work, it'd still fall back to the non-Ajax version, which reloads the page entirely.

Meaning, it's certainly a JavaScript error that's blocking your entire process.

You should check out your JavaScript error log (usually in the browser's 'console'), what is your browser?

agent47

  • Now I see the changes you're talking about.
  • Posts: 115
Re: Infinite Scroll
« Reply #53, on June 8th, 2013, 10:17 AM »
I noticed two bugs after the scrolled feature has been used:
1. Quick reply textbox doesn't stay collapsed.
2. Clicking on the 'number of likes' button takes you to the top of the page.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Infinite Scroll
« Reply #54, on June 8th, 2013, 10:59 AM »
Quote from agent47 on June 8th, 2013, 10:17 AM
I noticed two bugs after the scrolled feature has been used:
1. Quick reply textbox doesn't stay collapsed.
2. Clicking on the 'number of likes' button takes you to the top of the page.
(1) is already known, I reported it. Use Quote for now.
(2) I didn't notice. This is most certainly due to the eves counter not being increased; I forgot to upload a file yesterday, I'll see if it works when I upload it.
Posted: June 8th, 2013, 10:36 AM

Okay, both bugs should now be fixed... :)
I've had to had some extra code to the infinite scroller, though, and give up on loading any external files from within the new posts, which means it's bound to create other bugs, it's a bit like whack'a'mole, right..? :lol:
Re: Infinite Scroll
« Reply #55, on June 8th, 2013, 11:14 AM »
Okay, so I think it's all fixed... Quick moderation is still buggy, though. Because apparently, newly inserted inputs don't get added to the overall form, when I submit the request to delete a post loaded from beyond, it just ignores it. Also, it reloads the original page, without the infinity items, which I'm not surprised about, but still not happy with...

Apart from that, it *seems* that the infinite scroll is now working fine, and may even be in committable state... (I can live with the quickmod bug for now.)
YAY!! :)

MultiformeIngegno

  • Posts: 1,337
Re: Infinite Scroll
« Reply #56, on June 8th, 2013, 12:51 PM »
Yeah seems to work just fine! :D

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Infinite Scroll
« Reply #57, on June 8th, 2013, 01:30 PM »
Yeah, it just isn't so solid on the long term...
For instance, since I'm removing external script files, if you have on page 2 a video embed but not on page 1, the embedder will try to call swfobject, but generate an error because it failed to find it, since it wasn't declared to begin with, ah ah...

This is the kind of thing that can happen everywhere, to anyone, with whatever plugin you want... :-/

And, I'm still unable to find some kind of jQuery trick to 'limit' the scope of a DOM traversal to a certain item. Which is really upsetting, because they could do, say, some kind of function like $.proxy() but for $()... For instance, $.traverse(from_here); $('span').hide(); would be the equivalent of doing, $('span', from_here).hide()... Then call $.traverse() again to reset to the actual DOM. Seems like a good idea, and a perfect feature for jQuery... Hmm, I'm wondering, if I can't implement it as plugin, maybe..??
Posted: June 8th, 2013, 01:26 PM

Oh, crap!

Good news: it exists! http://api.jquery.com/context/
Bad news: they just deprecated it in the latest release..!!! >_<

Well... At least, it means it's "doable"...

:edit: Talked too soon... It's a getter, not a setter. Well, still, apparently I could attempt to set $.context manually... I'll look into that.

xrunner

  • Posts: 192
Re: Infinite Scroll
« Reply #58, on June 9th, 2013, 01:40 AM »
Can you make it wrap back around to the first post when reaching the last post? That would be really trick. :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Infinite Scroll
« Reply #59, on June 9th, 2013, 01:41 AM »
I can only imagine how annoying that would be :/