-
-
Notifications
You must be signed in to change notification settings - Fork 922
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
Stimulus.js via importmap #4392
Conversation
There are already other PRs touching on the JS assets pipeline. #3470 #4123 it would be good to get in sync and finally decide what to do in here. 🙏 I do like approach in this PR since I do prefer to stick with default Rails app as much as possible, to make it simple for new contributors to contribute, and stimulus is default Rails choice. 💪 Feel free to ping me if you need help with making this PR ✅. |
@simi thank you for linking those. I had forgotten about them but now I remember seeing them. I think #4123 significantly overlaps and may have some of the fixes I needed to get. I spent most of my time adapting the JavaScript to use stimulus and implemented importmap just to get it done. I suggest these steps to move forward with this PR and #4123
@segiddins @hsbt how do you feel about that plan? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4392 +/- ##
==========================================
- Coverage 96.97% 96.69% -0.28%
==========================================
Files 336 336
Lines 7477 7483 +6
==========================================
- Hits 7251 7236 -15
- Misses 226 247 +21 ☔ View full report in Codecov by Sentry. |
I will extract and push one at a time from this branch on top of #4396. |
I've been working with Stimulus a bunch on another project and thought I would draft a quick conversion.
This doesn't take advantage of most of the stimulus features, but it's mostly loading and working (almost certainly things are broken and I will follow up)
I wanted to gauge the receptivity to this conversion. It is somewhat significant, but at least it doesn't add Node as a dependency and it brings us all the way to the most modern rails default. (I also drafted an esbuild branch, but adding yarn and a build step to this very javascript-light app felt like major overkill).