question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal for Turbo8: rename Turbo Streams to Turbo Actions

See original GitHub issue

Proposal

  • naming around “sending changes to the browser” are renamed “Turbo Actions”
  • <turbo-stream> changed to <turbo-action>
  • format.turbo_stream renamed to format.turbo or format.turbo_action

Conceived by @drnic and @marcoroth

Why

There is somehow an incredible cognitive load to remembering how “Turbo” works. I believe renaming the collectible concepts around “Turbo Streams” towards “Turbo Actions” would help.

“Streams” infers websockets, actioncable, or perhaps a flow of something in two directions.

But it is Turbo Broadcasting that performs the websocket behaviour. What does TB do? It sends actions to the browser. What are these actions called? Oddly, they are called Streams.

Instead, the principle of Turbo Streams is to make a change to the DOM. Perhaps it’s the DOM of the caller of a controller action. Perhaps it’s the DOM of a broadcast recipient.

We’d like to consider renaming Turbo Streams to Turbo Actions.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:8
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dhhcommented, May 10, 2022

Before settling on Turbo Streams, we considered just calling it Turbo Actions. But ultimately decided to go with streams because it both worked better as container concept for something that could include multiple actions, and to imply the use as page updates that were flowing in response to controller actions and model changes.

Here’s how we currently describe what Turbo Streams are on the home page:

Turbo Streams deliver page changes over WebSocket, SSE or in response to form submissions using just HTML and a set of CRUD-like actions.

And here’s the longer description in the guide:

Turbo Streams deliver page changes as fragments of HTML wrapped in self-executing <turbo-stream> elements. Each stream element specifies an action together with a target ID to declare what should happen to the HTML inside it. These elements are delivered by the server over a WebSocket, SSE or other transport to bring the application alive with updates made by other users or processes.

How would you write that using just Turbo Action as the name in a way that would be a big step up in clarity, as to warrant the name and API change? I’m struggling a bit to conceive on something that’s so much simpler as to justify that.

Re:

But it is Turbo Broadcasting that performs the websocket behaviour. What does TB do? It sends actions to the browser. What are these actions called? Oddly, they are called Streams.

You broadcast actions that are delivered over streams. The stream is the pipe, the action is what goes in the pipe.

Very open to continue to improving our documentation! We should have more examples, in particular. More fleshed out tutorials too. I think getting started on these parts of the equation are probably going to do more for teaching people how to use Turbo than renaming would. Not that the two have to necessarily be in conflict, but I think it does suggest where we’d gain the most.

0reactions
koenhandekyncommented, Sep 13, 2022

I’m a seasoned dev/arch/cto - aka old guy - and i have to add that i made the same mistake. i basically misunderstood turbo streams, assuming it was a websocket thingie, jumping to conclusions. the fact that you easily find content where turbo streams is used over websockets kept me locked in that wrong state of mind for way to long 😃 Boy I went ‘aha’ when I started using it in the basic request/response form.

We know the joke about naming things, but yes it’s hard. documentation can help but I don’t think you can easily fix this purely with documentation. we are all ‘trained’ to quickly scan information because we have such an overload of it, making assumptions all the time. We read things with prejudice, and we can’t really help it.

Rename or not, I can’t tell. Just gather the ‘statistics’ i’d say 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turbo stream actions - Turbo Reference
Streams. ﹟ The seven actions. ﹟ Append. Appends the content within the template tag to the container designated by the target dom id....
Read more >
Vulnerability report for Docker tensorflow/tensorflow:1.9.0-gpu-py3 ...
Vulnerable module: libjpeg-turbo/libjpeg-turbo8 ... in GnuPG before 2.2.8 mishandles the original filename during decryption and verification actions, ...
Read more >
Rails turbo stream - Stack Overflow
You've skipped the important part, the partial that you're rendering: # app/views/quotes/_quote.html.erb <div id="<%= dom_id(quote) ...
Read more >
Name brand low price Longaberger 2000 signed hand woven ...
Newsroom Nike Shox Turbo 8 Running Shoes Sneakers Size 8 Womens Gray Pink ; Markets ; (10 Jun 1794) DVF Financier Heather Gray...
Read more >
9 August 2016 by Mornington Peninsula News Group - Issuu
The only reason for secrecy is to cover actions or decisions that are underhand. ... 2015 WRX AWD turbo 8 speed automatic multiple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found