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

[Dashboards] give embeddable a say in panel dimensions #136995

Closed
drewdaemon opened this issue Jul 22, 2022 · 6 comments
Closed

[Dashboards] give embeddable a say in panel dimensions #136995

drewdaemon opened this issue Jul 22, 2022 · 6 comments
Labels
Feature:Dashboard Dashboard related features impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@drewdaemon
Copy link
Contributor

drewdaemon commented Jul 22, 2022

Describe the feature:
Giving embeddables power to inform the containing panel's dimensions. The embeddable could supply

  • hard constraints such as an aspect ratio
  • softer suggestions such as initial panel dimensions that can be overridden by the user

This could improve both appearance and accessibility. For example, if the Lens metric is created with the default panel size today, there is a great deal of distance between the label and the data. This is not true to the intent of the design and makes comprehension harder, especially for visually-impaired users.

#136567 adds a new API for embeddables to inform the panel of display preferences. This could be extended to panel dimensions.

Describe a specific use case for the feature:
Lens visualizations can look very wonky if they are at the wrong aspect ratio. This feature would

  • allow the Lens embeddable to guide dashboard users toward the optimal visual appearance of a chart
  • allow us to introduce dimensional parity between what users see in the Lens editor and on a dashboard

Related to #136993

@drewdaemon drewdaemon added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Jul 22, 2022
@elasticmachine
Copy link
Contributor

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

@ThomThomson ThomThomson added loe:medium Medium Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Jul 25, 2022
@drewdaemon
Copy link
Contributor Author

Related to #136993

@ninoslavmiskovic
Copy link
Contributor

I could not agree more on this issue. 👍🏻

We should guide the users.

Skaermoptagelse.2023-08-08.kl.15.56.37.mov

@cqliu1
Copy link
Contributor

cqliu1 commented Mar 14, 2024

Closing because embeddables can set their initial dimensions, but we don't want to set hard restrictions on panel size so our authors have the freedom to make any layout they choose.

RE: 1x1 panels, we want to increase the minimum dimensions allowed for a panel to avoid this situation: #144753 and we will address this as part of our new layout engine work.

@cqliu1 cqliu1 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
@drewdaemon
Copy link
Contributor Author

because embeddables can set their initial dimensions

@cqliu1 could you please provide specifics on this existing capability?

@ThomThomson
Copy link
Contributor

ThomThomson commented Mar 14, 2024

@drewdaemon embeddable factories can add a getPanelPlacementSettings function which takes an input and returns initial panel placement settings. You can see an implementation of this in src/plugins/links/public/embeddable/links_embeddable_factory.ts.

The API may change in the new Embeddable system, but the base concept / capability will remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

5 participants