You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First and foremost, thanks for all the work with render_async, we use it everyday in production!
I was the guy using the toggle feature prior to your release. After updating to 2.1.1, I noticed some strange behavior: when turbolinks is enabled, the _renderAsyncFunction will fire regardless of the toggle configuration.
Basically we render a button as a placeholder and the button contains the toggle selector. With turbolinks off, everything functions as expected: when you click the button, render_async works its magic and loads the partial, replacing the button with some awesome stats for our customers.
When turbolinks config is enabled, the partial is loaded on turbolinks:load regardless of any toggle configuration. It took me a while to actually root this out because I use all of the following:
rails fragment caching
turbolinks (which has its own caching mechanism)
render_async (with caching, toggle, and interval used in different situations)
and I did not want to file an issue prematurely.
We're running my branch in staging now and everything is functioning as expected. We even have a render_async call with caching, toggle, and interval + turbolinks, and it's working well on our initial evaluation.
Once again, thanks!
The text was updated successfully, but these errors were encountered:
Hey there!
First and foremost, thanks for all the work with render_async, we use it everyday in production!
I was the guy using the toggle feature prior to your release. After updating to 2.1.1, I noticed some strange behavior: when turbolinks is enabled, the
_renderAsyncFunction
will fire regardless of the toggle configuration.I believe this little section of code is responsible
I'm sending you a quick PR, let me know if you want me to change anything.
If this isn't the intended behavior, could you please elaborate on your thinking?
Thanks!
edit:
Realized I can probably clarify and describe our use case a bit more.
Assume the following
render_async
call:Basically we render a button as a placeholder and the button contains the toggle selector. With turbolinks off, everything functions as expected: when you click the button, render_async works its magic and loads the partial, replacing the button with some awesome stats for our customers.
When turbolinks config is enabled, the partial is loaded on turbolinks:load regardless of any toggle configuration. It took me a while to actually root this out because I use all of the following:
and I did not want to file an issue prematurely.
We're running my branch in staging now and everything is functioning as expected. We even have a render_async call with caching, toggle, and interval + turbolinks, and it's working well on our initial evaluation.
Once again, thanks!
The text was updated successfully, but these errors were encountered: