Closed naveed-ahmad closed 3 years ago
Hey @naveed-ahmad, thanks for the initiative on this, I really appreciate it.
This seems like a too big of a change right now to be released as far as I am concerned. Why don't we start off things slow and just introduce one feature at a time. Maybe non .js.erb
option can be optional with the next version, and we could inform the users that some features will be deprecated when (and if) we switch away from the Ruby in JS files. What do you say?
I don't @nikolalsvk, user facing api is same. Nothing is changed there, it just the backend is moved from JS + Ruby to pure JS.
But if we want to release a patch version with lazy loading using current JS + Ruby, then release pure JS as major release. Maybe your suggestion made sense, but I feel we're increasing our development time with these redundant releases.
Maybe non .js.erb option can be optional with the next version
How do you want to made erb version optional? pass another argument in render_async
call or add another method like render_async_js
?
(and if) we switch away from the Ruby in JS files
Honestly that's my biggest concern :) IF we want to switch to JS version, i'll love to contribute. Can you please discuss with core team?
It's too much of a change internally, even though the use of render_async
is not changing. This can cause problems for current users and thus increase the further development time in fixing potential bugs. So I'm more for a slow approach that merging big changes in one PR.
Before we proceed with the conversion, I'd like to know what are exact benefits and fallbacks of switching to JavaScript without .js.erb
, that would give everyone a clearer picture of why are we doing this. I understood that one argument for the conversion is that you can call render_async
from your JS code if you want, what are other aspects? Can you specify this in details @naveed-ahmad?
If we are going to switch to JS, we need to do it properly:
I will close this since there are no ongoing efforts currently.
@nikolalsvk this is still WIP but basic functionality is ready for testing.