MR Widget Extensions Continuously Teardown, Reconstruct, and Remount
Context
We're trying to add more default telemetry to the MR Widgets.
One of the events is "viewed." Barring complex logic like actual scroll positioning, the best indicator of viewed
is that the component was mounted into the DOM.
Problem
Unfortunately the extensions continuously teardown, reconstruct, and remount into the DOM. This means that neither the created
nor the mounted
callback are useful for tracking views.
Problem Caveat
In my test scenario I had forced every widget to display, despite none of them having useful data.
During this testing, they were showing the "failed to load data" error states, which could have led to the continuous remounting.
It's possible it only occurs in this specific scenario, but even so it is possible in a real-world use case, so we should address it regardless.
Solution
I don't have a technical solution, but in broad terms, the component should remain rendered and only change its display content if data changes or errors are cleared.
Stat | Value | Description |
---|---|---|
Type | Defect & Investigation | This is probably mostly just defect fix work, but I don't personally know why the described issue is occurring, so it would require a bit of investigation, which necessarily means digging around with potentially deep Vue rendering pipelines. |
Weight | frontend-weight3 | Weighting this a frontend 3 because of the above uncertainty. It could be a 1, but I'm not sure what it will take. |