react-native-notifier
react-native-notifier copied to clipboard
Large alert messages not dismissed correctly
If the content of the alert messages is too much, the alert doesn't dismiss completely and blocks the screen. This is the final state of alert in one case:

Repro: Create an alert with a long message with alert component and other default settings and try to dismiss it.
I've boiled down the problem to MIN_TRANSLATE_Y
hardcoded to be 200
. This should be set according to the preset alert height. I'll try to send a PR if I get time to fix it sometime. Thanks for the notification plugin :)
Hello @mehulmpt, thanks for the report!
I thought about setting a bigger value to MIN_TRANSLATE_Y
, but this creates a delay before the notification will be shown, and because of that, I decided to leave it at 200
as an optimal value.
As an idea, we can set this.translateY
to calculated height of the notification+some margin(100px for example) before the "slide down" animation (in showNotification
function), and then animate it to the same value in hideNotification
function.
Anyway, I will be happy to see your pull request 🙂
Hey @mehulmpt, I just released a new version which partially fixes the problem. Now the notification should always hide correctly.
But "slide down" animation of big components might be a bit unsmooth. Currently, I'm working on improvements here: component-height-calculation
Hi! Sure, I did not get time to get back to this, super busy month. Thanks for the patch for now :)
After applying safearea notification is not hiding properly.