calcite-alert: queue corruption after removal of visible alert #6616
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Field Apps
Issues logged by ArcGIS Field Apps team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
estimate - 3
A day or two of work, likely requires updates to tests.
p - medium
Issue is non core or affecting less that 60% of people using the library
Milestone
Actual Behavior
If there is a queue of
<calcite-alert>
s, and the first alert is forcibly removed from the DOM without being properly dismissed, the alert queue will become corrupt and future alerts will not be rendered.Expected Behavior
The alert queue should handle removal of alerts from the DOM.
With dynamic rendering in modern apps, it is quite possible that an alert may become severed from the document before it has been properly closed by the user. While we may recommend that alerts be properly closed and allowed to animate out before they are removed from the DOM, we should be tolerant of cases where they are not, and we should attempt to keep internal state consistent to allow future alerts to render.
Reproduction Sample
https://codepen.io/timmorey/pen/yLxqdoE
Reproduction Steps
The expected behavior is that "alert 1" should be visible at step 4. If you inspect the dom at this time, you'll see that the second alert remains queued.
Reproduction Version
1.1.0
Relevant Info
No response
Regression?
No response
Priority impact
p3 - want for upcoming milestone
Impact
We are building components to be shared with other teams, and sometimes these components want to show alerts to the user to indicate an error condition or report the success of an operation. We would like to declaratively render these alerts in the components that trigger them, rather than insist that the parent application manage the alerts. However, we cannot guarantee that all alerts will have been gracefully dismissed by the time our components are destroyed, and we don't want to break the alert queue for the parent application.
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: