Closed HendrikThePendric closed 4 months ago
:tada: This PR is included in version 11.6.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 12.0.0-alpha.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This PR fixes a bug that was observed in the maps-app where multiple info alerts were added at approximately the same time. These alerts would then also hide at approximately the same time, but one alert would finish first and this would cause the other one to remount and restart its appear/show/hide lifecycle.
It took a long time to debug this issue and I found a few things wrong:
alertStackAlerts
was an empty array when it should have been populated. In the next render cycle, the array would have the expected alerts again, but because the array was empty during the previous render cycle, everything was remounting all the time.After fixing that empty-array and double render problem I realised I had broken some preexisting functionality: As I explain here, there is a fundamental difference between how alerts hide "naturally" VS programatically. I had already catered for this in the original implementation, but broke that while fixing the initial bug. I found this problem by chance: there were no test cases that broke. So I decided to add a test for this as well.