Create indexing-restrictions component

What does this MR do and why?

This creates the indexing-restrictions component which will replace the current select2-based selector in the admin ElasticSearch indexing restrictions settings.

This new component leverages GlCollapsibleListbox to fetch and present available index entities. Selected entities are displayed in a scrollable list below the selector and can be removed from there. A hidden input is kept in sync with the selection.

For the sake of keeping the changes small, this only introduces the components and their tests. We'll actually use them in a follow-up.

Screenshots or screen recordings

Screenshots taken from !108624 (merged).

Before After
Screenshot_2023-01-11_at_8.35.49_AM Screenshot_2023-01-11_at_8.47.13_AM
With many items selected
Screenshot_2023-01-11_at_8.47.35_AM
With long entity names
Screenshot_2023-01-11_at_8.48.03_AM

How to set up and validate locally

  1. Checkout 374018-indexing-restrictions-select2 (!108624 (merged)).
  2. Navigate to Admin Area > Settings > Advanced Search > Elasticsearch indexing restrictions (http://gdk.test:3000/admin/application_settings/advanced_search#js-elasticsearch-settings)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #374018 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading