Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add turbo stream morph actions to broadcasts #583

Merged

Conversation

omarluq
Copy link
Contributor

@omarluq omarluq commented Feb 15, 2024

This PR adds support for the Turbo Stream Morph action Turbo::StreamsChannel.broadcast_morph_to and it's variants, complementing the Morph action PR hotwired/turbo#1185

@omarluq omarluq force-pushed the omarluq/turbo-stream-morph-action branch from 365feee to 41d8b84 Compare February 15, 2024 06:39
@omarluq omarluq force-pushed the omarluq/turbo-stream-morph-action branch from 266fa01 to 36cba12 Compare February 15, 2024 22:41
@omarluq omarluq changed the title WIP add turbo stream morph actions to rails turbo-streams broadcasts add turbo stream morph actions to broadcasts Feb 15, 2024
@omarluq omarluq force-pushed the omarluq/turbo-stream-morph-action branch from 738f182 to da14d4e Compare March 13, 2024 03:51
Copy link
Member

@jorgemanrubia jorgemanrubia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @omarluq. One minor comment. Thanks!

test/streams/broadcastable_test.rb Show resolved Hide resolved
@omarluq omarluq force-pushed the omarluq/turbo-stream-morph-action branch from da14d4e to 2b754d7 Compare March 15, 2024 02:52
Copy link
Member

@jorgemanrubia jorgemanrubia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @omarluq!

@jorgemanrubia jorgemanrubia merged commit 102a491 into hotwired:main Mar 15, 2024
5 of 15 checks passed
@AlanCornthwaiteKatalyst
Copy link

@jorgemanrubia when could we expect to get this in a release?

@paulsturgess
Copy link

I just got tripped up trying to use this, as I thought the morph action was available.

Is there a plan to get this released? Thanks!

@searls
Copy link

searls commented Jul 15, 2024

Yeah @paulsturgess, just tripped over this myself.

Looks like the docs PR was reverted, and @jorgemanrubia refers to a different API that is described in this open PR, so I assume this was undone and nobody left a link in the original issue or this PR.

Would love if someone could let us know what the plan is!

@jorgemanrubia
Copy link
Member

@searls @paulsturgess Sorry about the confusion here! I reverted the documentation change for this one since we hadn't done a release containing it, so people were confused when they saw it in the docs, but it didn't work. Also, @seanpdoyle reworked the API to support this here hotwired/turbo#1240.

What we will do this week is to release a new version of turbo and turbo-rails containing the latter version of this (#1240), and then we'll merge the docs changes.

Sorry about the confusion 🙏 .

@tonywok
Copy link

tonywok commented Jul 17, 2024

Thanks for this! Excited to remove my home-rolled implementation and shed the direct idiomorph dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants