-
Notifications
You must be signed in to change notification settings - Fork 900
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
[PoC] Asynchronous notifications using ActionCable #6809
Conversation
1bb3b88
to
f280068
Compare
58e7175
to
29eb161
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
aca20fb
to
c3758d3
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
<github_pr_commenter_batch />Some comments on commit skateman@36b5db2 |
Checked commit skateman@36b5db2 with ruby 2.2.4, rubocop 0.37.2, and haml-lint 0.16.1 |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
This was just a Proof-of-Concept PR, closing it in favor of #10965 |
So this PR implements an asynchronous notification solution. Basically if you create a new
Notification
database record, a callback function sends a notification to the client using ActionCable. The client is listening for notifications on its channel and displays them using PatternFly toast.Saving to the database is necessary because it is not guaranteed that the user is logged in. In the future, these database records can be disabled in the notification drawer also provided by the PatternFly guys.
Known issue when displaying multiple notifications at the same time:
patternfly/patternfly#323
ActionCable uses Redis by default! So make sure that you run bin/setup to copy the sample configuration which uses PostgreSQL!