Release History
v5.0.0
New
- New
cable_car
mode provides a transport-agnostic operation queueing API - New
cable_ready_stream_from
helper allows broadcasting without any Channel setup - New
CableReady::Updatable
module - New
cable_ready:channel
generator creates Ruby and JavaScript Channel classes - New
operations
renderer inApplicationController::Renderers
- New load-time sanity checker module provides early warning of gem/npm version issues
- New operations
Changed
- Operations now execute in the order that they are created, regardless of type
- Simplified JSON wire format is easier to parse and port to other languages 🤩
- Channels and
cable_car
operation queues now support serialization - Channels now support deferred delivery via ActiveJob thanks to the new
broadcast_later
andbroadcast_later_to
methods dom_id
method upgraded to handle ActiveRecord Models and Relations- Objects passed as selectors to an operation can now expose a
to_dom_selector
orto_dom_id
method - Operations now accept selector as an optional first parameter
selector
option now accepts ActiveRecord Models and Relations- Chained operations now remember the selector from the previous operation
- Operations now accept an optional
delay
option inms
, allowing chained time staggering - Operations can now be added to named batches via the
batch
option - Custom operations implement standardized
before
,operate
andafter
Deprecated
CableReady.DOMOperations
was deprecated in favor ofCableReady.operations
Moved
- The
play_sound
operation has been extracted to@cable_ready/audio_operations
- The
invoke_method
operation has been extracted to@cable_ready/invoke_operations
- The
<cable-ready>
element has been extracted to@cable_ready/element
v4.5.0
CableReady v4.5.0 has eight new operations: append
, graft
, prepend
, replace
, replace_state
, play_sound
, go
and scroll_into_view