GithubHelp home page GithubHelp logo

Comments (4)

teodosii avatar teodosii commented on May 26, 2024 1

Hi Smona,

Thanks for reporting. Will investigate

from react-notifications-component.

stefanb2 avatar stefanb2 commented on May 26, 2024 1

As a workaround for this problem I now make sure that the notification is removed in my helper function. Here is the gist of the code:

const makeNotification = notification => {
  const duration = notification.timeout ?? 5000;

  Promise.resolve()
    .then(() => Store.addNotification({
      ...notification,
      dismiss: {
        duration,
        ...
      },
      ...
    }))
    .then(id => new Promise(resolve =>
      setTimeout(
        () => {
          // Make sure the notification disappears
          Store.removeNotification(id);
          resolve();
        },
        duration
      )
    ));
};

from react-notifications-component.

Smona avatar Smona commented on May 26, 2024

This is interesting... I added a transition: visibility 0ms linear 500ms to .rnc__notification-item and visibility: hidden to my animation exit class. I was expecting to at least hide the element after the animation, but after a lot of button mashing I haven't been able to reproduce the bug since making this change. Perhaps there's a CSS event listener somewhere that isn't always being triggered without this rule?

For reference, here's our animation config:

            animationIn: ['animate__animated', 'animate__fadeInRight', 'animate__faster'],
            animationOut: ['animate__animated', 'animate__fadeOutRight', 'animate__faster'],
            // Chosen to complement duration of animate__faster speed above (500ms)
            slidingEnter: {
                duration: 200,
                timingFunction: 'ease-in-out',
                delay: 0,
            },
            slidingExit: {
                duration: 200,
                timingFunction: 'ease-in-out',
                delay: 300,
            },

from react-notifications-component.

stefanb2 avatar stefanb2 commented on May 26, 2024

I ran into the same issue.

BUT in my case I can't reproduce it on development code, i.e. in the Dev Env of my app, only on production code, i.e. when the app code is deployed.
CORRECTION in normal operations inside the app, i.e. what a normal user would see, there the development/production code behaves differently.

Now that I added a special button on the home page to generate many notifications in quick succession by clicking on it, I have now reproduced the behavior also in development code.

from react-notifications-component.

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.