Skip to content

Releases: marcoroth/turbo_power-rails

v0.7.0

15 Dec 12:27
92901b5
Compare
Choose a tag to compare

New helpers

Commits

Full Changelog: v0.6.2...v0.7.0

v0.6.2

09 Jun 15:43
f852ce5
Compare
Choose a tag to compare

Changed

  • Introduce RenderHelper to reuse StreamHelpers in model broadcasts by @marcoroth in #43

Commits

Full Changelog: v0.6.1...v0.6.2

v0.6.1

07 Jan 18:22
5f90294
Compare
Choose a tag to compare

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

29 Nov 10:47
3062f94
Compare
Choose a tag to compare

New Actions

Added

  • Support for Turbo 8 beta by @cmer in #38

New Contributors

  • @cmer made their first contribution in #38

Commits

Full Changelog: v0.5.0...v0.6.0

v0.5.0

15 Oct 13:33
5a649c6
Compare
Choose a tag to compare

Added

  • Introduce TurboPower::Broadcasts and TurboPower::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

15 Sep 16:26
fb17e17
Compare
Choose a tag to compare

New Actions

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 to redirect_to action by @adrianthedev in #34

New Contributors

Commits

Full Changelog: v0.3.1...v0.4.0

v0.3.1

02 Mar 01:19
Compare
Choose a tag to compare

Updated

Fixed

  • Cast level argument of console_log action always to string by @marcoroth in #24

Commits

Full Changelog: v0.3.0...v0.3.1

v0.3.0

12 Feb 22:32
f4cecc3
Compare
Choose a tag to compare

New Actions

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

04 Jan 05:42
cbc946a
Compare
Choose a tag to compare

New Actions

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

19 Nov 17:51
Compare
Choose a tag to compare

New Actions

  • Implement turbo_clear_cache action by @leon-vogt in #7

Changed

  • Rename turbo_frame_set_src and turbo_frame_reload actions by @marcoroth in #8

Commits

Full Changelog: v0.1.5...v0.1.6