Open zmikea opened 1 week ago
Hey @jrobinAV if this is up for grab, would like to work on this
Hello @cu8code,
Yes, it is. Let me assign it to you.
Thank you,
@jrobinAV can you tell me which part of the code should I focus on. Just some of your initial thoughts about the problems. And the implementation!
HI,
I believe @FredLL-Avaiga @FabienLelaquais @dinhlongviolin1 @namnguyen20999 are the key people to help you.
right now there is no identifier for a notification
I don't know if the notistack
package proposes this feature (deletion)
If it does I suppose we should create a new type of notification (so that we use the same ws message type) and implement it on the frontend depending on the way the package works
If a notification CAN be closed from the front-end... (which I think is pretty easy). We could add an option "identifier" parameter to 'notify()' and send it along with the ALERT message, store it as a (data?) property of the generated element. Then remove it when a new message (should we reuse ALERT?) is received referring to that id. @FredLL-Avaiga, thoughts?
after reading the code:
type= ""
... that sounds great. "Last notification" use case already handled (which I suspect is 99% of the cases). Now we will want to add some semantics to 'duration': like "I 0, leave the notification on the page as long as it was not explicitly closed".
@FabienLelaquais @jrobinAV reading the code
Also, how do I visually test, all the different changes, do I have to build each of the models, and then create an example, to visually check everything is working ?
no need to return an object if a dev wants to be able to close a notification:
notify
)close_notification(state, id)
(the frontend, will act accordingly).for test, yes, you're supposed to test every (reasonable) possibility
Description
I have potentially 3 notifications during a process, and at the end of the process want to programmatically close a specific one of them immediately, but leave the other two to close based on their duration.
Solution Proposed
create an ID for each notification upon creation so that a user can obtain it upon creation, example: id = notify(state, 'info', 'blah blah', duration=10000) And then later in code, they can close it with the line id.close
Impact of Solution
No response
Additional Context
No response
Acceptance Criteria
Code of Conduct