You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In headless API we use a set of events like markAs, listenNotificationReceive, deleteNotification, deleteNotifications,etc. While we use these methods to integrate our custom component with novu we have found some issues. When we make changes to notifications it should refetch the queries at certain events and remove them for certain events.
When a single notification is deleted , the queries to refetch the notifications are removed.
When we receive a new notification , the queries are removed.
When all notifications are removed . the queries are refetched.
There are few more i'll update it below.
Though all of these events works perfectly in Notification Center Component.
👟 Reproduction steps
Implement the headless API with infinite scrolling and implement the above mentioned methods so you can observe the behaviour. Compare with Novu Notification Center component. In there these methods are implemented perfectly.
👍 Expected behavior
When a single notification is deleted , the queries must be refetched.
When we receive a new notification , the queries must be refetched.
When all notifications are removed . the queries must be removed.
When unseenCount changed , the queries must not be removed.
When unreadCount changed, the queries must not be removed.
👎 Actual Behavior with Screenshots
Here I have a screenshot of API calls in debugger. I have used markAs method so it refetched the queries and its correct.
Now here I have deleted a single notification and it has not refetched any queries and instead removed them. Hence even the next subsequent calls are not happening. Like when I call the markAs method, it is not refetching since the queries are already removed.
Ok now here I will post the code comparision screenshots between Notification Center Component and Headless API.
Here is code for delete single notification in Notification Center Component:
Here is the code on Headless API:
Here is the code for unseenCount change in Notification Center Component:
Here is the code on Headless API:
Novu version
0.21.0
npm version
No response
node version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
📜 Description
In headless API we use a set of events like markAs, listenNotificationReceive, deleteNotification, deleteNotifications,etc. While we use these methods to integrate our custom component with novu we have found some issues. When we make changes to notifications it should refetch the queries at certain events and remove them for certain events.
There are few more i'll update it below.
Though all of these events works perfectly in Notification Center Component.
👟 Reproduction steps
Implement the headless API with infinite scrolling and implement the above mentioned methods so you can observe the behaviour. Compare with Novu Notification Center component. In there these methods are implemented perfectly.
👍 Expected behavior
👎 Actual Behavior with Screenshots
Ok now here I will post the code comparision screenshots between Notification Center Component and Headless API.
Here is the code on Headless API:
Here is the code on Headless API:
Novu version
0.21.0
npm version
No response
node version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: