Comments (6)
Interesting thought. I'd have to see how this is implemented before I approved this type of pull request. Feel free to take a shot at it, and propose it. I'm a little concerned about if this could be harmful or confusing though, in some cases.
from toastr.
I have a few ideas on how this could be done. Would something like a summary with counts of the message types not displayed be useful?
It could use the information toast and have text like:
"Notifications not shown: #"
or some type of toast such as "Summary" and have text like:
Notifications not shown:
- Error: a
- Warnings : x
- Information: y
- Success: z
If something like that sounds good I'll get to work and try my hand at a pull request.
from toastr.
I'm not a fan of discarding the toasts that can't be shown in place of a summary.
I do like @saitolabs suggestion about a queue though. If we can define a max number of toasts to be shown, all of the other toasts be be added to a queue (such as an array). When the first (or lowest indexed toast) is closed, we can push the next toast on-screen from the queue.
How does that sound?
from toastr.
I like the queue idea in theory. It could be an enhancement. But right now @TimFerrell and I are focused on v3 and only fixing bugs in v2. Will keep this open tho, as its a good idea
from toastr.
I am also looking for the "max no. of shown" option (not to clutter the scene too much).
The "queue" mechanism @TimFerrell suggestion of pushing to screen from queue is good. Except, I would suggest that this mechanism should respect the "newest on top" option.
For example, when a new item arrives, and the screen already has max no. of toasts, (and if the option says "newest on top" is true), then instead of pushing the new arrivals into queue, I would say push the old ones into the queue, making the new comers visible immediately (thus respecting the "newest on top"). This way anytime anyone looks on the screen they always see the latest entries (which is useful for admin dashboard UIs, where they may often be flooded with too many events at times).
But, in that case how does one access the "old ones" pushed onto the queue? Some kind of visual reference may be needed, Some kind of "notification center" UI with some hint of old messages present (something like twitter notifications button, but as a overlay that opens on the same page).
from toastr.
Closing due to lack of activity. Will be considered for v3.
from toastr.
Related Issues (20)
- ngx toastr clear on outside click of toastr area
- Add import without links necessity HOT 3
- Travis-CI did not trigger tests
- Correlate a Toast with the one which has Just Hidden HOT 1
- jQuery.easing[jQuery.easing.def] is not a function
- Cannot read property 'extend' of undefined HOT 1
- Can't put two toastrs at two different positions
- timeOut not working
- timeout=0 onclick=function(){} how do I hide the toastr? HOT 1
- Accessibility issues HOT 1
- setAria
- #558 require js loading issue
- XSS Vulnerability "HIGH" due to default escapeHtml=false setting HOT 5
- TypeError: Cannot read properties of undefined (reading 'extend') HOT 2
- Toastr background white HOT 1
- toastr does not work with bootstrap 5 ? HOT 2
- This project is not maintained (2023)
- Target class [toastr] does not exist. HOT 1
- Update a toast message if a toast is already visible
- Icon animation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toastr.