Skip to content

Prevent snackbars from stacking up by adding a max count #53201

Closed

Description

@richtabor

Snackbars should have a max count, where you can't end up with a stack of them hanging around. #53200 will reduce the number, but there should be a max. Even as small as three notice max may work just fine.

CleanShot 2023-07-31 at 17 44 16

Activity

  1. glendaviesnz commented on Jul 31, 2023

    @glendaviesnz
    Contributor

    Also, each notice type should have a unique id as done here so that only one of that notice type appears at a time.

  2. richtabor commented on Aug 1, 2023

    @richtabor
    MemberAuthor

    Also, each notice type should have a unique id #53087 so that only one of that notice type appears at a time.

    Yea, perhaps the copy to clipboard snackbar doesn't have one?

  3. Mamaduka commented on Aug 1, 2023

    @Mamaduka
    Member

    I like how this library, Sonner, handles stacking and multiple snackbars/toasts.

  4. richtabor commented on Aug 1, 2023

    @richtabor
    MemberAuthor

    I like how this library, Sonner, handles stacking and multiple snackbars/toasts.

    Very cool! What do we need to do to try this interaction in the editor?

    For reference:

    CleanShot.2023-08-01.at.11.34.27.mp4
  5. Mamaduka commented on Aug 1, 2023

    @Mamaduka
    Member

    I think it would require an update to the SnackbarList component.

    @mirka, how doable is this with current snackbar components?

  6. jasmussen commented on Aug 2, 2023

    @jasmussen
    Contributor

    Yes please 🙏

  7. mirka commented on Aug 4, 2023

    @mirka
    Member

    I think it would require an update to the SnackbarList component.

    @mirka, how doable is this with current snackbar components?

    Architecturally it seems feasible to me, since SnackbarList has full control over how the notice data objects are rendered. Most of the complexity would be in getting the interactive animations right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions