-
Notifications
You must be signed in to change notification settings - Fork 83
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
Notification system (RENOP) #688
Conversation
This whole triggering the notification table makes it complicated in my opinion. How about we just introduce an additional pane along with our menu bar |
That is an interesting idea. It would keep the user from being bombarded with notifications especially if they just upgraded their extremely old .zap file. Re: "For when do we turn the notification icon to red? => I would say every time there is a new entry to the session_notice table for that session. My understanding is this should not require any kind of polling mechanism. Just the UI reflecting on the state of the backend." How would the front end know if a new notification was added to the table without polling? Unless it only queries during the creation of a session or in other words at fixed moments, there would need to be an interval polling mechanism. Case 1: POLLING (This is how the DIRTY FLAG works) Case 2: NOT POLLING Basically, as far as I can tell, if the user can cause a change that requires an addition to the SESSION_NOTICE table at any random moment then we will need a polling mechanism. If not, then we can put a query in a line of code after all possible notifications have been created. |
For turning the colors of the notification icon, I was hoping there is some form of server push notification to the client which can just do this. Can we use the web socket to throw a push notification(from the backend/server) when there is a new entry in the session_notice table? The browser/ui can update when it gets this notification. I am not thinking of this as a polling mechanism but just an open connection for client and server to interact using the web socket. However, yes we do need a polling mechanism on the client or an open connection between client and server to update tell the user there are new notifications. |
We already have the web socket notification scheme setup since it was necessary for Studio integration. |
Triggering a change to the database works for changing the SESSION_NOTICE table but how would the front end know that the SESSION_NOTICE table was changed without constantly checking it? We could have a DB trigger execute a function which communicated with the front end but this has not been implemented before while using an interval for polling the DB is already implemented. As far as I can tell, the difference between the DIRTY FLAG and other notifications you mention is that the DIRTY FLAG can be changed at any moment rather than at a fixed moment. This is why I have used it as a model for this project. My assumption is we want a system where a notification can be created and used at any moment. I also like the notification idea. |
65c8d74
to
ecf582a
Compare
a9d8e94
to
b1b4866
Compare
ff59ce2
to
6416d7c
Compare
f03f90b
to
2a3a1cf
Compare
3932db3
to
64f844c
Compare
e5cb1e5
to
a54d32f
Compare
-adding db mapping and db enum -updating db-enum.js -notification is showing with new SESSION_NOTICE table -adding queries adding REST API logic adding Notification page adding better front end design and getting rid of unnecessary information fixing dev tools cypress test
df67e1c
to
994a370
Compare
-adding db mapping and db enum -updating db-enum.js -notification is showing with new SESSION_NOTICE table -adding queries -adding REST API logic -adding Notification page -adding better front end design and getting rid of unnecessary information -fixing dev tools cypress test Github: ZAPP-184
This is a Draft PR for the notification framework.
TODO:
Decide how the querying of SESSION_NOTICE table will be implemented.
OPTIONS:
A. Notifications should be able to be triggered at any moment. Therefore, it would make sense to have interval polling which constantly checks for new notifications. This is not in the PR but I have this working locally. Although this code is out of date, here is an example of how it might work 57d9486
B. If notifications are not able to be triggered at any moment and are specific for importing and exporting .zap files then there could be a function which queries the SESSION_NOTICE table after importing. This way there would be no need for polling. Basically, the notifications would only be queried when creating a session...
C. Both A and B
Add notification page to the front end
Test