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

[Lens] Optionally show custom controls in the embedded Lens visualization #148890

Closed
formgeist opened this issue Jan 13, 2023 · 6 comments
Closed
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@formgeist
Copy link
Contributor

Summary

Instead of asking the user to move their analysis to Lens, we want to provide easy controls for changing parameters or in this case aggregrations of the metrics displayed. These controls are custom, but instead of implementing them outside the LensEmbeddable it might make sense to be able to provide them as part of the embeddable UX.

image

In the above example, the user is able to change the average aggregation from average to 95p or 99p by simply clicking the button group displayed.

We can imagine lots of various use-cases for individual controls for each visualization. Perhaps there's an alternate way of implementing this as a custom component within the embeddable.

@formgeist formgeist added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jan 13, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@kibanamachine kibanamachine added this to Long-term goals in Lens Jan 13, 2023
@stratoula stratoula added enhancement New value added to drive a business result impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Jan 13, 2023
@markov00
Copy link
Member

hi @formgeist I see this as a valid request, but I'm wondering why this should be part of the embeddable.
I see a few drawback on this approach:

  • if you need to a global control (to handle multiple visualization at the same time) you will probably use an external control component for that. With that in mind, what is the real benefit of putting the controls within the embeddable itself?
  • The example looks fine, but there could be more advanced controls we want to add, how this will scale? I'm worried about the work that needs to be done to: avoid collisions of controls with the chart/title/other elements, the request of moving the controls on various corners of the embeddable, how to specify those configurations: now it looks just a different aggregation parameter, but in the future it could be: aggregate on a different field, show/hide an average, add a custom threshold line with some input. I feel that having this part of the embeddable just complicate the embeddable nature with a minimal benefit.
    Happy to listening others views

@timductive timductive added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Jan 25, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@timductive timductive added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Jan 25, 2023
@markov00
Copy link
Member

We have discussed this topic internally in the visualization team. Probably a preferable approach is:

  • to combine, as probably works today, an external component to a lens embeddable and let's the external component drives some parameters of the embeddable (type of query, what to show/hide etc)
  • use the embeddable dashboard to connect some controls to the lens embeddable. I don't know how "lightweight" an embeddable dashboard can be, but is a great way to share and simplify the connection between the controls and the visualization

Open to suggestion from @elastic/kibana-presentation team

@ThomThomson
Copy link
Contributor

@markov00, we have been considering doing a universal embeddable variables approach where authors could build and maintain variable connections between configuration / variable type controls on a dashboard and different embeddable configuration options that they would modify. You can check out the initial design discussion in this issue #134706.

If you did want to add some sort of variable configuration to individual embeddables - exposed on the panel, it would likely be best to explore the first option. This is because the Controls are currently set up as data controls, i.e. they are associated with a data view / field.

@ThomThomson
Copy link
Contributor

Closing this for the time being as it looks like the discussion has stalled. In the future, the Presentation team will prioritize Embeddable Variables, which could potentially be used to drive this functionality. We can re-open this & move it to only the Visualizations team if an in-embeddable approach is deemed appropriate.

@ThomThomson ThomThomson closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Long-term goals
Development

No branches or pull requests

6 participants