-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Ability to programmatically close a specific notification #1801
Comments
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 |
If a notification CAN be closed from the front-end... (which I think is pretty easy). |
after reading the code:
|
... that sounds great. "Last notification" use case already handled (which I suspect is 99% of the cases). |
@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
|
for test, yes, you're supposed to test every (reasonable) possibility |
New Quest!A new Quest has been launched in @Avaiga’s repo. Some loot has been stashed in this issue to reward the solver! 🗡 Comment ⚔️ When you submit a PR, comment Questions? Check out the docs. |
I want to work on this issue can you assign me ? @jrobinAV |
Here you go @AdeshGhadage ! |
@quest-bot embark |
@AdeshGhadage has embarked on their Quest. 🗡
This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR. Questions? Check out the docs. |
🧚 @AdeshGhadage has submitted PR #1985 and is claiming the loot. Keep up the pace, or you'll be left in the shadows. Questions? Check out the docs. |
* Added close a specific notification feature * ruff space removal * removed new __send_ws_alert * comments removed * add frontend and changed in notification id * changed notification id by nanoid * sapce correction * resolved multiple issue * return state._gui * fixed useref error and added test for deleteAlert * changed nanoid to random string --------- Co-authored-by: Fred Lefévère-Laoide <[email protected]>
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
The text was updated successfully, but these errors were encountered: