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

Panel overflows #13982

Closed
nreese opened this issue Sep 13, 2017 · 3 comments
Closed

Panel overflows #13982

nreese opened this issue Sep 13, 2017 · 3 comments
Labels
discuss Feature:Input Control Input controls visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@nreese
Copy link
Contributor

nreese commented Sep 13, 2017

Placing forms inside of a grid layout can cause usability problems. There are two main problems whose solutions conflict with one another.

  1. Form pop-ups - Need to overflow panel and be on-top of neighbor panels.
  2. Form overflowing the panel size - Need to stay within the panel.
    • Solutions
      1. scrolling - not recommended because buttons and inputs are not displayed
      2. don't allow panel to be smaller than form dimensions.
    • What happens when form size changes with interaction. For example, a multiselect shows the selected items. As more items are selected, the multiselect grows in height to show all selections.
@stacey-gammon
Copy link
Contributor

Here is a visual to show how 1. Need to overflow panel and be on-top of neighbor panels is important:

screen shot 2017-09-13 at 8 46 29 pm

It's a really bad UX with input controls to not show this pop up above everything else.

The problem is that accomplishing this is actually pretty tricky. The easiest way to do this is to override the visualize css and set the overflow to visible, along with some z-index tweaks.

The downside to this approach is that it causes the input panel overflow contents to also be visible. Causing this:
screen shot 2017-09-12 at 9 39 45 am

This is a bad UX also.

However, we think that scrollable forms are bad UX, so maybe if we can prevent the panel from being sized smaller than the panel contents, we could get this to work?

We'd have to do a few things:

  • Ensure the height won't change in view mode. It's currently possible:

screen shot 2017-09-13 at 8 44 49 pm

  • Ensure panels can't be resized smaller than embeddable contents. We'd probably have to come up with some API to offer to the embeddable. Also not super easy.

  • Also, what would happen if you have an input control on a variety of dashboards. You go edit that panel and add an extra control. If we went with this minimum height route, it would change the layout of every dashboard with that control. Maybe this is acceptable? But it could be unexpected as well.

There is possibly another option, which we haven't really explored, and is pretty hacky, which is to somehow mount just the pop up portion of the control outside the visualization.

So there are quite a few UX issues here that aren't easy to solve technically. We wanted this issue filed so we could keep track of them. Our plan right now is to submit the input controls PR with the overflow issue. Since it's experimental, we have a little extra leeway with known bugs. Then we'll submit the gridster -> react PR. This actually has a similar, but much easier to solve problem, due to the fact that the pop up is outside the embeddable.
screen shot 2017-09-13 at 8 24 30 pm

Then we'll go back and try to find a decent fix for this control. We just want to make sure we don't end up finding something that works with gridster, just to have to rework it when react gets here.

@nreese
Copy link
Contributor Author

nreese commented Sep 14, 2017

Tooltips provide an example of solving the problem by moving the overflowed element out of the visualization. Tooltips are implemented with a div element attached to the body with the class vis-tooltip. When the user hovers over something that requires a tooltip, the div is made visible and the position is fixed to the mouse location.

screen shot 2017-09-13 at 8 00 16 pm

This type of solution would be much more difficult to implement in this case since the menu must align with the input to appear as a single element.

The menu is a react component from react-select. The menu is rendered here. Interestingly, there is a fork that attempts to do what we are trying. That implementation adds an additional prop, dropdownComponent . The menu is passed as a child to the component specified by dropdownComponent.

@cchaos
Copy link
Contributor

cchaos commented Feb 2, 2019

This is solved now by using EUI (which uses portals).

screen shot 2019-02-01 at 20 46 58 pm

@cchaos cchaos closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:Input Control Input controls visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants