-
Notifications
You must be signed in to change notification settings - Fork 26
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
Live comment updates with ActionCable #2107
Conversation
Thanks. Added to the instrux |
Now deployed on Steps to deploy on production:
|
This is now working in a "production" environment at Be careful if testing... any comments you post as tests will also post to the production database. |
|
Whoops- account for no user logged in
Switch capybara integration to puma (like system)
Account for `user_specific_css` not getting applied in integration tests
Incorporate lookup-name link creation into comment system test
Recent changes:
|
Disable rubocop class length
It needs to be there to register API crud!
Add tests for API comment crud actions
This PR lays the groundwork for live updates for any object via
turbo_stream
.The first place I'm implementing them is Comments. Comments seem like a low-stakes place to test and get it right — it's not that they are so useful, but they're easy to test.
This PR is intended to clear a path for other uses of live updates on the app. The ones I'm more interested in are namings, user notifications, images (for image transformations that are run as a job) and observations, for the home page. These may require a bit of refactoring and renaming some templates.
Incredibly, it took only a few lines of code, but the configurations took quite some time to figure out.
Comments was the easiest to do because the comments panel has the same structure everywhere, and uses conventionally named partials and ivars.
Easiest way to try it out: use test.mushroomobserver.org in two different browser windows/accounts
Trying it out locally: prepare your local server
redis
server software locally.Linux:
sudo apt-get install redis
/ Mac:brew install redis
. You may also have to start the server:redis-server
bundle install
(installspuma
locally)./bin/dev
or otherwise start Solid Queue - creates and updates are run as background jobs.rails server
rails console --sandbox
, thenYou should get a "PONG". If so, you can
exit
Notes: