Releases: marcoroth/turbo_power-rails
v0.6.2
Changed
- Introduce
RenderHelper
to reuseStreamHelpers
in model broadcasts by @marcoroth in #43
Commits
Full Changelog: v0.6.1...v0.6.2
v0.6.1
Changed
- Update
scroll_into_view
stream helper to accept options in #40 by @marcoroth
Commits
Full Changelog: v0.6.0...v0.6.1
v0.6.0
v0.5.0
Added
- Introduce
TurboPower::Broadcasts
andTurboPower::Broadcastable
modules by @marcoroth in #30
This release introduces the TurboPower::Broadcasts
and TurboPower::Broadcastable
modules which can be used to broadcast any TurboPower custom action in jobs, controllers, models or wherever you can run Ruby code within your app.
The TurboPower::Broadcasts
module provides the broadcast actions in synchronous and asynchronous form for the Turbo::StreamsChannel
, meaning an action like console_log
can be used like:
Turbo::StreamsChannel.broadcast_console_log_to(:posts, message: "Hello World", level: :info)
Turbo::StreamsChannel.broadcast_console_log_later_to(:posts, message: "Hello World", level: :info)
Which would broadcast the console_log
action to any client which is subscribed via:
<%= turbo_stream_from :posts %>
The TurboPower::Broadcastable
module allows actions to be broadcasted from ActiveRecord models, like:
# app/models/post.rb
class Post < ApplicationRecord
after_save do
# broadcasting to all clients which are subscribed via:
# <%= turbo_stream_from @post %>
broadcast_console_log(message: "Hello World", level: "Warn")
broadcast_console_log_later(message: "Hello World", level: "Warn")
# broadcasting to all clients which are subscribed via the `:posts` stream identifier:
# <%= turbo_stream_from :posts %>
broadcast_console_log_to(:posts, message: "Hello World", level: "Warn")
broadcast_console_log_later_to(:posts, message: "Hello World", level: "Warn")
end
end
Commits
Full Changelog: v0.4.0...v0.5.0
v0.4.0
New Actions
- Implement
history_back
stream helper by @valentinorusconi in #27 - Implement
history_forward
stream helper by @marcoroth in #28
Added
- Add keyword argument support for all actions by @marcoroth in #26
- Add tests and keyword argument support support
set_value
action by @marcoroth in #25 - Add
frame
option toredirect_to
action by @adrianthedev in #34
New Contributors
- @valentinorusconi made their first contribution in #27
- @adrianthedev made their first contribution in #34
Commits
Full Changelog: v0.3.1...v0.4.0
v0.3.1
Updated
- Loosen
turbo-rails
dependency to be compatible with1.4.0
by @marcoroth in ca537d8
Fixed
- Cast
level
argument ofconsole_log
action always to string by @marcoroth in #24
Commits
Full Changelog: v0.3.0...v0.3.1
v0.3.0
New Actions
- Implement
set_cookie_item
action by @lxxxvi in marcoroth/turbo_power#32 - Implement
notification
action by @lxxxvi in marcoroth/turbo_power#36 - Implement
turbo_progress_bar_show
action by @marcoroth in marcoroth/turbo_power#40 - Implement
turbo_progress_bar_hide
action by @marcoroth in marcoroth/turbo_power#40 - Implement
turbo_progress_bar_set_value
action by @marcoroth in marcoroth/turbo_power#40
See more at: https://github.com/marcoroth/turbo_power/releases/tag/v0.3.0
Added
- Add stream helpers for
turbo_progress_bar
actions by @marcoroth in #20
Changed
- Remove
turbo_ready
dependency by @marcoroth in #17 - Reorganize
turbo
actions and add tests by @marcoroth in #21 - Adapt
notification
stream helper and add tests by @marcoroth in #22 - Make positional arguments optional for
set_cookie_item
action by @marcoroth in #23
Commits
Full Changelog: v0.2.0...v0.3.0
v0.2.0
New Actions
- Implement
reset_form
action by @marcoroth in #15
Changed
- Add new Turbo Actions to README by @leon-vogt in #9
- Remove block template rendering support by @marcoroth in #12
- Sync
set_property
attributes with npm package by @minimul in #14
Commits
Full Changelog: v0.1.6...v0.2.0
v0.1.6
New Actions
- Implement
turbo_clear_cache
action by @leon-vogt in #7
Changed
- Rename
turbo_frame_set_src
andturbo_frame_reload
actions by @marcoroth in #8
Commits
Full Changelog: v0.1.5...v0.1.6
v0.1.5
New Actions
- Add
set_turbo_frame_src
action by @leon-vogt in #6
Changed
New Contributors
Commits
Full Changelog: v0.1.3...v0.1.5