Skip to content

How to handle render complete in custom renderers #40496

@timroes

Description

@timroes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:EmbeddingEmbedding content via iFramediscussimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.loe:smallSmall Level of Effort

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions