We currently pass in a done handler into the expression renderer, if we call it via the visLoader. This done() handler must be called by the renderer, once it's done rendering, so the visLoader can set the data-render-complete attribute correctly for reporting.
We need to align that behavior for all renderers no matter how they are called. Following up from a discussion with @ppisljar my current suggestion would be:
- Make sure that every renderer gets passed in the
done handler that it must call once done rendering, no matter if it's called via the Executor service or the visLoader, etc.
- Since we need the rendering done for all embeddables on a dashboard, the suggestion would be to also give embeddables a core concept of "done rendering". The visualization embeddable should then just pass the embeddable
done function into the Executor service/vis loader, so it will be used instead one generated by the executor service/vis loader.
- Have a common utility for features that are not using the expression to render, and are not running inside an embeddable (at least in their own application), e.g. Maps. They can use that utility directly.
Otherwise it will be used by the embeddable infrastructure when the embeddable done method is called (e.g. everything on a dashboard), or by the executor service, if no done handler is passed into the service from the outside (e.g. when running in Lens directly there is no embeddable wrapper, but the executor service is used directly).
cc @joelgriffith @tsullivan
We currently pass in a
donehandler into the expression renderer, if we call it via thevisLoader. Thisdone()handler must be called by the renderer, once it's done rendering, so the visLoader can set thedata-render-completeattribute correctly for reporting.We need to align that behavior for all renderers no matter how they are called. Following up from a discussion with @ppisljar my current suggestion would be:
donehandler that it must call once done rendering, no matter if it's called via the Executor service or the visLoader, etc.donefunction into the Executor service/vis loader, so it will be used instead one generated by the executor service/vis loader.Otherwise it will be used by the embeddable infrastructure when the embeddable done method is called (e.g. everything on a dashboard), or by the executor service, if no done handler is passed into the service from the outside (e.g. when running in Lens directly there is no embeddable wrapper, but the executor service is used directly).
cc @joelgriffith @tsullivan