Skip to content

[EuiSuggest] Rebuild using EuiSelectable #3733

Closed

Description

@myasonik

The existing EuiSuggest has quite a few a11y shortcomings (see #2404 for the original remediation plan).

Instead of effectively rewriting it from scratch, it should use EuiSelectable to inherit all the a11y work that went into it and to consolidate implementations of similar components.

On top of EuiSelectable, EuiSuggest largely provides:

  1. An opinionated rendering of individual items
  2. Some more states of the search field

I think the EUI team prefers to keep the EuiSuggest component and to wrap EuiSelectable within it but another implementation option is to add a "renderAs" prop (or something along those lines) to EuiSelectable to adjust styling.

Activity

  1. changed the title [-]Rebuild [EuiSuggest] with EuiSelectable[/-] [+][EuiSuggest] Rebuild using EuiSelectable[/+] on Sep 20, 2020
  2. github-actions commented on Mar 20, 2021

    @github-actions

    👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

  3. added
    stale-issue
    on Mar 20, 2021
  4. added and removed
    stale-issue
    on Mar 20, 2021
  5. thompsongl commented on Sep 2, 2021

    @thompsongl
    Contributor

    I've started exploring the conversion to EuiSelectable and the path looks straightforward, but I have questions about the purpose of EuiSuggest. Mainly, it is currently a fully controlled component (i.e., it does not handle filtering the list or managing selected items, but relies on a parent controller to do so). Is this a paradigm we want to continue? Are we converting to EuiSelectable strictly for the a11y benefits? Or is part of using EuiSelectable is to enable its search, filter, and selection features?

    cc// @cchaos

  6. cchaos commented on Sep 2, 2021

    @cchaos
    Contributor

    This one is tricky and I'm honestly not sure if this component is even used anywhere (yet). But my guess is that we'd definitely have to support a mechanism of custom search queries and not just plain text filtering. what we'd probably do is just use the selectable list for rendering the items and keep the search input separate.

  7. thompsongl commented on Sep 2, 2021

    @thompsongl
    Contributor

    what we'd probably do is just use the selectable list for rendering the items and keep the search input separate.

    That's my read as well. I'll probably put up a PR with this type of conversion and we can discuss more there. At the very least it's a step in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions