Power-pack for Turbo Streams
scroll_into_view
stream helper to accept options in #40 by @marcorothFull Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.6.0...v0.6.1
toggle_css_class
action by @leonvogt in https://github.com/marcoroth/turbo_power-rails/pull/36
replace_css_class
action by @leonvogt in https://github.com/marcoroth/turbo_power-rails/pull/37
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.5.0...v0.6.0
TurboPower::Broadcasts
and TurboPower::Broadcastable
modules by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/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
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.4.0...v0.5.0
history_back
stream helper by @valentinorusconi in https://github.com/marcoroth/turbo_power-rails/pull/27
history_forward
stream helper by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/28
set_value
action by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/25
frame
option to redirect_to
action by @adrianthedev in https://github.com/marcoroth/turbo_power-rails/pull/34
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.3.1...v0.4.0
turbo-rails
dependency to be compatible with 1.4.0
by @marcoroth in https://github.com/marcoroth/turbo_power-rails/commit/ca537d8ab11d2c45fd7469aefbaaa421db872d77
level
argument of console_log
action always to string by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/24
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.3.0...v0.3.1
set_cookie_item
action by @lxxxvi in https://github.com/marcoroth/turbo_power/pull/32
notification
action by @lxxxvi in https://github.com/marcoroth/turbo_power/pull/36
turbo_progress_bar_show
action by @marcoroth in https://github.com/marcoroth/turbo_power/pull/40
turbo_progress_bar_hide
action by @marcoroth in https://github.com/marcoroth/turbo_power/pull/40
turbo_progress_bar_set_value
action by @marcoroth in https://github.com/marcoroth/turbo_power/pull/40
See more at: https://github.com/marcoroth/turbo_power/releases/tag/v0.3.0
turbo_progress_bar
actions by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/20
turbo_ready
dependency by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/17
turbo
actions and add tests by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/21
notification
stream helper and add tests by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/22
set_cookie_item
action by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/23
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.2.0...v0.3.0
reset_form
action by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/15
set_property
attributes with npm package by @minimul in https://github.com/marcoroth/turbo_power-rails/pull/14
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.1.6...v0.2.0
turbo_clear_cache
action by @leon-vogt in https://github.com/marcoroth/turbo_power-rails/pull/7
turbo_frame_set_src
and turbo_frame_reload
actions by @marcoroth in https://github.com/marcoroth/turbo_power-rails/pull/8
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.1.5...v0.1.6
set_turbo_frame_src
action by @leon-vogt in https://github.com/marcoroth/turbo_power-rails/pull/6
Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.1.3...v0.1.5