Closed m-akinc closed 8 months ago
A theoretical use case for detachment re-use came up for Angular applications / SPAs that have dom snippets cached and re-used multiple times. ie a nimble-dialog is initialized with content, attached to the dom, goes through the open / close lifecycle, and is removed.
In the Anguar / SPA scenario, lets say the dialog is opened and a router event occurs (action in dialog causes routing event), the dialog would be detached from the dom immediately. Theoretically if the element was cached for efficiency it may need to be re-used / detachment should leave it in a good state.
In practice currently the dialog is not cached so the disconnected state / behavior is not a known issue / requirement for apps yet. See AzDo discussion.
Closing in favor of #1769
🧹 Tech Debt
From discussion here: https://github.com/ni/nimble/pull/658#discussion_r942539836
The Nimble dialog needs logic to handle:
You should be able to disconnect (while the dialog is open), reconnect, and re-open the dialog.
Any new scenarios handled need tests as well.