-
Notifications
You must be signed in to change notification settings - Fork 3
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
Make non-critical warnings less intrusive #393
Comments
@surchs I can take this up and try to fix the issue. Please assign it to me. |
Hey @Tusharjamdade, thanks for your interest in contributing. I think the best way to do this is to discuss in the issue a bit how you want to implement it, and then we can discuss the details in a draft PR. |
Hi @surchs, To implement MUI Badges like the one shown in the example image, we can add them to the navbar (Navbar.tsx). In App.tsx, we can store all the warnings or non-critical issues in a state variable and pass these warnings as props to the Navbar component. The badge value can then be dynamically updated based on the warnings. Additionally, we can add a dropdown to the badge to display non-critical warnings. For critical warnings, we can display them as we did previously. Please let me know if my approach is irrelevant or needs improvement. |
Hey @Tusharjamdade , that sounds cool to me. @rmanaem, do you have any opinions on the placement for the warnings-badge? Navbar makes sense? |
Hi @Tusharjamdade, |
@rmanaem, following your suggestion, I have implemented the notification badge and also added a test for it Below are some of the screenshots: |
@surchs I know the issue mentions warnnigs only but do we want to consider have the same behavior for all notistack notifications? |
I think it would be good to have both warnings and info be hidden in the badge. |
Hey @Tusharjamdade that would be amazing, yes, thanks! But maybe hold off until @rmanaem has submitted his review of your PR, I think there was another thing we noticed re clearing popups, might be easier to address both |
@Tusharjamdade I just submitted my review, feel free to ping us with any questions. |
As per the suggested changes, I have updated the implementation to include Delete functionality for each notification. When the user clicks the close icon, the respective notification will be removed. Added a Clear All feature. When the "Clear All" button is clicked, all notifications will be cleared. Added custom colors for warning and info notifications. Is there anything else that needs improvement or any additional changes I should work on? Thank you. Below are some of the screenshots: |
Hi @Tusharjamdade,
|
Is there an existing issue for this?
New feature
I would like to have a way of removing / hiding the non-critical warnings from the UI. Right now I get a lot of warnings even if nothing is really broken - and as a regular user I cannot do anything about these warnings (other than click them away one by one):
I propose we make the current behaviour a "debug" mode and make it default to "off". In the new "normal mode", I would either see only critical error messages (i.e. no results / something broken) or I see only a little counter of warnings and errors - e.g. with a badge https://mui.com/material-ui/react-badge/
I can then do some UI action (e.g. click the badge) to expand these warnings and look at them.
Unclear documentation
No response
The text was updated successfully, but these errors were encountered: