docdoku / docdoku-plm

The project purpose is to develop a comprehensive, robust open source PLM (Product LifeCycle Management) solution.
http://www.docdokuplm.com
GNU Affero General Public License v3.0
241 stars 98 forks source link

[Alerts/Notifications] Improve alert management #1148

Open defmsy opened 6 years ago

defmsy commented 6 years ago

Actually, to display a notification, we append a NotificationView to the element with the class 'notifications'. I find this method kind of restrictive. An alert manager with a queue persisted in window.sessionStorage could be interresting. This AlertManager would be initialized at start in context and then used everywhere to add alerts. It could be flushed manually when necessary and automatically flushed at each start to display alerts after a redirect. The whole process of rendering and displaying alerts would be handled by him. It would provide a cleaner way to make alerts.