Ever since Airship v1 this has happened and we only recently noticed.
What's going on?
In order to re-render some widgets that need a parent with actual size, like the histogram or the stacked bar widget, the as-responsive-content widget looks for as-* elements each time you switch tabs and calls forceUpdate, a stencil method to force a full redraw of the element.
If this method is called too early, the stencil lazy loader has not downloaded the actual element script yet, causing it to fail.
We noticed that widgets on the panels, and only on the panels were sometimes not rendering. This happens because we set the first element (in tab order) to active, which is where we're doing the force update. Panels are inside of the map element, despite ending on a different tab, so the query locates them too. If you reorder the tabs so that the sidebar is the first one, the sidebar widgets will fail but not the rest.
Since:
A) Most cases put the map on the first tab (default value, too)
B) We didn't have legends up until a few weeks ago
We never really had widgets on panels combined with the as-responsive-content widget.
The fix is trivial, I'm blocking the first forceUpdate, which is done when querying the child elements of the component.
Ever since Airship v1 this has happened and we only recently noticed.
What's going on?
In order to re-render some widgets that need a parent with actual size, like the histogram or the stacked bar widget, the as-responsive-content widget looks for
as-*
elements each time you switch tabs and callsforceUpdate
, a stencil method to force a full redraw of the element.If this method is called too early, the stencil lazy loader has not downloaded the actual element script yet, causing it to fail.
We noticed that widgets on the panels, and only on the panels were sometimes not rendering. This happens because we set the first element (in tab order) to active, which is where we're doing the force update. Panels are inside of the map element, despite ending on a different tab, so the query locates them too. If you reorder the tabs so that the sidebar is the first one, the sidebar widgets will fail but not the rest.
Since: A) Most cases put the map on the first tab (default value, too) B) We didn't have legends up until a few weeks ago
We never really had widgets on panels combined with the as-responsive-content widget.
The fix is trivial, I'm blocking the first forceUpdate, which is done when querying the child elements of the component.