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

ActionCable connectivity events #307

Merged
merged 2 commits into from
Sep 18, 2020

Conversation

leastbad
Copy link
Contributor

@leastbad leastbad commented Sep 14, 2020

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

Introduces events based on ActionCable channel subscription status. Events are fired on document.

  • stimulus-reflex:connected
  • stimulus-reflex:rejected
  • stimulus-reflex:disconnected

Pulls much of the client-side code from #243 which is currently pending until after v3.3 is released.

stimulus-reflex:disconnected populates the detail object with the boolean key willAttemptReconnect which is tied to ActionCable's capacity to reconnect when disconnected.

Why should this be added

Useful for testing and building UIs that can verify SR is ready before calling stimulate.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

@leastbad leastbad merged commit 70bde97 into stimulusreflex:master Sep 18, 2020
@leastbad leastbad deleted the websocket_active branch September 18, 2020 08:19
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 this pull request may close these issues.

1 participant