Giter Site home page Giter Site logo

Comments (6)

johnpapa avatar johnpapa commented on August 16, 2024

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.

Biohazord avatar Biohazord commented on August 16, 2024

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.

TimFerrell avatar TimFerrell commented on August 16, 2024

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.

johnpapa avatar johnpapa commented on August 16, 2024

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.

KrishnaPG avatar KrishnaPG commented on August 16, 2024

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.

TimFerrell avatar TimFerrell commented on August 16, 2024

Closing due to lack of activity. Will be considered for v3.

from toastr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.