v5.0.0
Released: 2023-04-13
New Operations
- Add
scroll_into_view
operation by @leastbad in #102 - Add
set_meta
operation by @leastbad in #117 - Add
console_table
operation by @leastbad in #125 - Add
redirect_to
operation by @leastbad in #144 - Add
set_title
operation by @leastbad in #234
Added
- Add channel generator by @julianrubisch in #95
- Add
stream_from
by @leastbad in #104 - Add sanity checker by @leastbad in #105
- Add initializer generator by @leastbad in #105
- Add support for chainable selectors between operations by @leastbad in #107
- Add
cable_car
mode toCableReady::Broadcaster
by @leastbad in #108 - Add
broadcast_later
by @julianrubisch in #119 - Add
OperationStore
to register operations on-the-fly by @marcoroth in #124 - Add support for
to_dom_selector
in operation selectors by @jaredcwhite in #135 - Add support for
to_operation_options
by @leastbad in #136 - Register CableReady JSON MIME-Type by @existentialmutt in #140
- Introduce
CableReady::Updatable
andupdates_for
- automatically update the DOM when state changes by @leastbad in #145 - Add
debounce
option forupdates_for
by @julianrubisch in #151 - Add
X-Cable-Ready: update
custom header to HTTP fetch calls by @julianrubisch in #159 - Add
only
option forupdates_for
by @leastbad in #163 - Add
skip_updates
option by @assuntaw in #168 - Add multi-element XPath support by @leastbad in #195
- Add option to disable Turbo Drive/Turbolinks on
redirect_to
navigation by @marcoroth in #197 - Add updatable broadcasts for has_one associations by @julianrubisch in #200
- Add
cable_ready_updates_for_if
helper by @julianrubisch in #202 - Add
OperationBuilder#apply!
should be able to handle an array of operations by @marcoroth in #213 - Add missing element warnings by @leastbad in #217
- Add
config.precompile_assets
option to disable assets compilation by @n-rodriguez in #244 - Add logging for
CableReady::Updatable
by @julianrubisch in #249 - Add CableReady 5.0 installer by @leastbad in #233
- Add default debounce time for
config.updatable_debounce_time
by @julianrubisch in #263 - Add
X-Cable-Ready-Version
header to all HTTP CableReady/CableCar responses by @marcoroth in #260 - Add
debounce
option forCableReady::Updatable
by @julianrubisch in #261 and #264
Fixed
- Setup better finalizer by @hopsoft in #116
- Fix updates for lazy loading by @julianrubisch in #150
- Fix wrong CableReady import by @n-rodriguez in #146
- Error handling for
updates_for
edge cases by @leastbad in #155 - Query all eager loading turbo frames and patch their
innerHTML
by @julianrubisch in #164 - Fix resolve error for webpack 5 by @acarpe in #169
- Fix
text_content
operation for nullish values by @marcoroth in #176 - Fix
0
value problem withnull
checks by @leastbad in #210 - Fix
documentElement
doesn't have a parent by @leastbad in #218 - Fix
cable_ready_updates_for
makes redundant calls by @leastbad in #225 - Fix bug where using an array when calling
add_css_class
orremove_css_class
didn't work by @binarygit in #232 - Fix
inverse_of
resolution of associations used byCableReady::Updatable
by @julianrubisch in #262 - Remove unused
url_helpers
include from installer which causes the installer to fail and exit by @marcoroth in #267
Changed
- Change default value of HTML in operations to empty string instead of undefined by @leastbad in #106
- Use and export
before
,operate
andafter
to build the operations by @leastbad in #110 - The
play_sound
operation is now opt-in and can be triggered via thedata-unlock-audio
attribute on the<body>
tag by @leastbad in #112 - Improve install experience by @leastbad in #128
dom_id
should always be lowercase by @leastbad in #129- Mark JavaScript bundle
sideEffects
free by @KonnorRogers in #138 - Implement simplified JSON payload by @leastbad in #142
- Add support for named operation batches by @leastbad in #142
- Export
StreamFromElement
andUpdatesForElement
custom elements by @julianrubisch in #156 - Export
CableReady
ActionCableconsumer
by @julianrubisch in #158 - Updated gemspec to specific Rails gems by @paul in #175
- Ignore inner updates on a stimulus-reflex action or turbo submit by @julianrubisch in #174
updates_for
should respect url and only params on each element by @leastbad in #186- Updates for Attachments by @andrewerlanger in #190
- Ship prebuilt JavaScript with the
cable_ready
gem by @marcoroth in #191 - Include changeset in class-level updates broadcast by @grncdr in #193
- Register Single-Table-Inheritance descendants for collection updates when using
enable_cable_ready_updates
by @julianrubisch in #204 - Explicit check for leaf parent element presence for
cable_ready_updates_for
by @rickbenavidez in #208 - Make
CableReady::Updatable
aware of Turbo Boost Commands by @julianrubisch in #242 - Change that
CableReadyHelper
doesn't raise when including the module by @marcoroth in #256
Removed
- Remove warning message for already registered custom element by @marcoroth in #126
- Remove
config.on_new_version_available
config option by @marcoroth in #253 - Remove minified dist files by @marcoroth in #271
Renamed
- Rename
CableReadyHelper
toCableReady::ViewHelper
by @marcoroth in #220 and @erlingur in #224 - Rename
enable_updates
toenable_cable_ready_updates
by @marcoroth in #250 - Rename
<updates-for>
to<cable-ready-updates-for>
by @marcoroth in #252 - Rename
<stream-from>
to<cable-ready-stream-from>
by @marcoroth in #252 - Rename
stream_from(...)
tocable_ready_stream_from(...)
by @marcoroth in #252 - Rename
updates_for(...)
tocable_ready_updates_for(...)
by @marcoroth in #252 - Rename
updates_for_if(...)
tocable_ready_updates_for_if(...)
by @marcoroth in #252 - Rename
CableReadyBroadcastJob
toCableReady::BroadcastJob
by @julianrubisch in #259 - Rework CableReady's
ActionController::Renderers
fromoperations
tocable_ready
by @marcoroth in #260 - Rename
cable_ready
MIME type fromapplication/vnd.cable-ready.json
totext/vnd.cable-ready.json
by @marcoroth in #260
Refactoring/Internals
- Restructure client by @leastbad in #109
- Consolidate elements into a base class by @julianrubisch in #157
- Move sanity checking to client-server interaction by @leastbad in #162
- Introduce Rollup for production builds by @KonnorRogers in #165
- Extract
processBlock
method and query getter by @julianrubisch in #170 - Update .npmignore by @Matt-Yorkley in #171
- Setup automated dev-builds by @marcoroth in #177
- Extract Block class and do a pre-fetch pass by @julianrubisch in #188
- Remove automatic changelog generation with
github_changelog_generator
by @marcoroth in #194 - Add
.rake
to gemspecfiles
glob pattern by @marcoroth in #199
Docs
- Make badges link to RubyGems and npm packages by @palkan in #147
- v5.0 docs by @marcoroth in #245
- Fix link to StimulusReflex authentication guide by @mlitwiniuk in #257
New packages
@cable_ready/element
<cable-ready>
element by @jaredcwhite in #139- Extract
<cable-ready>
element to@cable_ready/element
by @marcoroth in #237
@cable_ready/invoke_operations
- Add an
invoke_method
operation by @jaredcwhite in #198 - Extract
invoke_method
operation to@cable_ready/invoke_operations
by @marcoroth in #239
Dependencies
Details
- Bump actionpack from 6.1.1 to 6.1.3 by @dependabot in #114
- Bump activerecord from 6.1.1 to 6.1.3 by @dependabot in #115
- Bump rexml from 3.2.4 to 3.2.5 by @dependabot in #120
- Bump actionpack from 6.1.3.1 to 6.1.3.2 by @dependabot in #121
- Bump handlebars from 4.7.6 to 4.7.7 by @dependabot in #122
- Bump lodash from 4.17.20 to 4.17.21 by @dependabot in #123
- Bump addressable from 2.7.0 to 2.8.0 by @dependabot in #141
- Bump path-parse from 1.0.6 to 1.0.7 by @dependabot in #143
- Bump nokogiri from 1.12.3 to 1.12.5 by @dependabot in #148
- Bump nokogiri from 1.12.5 to 1.13.3 by @dependabot in #189
- Bump nokogiri from 1.13.3 to 1.13.4 by @dependabot in #196
- Bump nokogiri from 1.13.4 to 1.13.6 by @dependabot in #205
- Bump rails-html-sanitizer from 1.4.2 to 1.4.3 by @dependabot in #211
- Bump rack from 2.2.3 to 2.2.4 by @dependabot in #212
- Bump terser from 5.12.1 to 5.14.2 by @dependabot in #215
- Bump nokogiri from 1.13.6 to 1.13.9 by @dependabot in #221
- remove strict dependencies on Active Record, Action Cable and Active Storage by @leastbad in #222
- Bump nokogiri from 1.13.9 to 1.13.10 by @dependabot in #228
- Bump loofah from 2.18.0 to 2.19.1 by @dependabot in #229
- Bump rails-html-sanitizer from 1.4.3 to 1.4.4 by @dependabot in #230
- Bump rack from 2.2.5 to 2.2.6.2 by @dependabot in #240
- Bump globalid from 1.0.0 to 1.0.1 by @dependabot in #241
- Bump ua-parser-js from 1.0.2 to 1.0.33 by @dependabot in #243
- Upgrade all
devDependencies
by @marcoroth in #251 - Bump rack from 2.2.6.2 to 2.2.6.3 by @dependabot in #268
- Bump rack from 2.2.6.3 to 2.2.6.4 by @dependabot in #270
New Contributors
- @jaredcwhite made their first contribution in #135
- @KonnorRogers made their first contribution in #138
- @palkan made their first contribution in #147
- @acarpe made their first contribution in #169
- @Matt-Yorkley made their first contribution in #171
- @paul made their first contribution in #175
- @assuntaw made their first contribution in #168
- @grncdr made their first contribution in #193
- @rickbenavidez made their first contribution in #208
- @erlingur made their first contribution in #224
- @binarygit made their first contribution in #232
- @mlitwiniuk made their first contribution in #257
Commits
Full Changelog: v4.5.0...v5.0.0