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

[Fleet] Update usage of EuiComboBox #99878

Closed
hbharding opened this issue May 12, 2021 · 3 comments
Closed

[Fleet] Update usage of EuiComboBox #99878

hbharding opened this issue May 12, 2021 · 3 comments
Assignees
Labels
enhancement New value added to drive a business result Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@hbharding
Copy link
Contributor

hbharding commented May 12, 2021

Background

Per #99018, there are several places in Fleet / Integrations UI where our usage of EuiComboBox is problematic for a few reasons:

  • It is difficult to edit values. If users need to change just a small part of the value, they'll need to delete the entire value and retype it.
  • Users can't copy the values because selecting the text causes the input to enter a :focus state. Small point, but this can be frustrating.
  • The text is small and can be hard to read. For longer values, the text truncates and the full value cannot be seen.
  • The order of the values has significance, and there is no way to change the order without deleting values and retyping.

EuiComboBox appears in Fleet Settings for Fleet Server hosts and Elasticsearch hosts as well as the Edit Integration pages for fields that accept multiple values. The task for this issue is to update our usage with a new pattern that was created in the design issue linked above.

See screenshots of current usage

Fleet Settings
image

Edit Integration page
image

Proposed Solution

Figma file
Figma prototype

Kapture 2021-05-10 at 10 37 47

The new pattern uses a traditional text input with a button, "add row", which allows users to specify additional inputs. When multiple inputs exist, an "x" button icon appears on the right side of the input which allows users to remove the input. Additionally, when the order of the values is important, a "drag" icon can appear on the left side which allows users to rearrange the order via drag and drop interaction. Assuming we develop this is as shared component, I imagine it will have some of the following props:

  • compressed -> boolean (changes the size of the input)
  • sortable -> boolean (determines whether the inputs can be dragged and rearranged)
  • label -> string (the name of the input group, i.e. "Fleet Server hosts" or "Paths")
  • helpText -> ReactNode (for help text and links to more information)

Additional notes:

  • See screenshots below + Figma file for spacing considerations.
  • Use EuiEmptyButton size="xs" flush="left" for the "add row" button
  • Form validation should place a message below the associated text input (example shown in GIF above).

Fleet Settings
image

  • Unrelated to this component / pattern, but the flyout should now use EuiPanels to segment the different sections of the of flyout.
  • Fleet Settings should use the sortable option so users can control the order of the values with drag and drop.
  • The inputs should use the compressed size
  • Help text appears above the form input. Use EuiText size="xs" color="subdued"
  • To match the style of the label, you can mimic EuiText size="xs" with an <h4>

Edit Integration Page
image

  • The inputs should use the default size (not compressed)
  • Help text isn't necessary here since it is already provided by the 2 column described form group
@hbharding hbharding added the Team:Fleet Team label for Observability Data Collection Fleet team label May 12, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@hbharding hbharding changed the title [Fleet] Update usage of EuiComboBoxs [Fleet] Update usage of EuiComboBox May 12, 2021
@jen-huang jen-huang added the enhancement New value added to drive a business result label May 12, 2021
@jen-huang
Copy link
Contributor

@nchaulet I thought you might be interested in looking at this per our discussion about more UI work :)

@jen-huang
Copy link
Contributor

Closing as PRs were merged.

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 Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

4 participants