turbo-rails 1.5.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -6
- data/app/assets/javascripts/turbo.js +1894 -725
- data/app/assets/javascripts/turbo.min.js +9 -5
- data/app/assets/javascripts/turbo.min.js.map +1 -1
- data/app/channels/turbo/streams/broadcasts.rb +18 -4
- data/app/controllers/concerns/turbo/request_id_tracking.rb +12 -0
- data/app/helpers/turbo/drive_helper.rb +63 -4
- data/app/helpers/turbo/frames_helper.rb +4 -1
- data/app/helpers/turbo/streams/action_helper.rb +5 -1
- data/app/javascript/turbo/index.js +2 -0
- data/app/jobs/turbo/streams/action_broadcast_job.rb +2 -2
- data/app/jobs/turbo/streams/broadcast_job.rb +1 -1
- data/app/jobs/turbo/streams/broadcast_stream_job.rb +7 -0
- data/app/models/concerns/turbo/broadcastable.rb +87 -20
- data/app/models/turbo/debouncer.rb +24 -0
- data/app/models/turbo/streams/tag_builder.rb +20 -0
- data/app/models/turbo/thread_debouncer.rb +28 -0
- data/config/routes.rb +0 -1
- data/lib/install/turbo_with_importmap.rb +1 -1
- data/lib/turbo/broadcastable/test_helper.rb +1 -1
- data/lib/turbo/engine.rb +6 -0
- data/lib/turbo/version.rb +1 -1
- data/lib/turbo-rails.rb +10 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b66ce6805bd7f4ed7bf032d98080748a3d123959ef81940ca62d1c394b69d79
|
4
|
+
data.tar.gz: 2245107df78ba671eb787f683cc77ac508778fd3832c3396c0d52d4be6f9d64c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6d95bdd5abce68fda1895b52b53474a8c0306545a238af6b0caba6f20354a7e48add0a6c662cd4861152fb0b293468f2f3c2a0c67002c9926922a19c4e734aa
|
7
|
+
data.tar.gz: e9daf44cbd3abf3c120aaf0b7bd58e13feb58f60c8738a57624c9721b6965636214a7e44a47eff5f752890b6df5915dbd852eb58d6449326aaa3969b1e3a91f7
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Turbo is a language-agnostic framework written in JavaScript, but this gem build
|
|
11
11
|
|
12
12
|
Turbo is a continuation of the ideas from the previous [Turbolinks](https://github.com/turbolinks/turbolinks) framework, and the heart of that past approach lives on as Turbo Drive. When installed, Turbo automatically intercepts all clicks on `<a href>` links to the same domain. When you click an eligible link, Turbo prevents the browser from following it. Instead, Turbo changes the browser’s URL using the History API, requests the new page using `fetch`, and then renders the HTML response.
|
13
13
|
|
14
|
-
During rendering, Turbo replaces the current `<body>` element outright and merges the contents of the `<head>` element. The JavaScript window and document objects, and the
|
14
|
+
During rendering, Turbo replaces the current `<body>` element outright and merges the contents of the `<head>` element. The JavaScript window and document objects, and the `<html>` element, persist from one rendering to the next.
|
15
15
|
|
16
16
|
Whereas Turbolinks previously just dealt with links, Turbo can now also process form submissions and responses. This means the entire flow in the web application is wrapped into Turbo, making all the parts fast. No more need for `data-remote=true`.
|
17
17
|
|
@@ -51,7 +51,7 @@ For instance:
|
|
51
51
|
<% end %>
|
52
52
|
```
|
53
53
|
|
54
|
-
When the user
|
54
|
+
When the user clicks on the `Edit this todo` link, as a direct response to this user interaction, the turbo frame will be automatically replaced with the one in the `edit.html.erb` page.
|
55
55
|
|
56
56
|
[See documentation](https://turbo.hotwired.dev/handbook/frames).
|
57
57
|
|
@@ -129,10 +129,7 @@ You can watch [the video introduction to Hotwire](https://hotwired.dev/#screenca
|
|
129
129
|
|
130
130
|
### RubyDoc Documentation
|
131
131
|
|
132
|
-
For the API documentation covering this gem's classes and packages, [visit the
|
133
|
-
RubyDoc page][].
|
134
|
-
|
135
|
-
[visit the RubyDoc page](https://rubydoc.info/github/hotwired/turbo-rails/main)
|
132
|
+
For the API documentation covering this gem's classes and packages, [visit the RubyDoc page](https://rubydoc.info/github/hotwired/turbo-rails/main).
|
136
133
|
|
137
134
|
## Compatibility with Rails UJS
|
138
135
|
|