dhis2 / app-platform

DHIS 2 application platform layer with inverted app control
https://platform.dhis2.nu
BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

fix(alerts): ensure hiding works correctly and alerts are not re-added [DHIS2-15438] #859

Closed HendrikThePendric closed 4 months ago

HendrikThePendric commented 4 months ago

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:

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.

dhis2-bot commented 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:

dhis2-bot commented 4 months ago

:tada: This PR is included in version 12.0.0-alpha.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: