Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle render complete in custom renderers #40496

Closed
timroes opened this issue Jul 8, 2019 · 6 comments
Closed

How to handle render complete in custom renderers #40496

timroes opened this issue Jul 8, 2019 · 6 comments
Labels
discuss Feature:Embedding Embedding content via iFrame impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort

Comments

@timroes
Copy link
Contributor

timroes commented Jul 8, 2019

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

@timroes timroes added discuss (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:AppArch labels Jul 8, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@tsullivan
Copy link
Member

Apologies, but it looks like this important discussion is getting lost. Let's make sure we take it up.

For now, I'm just going to cc @mattkime

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services

@tsullivan
Copy link
Member

I don't think this issue is related to Reporting. It looks more about how the core visualizations reach their render complete stage. The Reporting code is not going to change how it reads visualizations on the page, which is setting DOM event listeners on the visualization containers.

@tsullivan tsullivan removed (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:Stack Services labels Sep 20, 2019
@ppisljar
Copy link
Member

we have few tasks in common that might relate to this.

  1. moving render-complete logic out of visualize loader into embeddable layer
  • at the same time we could extract this into utility functions first before using it in embeddable layer
  1. deprecating vis loader and making executor service the only way to run expressions (so done handler will always be passed in)
  • at the same time we could make executor throw if done was not called for specific amount of time to make sure everyone implements calling it

@ppisljar ppisljar added Feature:Embedding Embedding content via iFrame and removed Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) labels Jul 7, 2020
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 21, 2021
@ppisljar
Copy link
Member

ppisljar commented Aug 9, 2022

Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment.

@ppisljar ppisljar closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:Embedding Embedding content via iFrame impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort
Projects
None yet
Development

No branches or pull requests

4 participants