-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
README refresh, disconnect observer, observer options #146
base: master
Are you sure you want to change the base?
Conversation
Nice! It will take some time for me to put this through its paces but definitely an improvement. |
Co-authored-by: Julian Rubisch <[email protected]>
Co-authored-by: Julian Rubisch <[email protected]>
…ism into resource_management
I'm having trouble figuring out why the tests are failing / making the tests pass, and I don't think it's because of my PR that they are failing? futurism/test/cable/channel_test.rb Line 14 in ae00ef6
It seems like you have a few repeated lines here, but the real truth is that I have very little direct experience working with mocked objects. If you have any suggestions, I'm happy to roll up my sleeves but I figured a quick sanity check-in first was the move. |
Just wanted to drop that I haven't forgotten about this. I will take a look at the test failures and come up with more feedback soon. |
What is time? |
Type of PR (feature, enhancement, bug fix, etc.)
Enhancement
Description
This PR disconnects each IntersectionObserver after it triggers the content generation request. Otherwise, the callback will keep firing and generate load on the server. It's also not efficient to have lots of useless observers in scope.
The
futurize
helper now accepts an optionalobserver_options
parameter. It creates an options hash that allows you to set arootMargin
greater than the size of the window.The root module now exports an
initialize(consumer)
method, which eliminates the need to call two methods with longer names.Finally, I updated the README to reflect the new parameter, and wrote a bit more about the syntax. I did remove the many occurances of
extends: :div
because it's the default you'll use 90% of the time.Why should this be added
These changes serve my desire to use Futurism to create the endless scroll demo that shames other endless scroll techniques. 😉
Checklist