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

Optionally allow broadcasting after each partial is generated #79

Closed
rickychilcott opened this issue Feb 2, 2021 · 7 comments · Fixed by #106
Closed

Optionally allow broadcasting after each partial is generated #79

rickychilcott opened this issue Feb 2, 2021 · 7 comments · Fixed by #106
Milestone

Comments

@rickychilcott
Copy link
Contributor

If the user specifies to broadcast_immediately: true, then initiate a cable_ready.broadcast after each resource is rendered in https://github.com/julianrubisch/futurism/blob/v0.7.2/lib/futurism/channel.rb#L18-L41

@rickychilcott
Copy link
Contributor Author

@julianrubisch are you OK with this and having the syntax be broadcast_immediately: true?

Example:

<%= futurize @posts, broadcast_immediately: true, extends: :div do %>
  <!-- placeholder -->
<% end %>

@marcoroth
Copy link
Member

How about broadcast_now to make it as close as possible to ActionMailer and ActiveJob ?

@rickychilcott
Copy link
Contributor Author

And shorter/less likely to misspell. I like it!

@julianrubisch
Copy link
Contributor

Hmm I'd like something along the lines of broadcast_each, actually

@julianrubisch
Copy link
Contributor

I suggest you wait until I'm done with #78, otherwise we'll produce merge conflicts

@julianrubisch julianrubisch added this to the 1.0.0 milestone Feb 9, 2021
@rickychilcott
Copy link
Contributor Author

Ok to move this one forward @julianrubisch?

Does the following still feel right?

<%= futurize @posts, broadcast_each: true, extends: :div do %>
  <!-- placeholder -->
<% end %>

@julianrubisch
Copy link
Contributor

Yes please!

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

Successfully merging a pull request may close this issue.

3 participants