HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Feedback Thread

BleistivtBleistivt Moderator
edited August 2014 in Feedback

If you tried out this plugin and found any problems, please tell me.

There are probably incompatibilities with other plugins or themes (I tested it in default and bootstrap).

Right now this plugin is a rough draft of something I wanted to see in vanilla for some time.

What's on my roadmap:

  • progress bar to track how far you are into a discussion
  • jump to top / bottom buttons that actually work (and not just trigger reloading more content)
  • making the thread title sticky
  • utilizing replaceState to show the proper url + hash in the browser navigation bar
«1

Comments

  • peregrineperegrine MVP
    edited August 2014

    you might check and see if you jump to top and jump to bottom, etc works in embedded vanilla. I haven't tested, but something you might want to test under, and add limitation in description if it doesn't work.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • LincLinc Detroit Admin
    edited August 2014

    Have you looked at the 'MorePager' in core? We used to use infinite scroll pre 2.0.18 and abandoned it, but that alternative pager is still used in a few places.

    Pretty sure you could just do:

    public function DiscussionController_BeforeBuildPager_Handler($Sender, &$Args) {
       $Args['PagerType'] = 'MorePager';
    }
    

    Maybe doesn't have the same bells & whistles as what you're attemtping, but maybe a decent springboard.

  • Thanks.
    Right know it's almost only javascript but for the more sophisticated navigation I will probably need to add the number of pages and postings of a thread as a js definition.

    Btw., is there a reason why DeliveryType=Asset doesn't include the pager?

  • LincLinc Detroit Admin

    I think that will depend on the page. I see for DiscussionController-Index() it's in the view, so it should theoretically render if you call the Content asset. In practice, I don't really ever use that DeliveryType tho, so I'm not sure about its behavior.

  • Yes, my first attempt was to just load the asset or the view, but having the pager made it easier, so I went with loading the full page and extracting the comments. I may change that later though, since I now added most of the information necessary as js definitions.

    I have added most of the things on my list and the reading experience should be much better now.
    Also everything is configurable.

  • @Bleistivt‌ Wow. Amazing plugin. I'm really impressed.

    One little suggestion: hide the page count container on mobile or make it a bit more approriate there. At the moment its too big and taking to much space.

    I did this as temporary fix:

    @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { #InfScrollPageCount, #InfScrollJTT, #InfScrollJTB { display: none; } }

  • Thanks. The plugin should be disabled on mobile devices, though, as it's "mobile unfriendly".
    But I added your change to the CSS file for variable width themes.
    https://github.com/bleistivt/InfiniteScroll/commit/f82415

    I will upload a new version when there are more changes.

  • frdmnfrdmn New
    edited August 2014

    @Bleistivt‌ Great! :)

    I have another two things i want to ask you:

    1) It would be awesome if we also add the actuall comment hash to the URL in the address bar and not only the page.

    Instead of "/discussion/123/test-thread/p46", something like "/discussion/123/test-thread/p46#Comment_23126"

    Edit: Nevermind, just saw it's on the roadmap :)

    2) If you load a page that has alot of previous pages, and then you scroll up to post load that content, sometimes the progress bar seems a bit glitchy and jumps from 85% to perhaps 40% then back to 84%. Any idea for that issue?

  • I just uploaded a new version that includes the hash in the new url :)

    A few scrolling bugs were fixed, but I cannot be sure if that covers the bug you found.
    These bugs are kind of hard to reproduce, as I need to know exactly what the user action on the page was.
    What browser are you using?
    Did you scroll up using the scrollbar/ mousewheel / jump buttons / jump menu?

  • I made a gif to show you the behaviour. In the example I just scroll up via my trackpad:

  • I sent you a pm, as it seems to be a problem specific to your site.

    Since you are using Bootstrap, the loading indicator is missing.
    If someone knows how to get the loading spinner to show in vanilla-booststrap, please tell me, as I'd at least like to make this plugin compatible to +Baseline and bootstrap.

    Just a little notice:
    This plugin relies on the new js definition list in 2.1.1 (which people should be using anyway), so it's not compatible to 2.1.0

  • hgtonighthgtonight ∞ · New Moderator

    Just looking at the code, it should default to on unless the user has specifically turned it off.

    https://github.com/bleistivt/InfiniteScroll/blob/master/class.infinitescroll.plugin.php#L98

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Correct, @rustman, are you using 2.2 by any chance?

    Because there is a bug with the UserMeta defaults in 2.2:
    https://github.com/vanilla/vanilla/issues/2057

    Since it's a framework bug in the alpha version, I rather wait for a fix instead of providing a workaround.

  • You're right, my fault.

    The plugin isn't default activated only for already registered members.

    Sorry..

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    Fantastic plugin! I love it and my users have been asking for it. Currently it's not reporting the number of posts correctly (when you scroll to bottom it says something like "249/243", etc) and it doesn't show up on discussion lists, but my theme is so hacked up it's probably something to do with that. Had to disable for now but I can't wait to have this working on my site.

  • Thanks for trying my plugin!

    The wrong page number is an incompatibility with the DateJumper plugin. I just fixed it, you can try the version of github if you want: https://github.com/bleistivt/InfiniteScroll/archive/master.zip.

    It looks like you are using the modern discussions layout, which should work with the plugin.
    Check if it is not somehow set to disabled for discussion lists on the plugins settings page and look for error messages in the javascript tab of your browser console when visiting the page. If nothing can be found, send me a pm and I will take a look.

    On a side note I really don't like how the page navigator looks anymore.
    If you (or anyone else using the plugin) manages to style it nicer, please show me :D

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    Thanks @Bleistivt ! I knew I should have gone straight to GH - just figured since it was such a fresh release, I'd be OK. facepalm

    I did check the settings page, but I'll get back to you once I've installed the latest version.

    I feel like this is gonna be especially killer when we do the changeover to an embedded forum and have more limited space to work with. And you can bet I'll be monkeying with the style (which I actually kinda like, but that's just the way I am :) and I'll let you know what I come up with.

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭
    edited February 2015

    Well, that fixed the post numbers (except that when a discussion first loads and it scrolls down to "latest", it shows 5/51 instead of 51/51 until I scroll a bit). Still no controls on the discussion list pages though; and no javascript errors. I'm pretty sure the elements are there in the DOM, they're just not showing up for some reason.

    I'll try again and debug the CSS at some point here soon. I would not be at all surprised if it was an issue with my heavily-modified Bittersweet theme.

  • BleistivtBleistivt Moderator
    edited February 2015

    Ah, I didn't understand you correctly there. Basic infinite scrolling works in discussion lists?
    The navigation has not been implemented for discussion lists yet.

    I highly doubt this will work in embedded pages :dizzy:

    The newest version includes an alternative style that makes it kind of look like on Discourse:

Sign In or Register to comment.