We've moved discussions to Discord

Hotwire Support

Bijan Rahnema
Hi Chris,
what's your plan on hotwire integration? Are you currently working on it? If so, how far advanced are you at the moment? When can we expect changes in that area?
Cheers Bijan
Guled Ali
I think Chris mentioned something about updating the forms in jumpstart pro with Hotwire

https://youtu.be/-SVv7KRWcAc?t=496

(8:18)
Chris Oliver
Yep! Will be doing it soon, but had to get Devise working properly first!
Chris Oliver
Alrighty, there's a new hotwire branch you can try out. 🎉

There may be bugs, so feel free to report anything you find on GitLab. 👍
Chris Oliver
JumpstartRails.com is now running the Hotwire build. 🔥

Let me know if you run into any issues! I will probably make the official release tomorrow if all goes well.
Joe Minock
Hey  Chris Oliver , Just merged and pulled the jumpstart/master branch. After resolving conflicts and firing up the Rails Server and bin/webpack-dev-server, the following error popped up for me. As I'm still getting acquainted, I've only done some minor work in adding a couple of basic Rails Scaffolds. 

/Users/joedeveloper/web-applications/orgup/orgup/config/webpack/base.js:8
module.exports = merge(webpackConfig, customConfig)
                 ^

TypeError: merge is not a function
    at Object.<anonymous> (/Users/joedeveloper/web-applications/orgup/orgup/config/webpack/base.js:8:18)
    at Module._compile (/Users/joedeveloper/web-applications/orgup/orgup/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (/Users/joedeveloper/web-applications/orgup/orgup/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/Users/joedeveloper/web-applications/orgup/orgup/config/webpack/development.js:3:23)
    at Module._compile (/Users/joedeveloper/web-applications/orgup/orgup/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
Joe Minock
Chris Oliver Disregard. But this could be something that's encountered by those of us less experienced in the current webpack environment. 

Steps to resolve for me:
  1. Remove the node-modules directory (rm -r node_modules from main app directory)
  2. "Yarn Install" 
  3. Run Rails s and bin/webpack-dev-server. Wait until everything compiles - this is taking longer than normal. 20-30 seconds +.
  4. Refresh browser
 Why does Javascript have to be so dumb sometimes.  
Tabish Iqbal
You don't necessarily have to remove the node-modules folder.  I was able to run  

yarn

and it worked 
is the hotwire branch now merged into master? It appears that all merges are done outside of Gitlab, so there is no UI showing an associated merge request.
Chris Oliver
Yes, it's in master. You can see it in the git history. 👍
thank you. I saw that there was an open 'merge request' in the gitlab interface, but was confused by those being 'open'. i'm assuming you merged another way instead of clicking the 'merge' button in gitlab. it would be handy if you could prune the open merge requests if possible. thanks again for a great product
Sean Drumm
I'm having issues around hotwire I believe... For example payment (subscription#new) flow now does not show success message. Chris Oliver has this been tested?

Originally I customized the flow to show a complete page, which doesn't render now with hotwire. I reinstated the redirect (`redirect_to root_path, notice: t(".created")`) but there's no flash, which makes me think hotwire turbo is interfering here like turbolinks wasn't.
Sean Drumm
So I think the flash message is disappearing due to two redirects (payment -> dashboard -> my controller) which I have fixed, nothing about Hotwire was causing that!

But would be interested to know why returning a non-redirect for the form success is disregarded?
Chris Oliver
Basically it's the problem of a form submissions with errors taking you from /posts/new to /posts and the user cannot hit "refresh" in the browser. Now that's all solved by either doing a redirect or a 4XX/5XX error response (these will replace the content of the page). A regular 200 OK is not used anymore. 

Half of the goal with Hotwire is to support iOS and Android, so they are extra careful about making it a seamless experience on mobile.
Notifications
You’re not receiving notifications from this thread.