Comments (4)
Hi Smona,
Thanks for reporting. Will investigate
from react-notifications-component.
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.
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.
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)
- Scrolling when screen is full of notifications HOT 2
- Please fix typo HOT 1
- Notifications are not auto dismissed when browser tab is inactive HOT 3
- Unable to resolve dependency tree error when installing npm packages HOT 4
- Fade In animation suddenly appears instead of playing the animation HOT 3
- uncompatibility with animate.css library HOT 6
- Not all styles are renamed HOT 1
- npm ERR! Missing script: "build:library:dev" HOT 3
- compatibility issue
- The component's test for closing by timeout failed HOT 1
- Store.addNotification is getting called and failing in my tests HOT 4
- 'message' property renders only string, not component HOT 1
- Notification blinks when it appears HOT 2
- Add `top: 0` to rnc__base
- Desktop Notifications as an option
- Typescript: Export Member
- TypeError: this.add is not a function HOT 1
- Add JS support for integrating through CDN in it
- Pushes content down
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 react-notifications-component.