Graylog2 / Graylog2/graylog2-server

Unify implemented selects

Open
#7,233 0 comments 0 reactions 0 assignees View on GitHub
frontend improvement triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

Similarly to https://github.com/Graylog2/graylog2-server/issues/7229, we currently have several differences on how React Select components are used:

- `components/common/Select`:
- This is our common `Select` component wrapper
- Has common styling
- Has some logic around multiple select components
- Has compatibility layer between React Select v1 and v2

- `views/components/Select`:
- The aggregation builder required some specific React Select behaviour that lead to creating a new common `Select` wrapper for that
- Also has some common behaviour and styling in there

- `react-select`:
- Some components (`NumberVisualizationConfiguration`, `SortDirectionSelect`, and `SortSelect`) don't use any of the above, but React Select directly

Having different ways of using `Select` components is not bad if we have good reasons for doing it, but it adds some additional cognitive load, since naming is very similar and it's easy to mix-up different APIs and/or forget to replicate some behaviour in one of the components.

We should re-evaluate if we can unify or at least create common wrappers for all the use cases we have, so we can provide a more consistent experience and also isolate single components from upstream changes.

- Graylog Version: 3.2.0-beta.4-SNAPSHOT

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.