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

[Input controls] Replace react-select with EuiComboBox #17452

Merged
merged 17 commits into from
May 8, 2018

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Mar 29, 2018

fixes #15247 and #17853

Replaces react-select with EuiComboBox.

react-select option menu is nested under the component. This meant that the menu got clipped by the panel unless overflow: visible was set. Setting overflow: visible caused the problems highlighted by #15247.

EuiComboBox uses portal to attach the options menu to the body element. This allows the menu to avoid getting clipped by the dashboard panel.

Additional refactoring was required because react-select represents the list of selected values as a comma delimited string while EuiComboBox represents the list of selected values an array of objects.

Updated August 20th 2018
EuiComboBox also has proper support for dark-theme

@nreese nreese added WIP Work in progress Feature:Input Control Input controls visualization labels Mar 29, 2018
@nreese nreese mentioned this pull request Mar 29, 2018
20 tasks
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@trevan
Copy link
Contributor

trevan commented Apr 10, 2018

With a lot of fields, this is really slow. I created an index pattern without about 3000 fields and typing the first letter took over a second before it displayed the letter.

Also, could you sort the fields so that the items that start with the entered text are at the top? The field list in the terms aggregation does this. It uses https://github.com/elastic/kibana/blob/master/src/ui/public/utils/sort_prefix_first.js to do the sorting.

@cjcenizal
Copy link
Contributor

cjcenizal commented Apr 10, 2018

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese nreese added release_note:fix and removed WIP Work in progress labels Apr 27, 2018
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤸‍♀️

* Extract filtering value from kibana filters
*
* @param {object} kbnFilter
* @return {array of strings} array of values pulled from filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, jsdoc is :

@return {Array.<string>}

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit e3841ea into elastic:master May 8, 2018
nreese added a commit to nreese/kibana that referenced this pull request May 8, 2018
* replace react-select with EuiComboBox

* remove constructor for ListControl component

* get working with portal version

* remove overflow visible from input_control_vis since its no longer needed

* convert index pattern select to EuiComboBox

* replace react-select with EuiComboBox for field select

* group fields by type

* remove esvm

* remove on-foxus box around input cursor

* fix jest tests

* remove broken jest test

* fix functional tests

* review changes

* remove componentWillMount from field_select

* update snapshot changed from rebasing and getting new EUI version

* use combo box clear and close buttons for clearing and closing

* jsdoc syntax fix
nreese added a commit that referenced this pull request May 8, 2018
* replace react-select with EuiComboBox

* remove constructor for ListControl component

* get working with portal version

* remove overflow visible from input_control_vis since its no longer needed

* convert index pattern select to EuiComboBox

* replace react-select with EuiComboBox for field select

* group fields by type

* remove esvm

* remove on-foxus box around input cursor

* fix jest tests

* remove broken jest test

* fix functional tests

* review changes

* remove componentWillMount from field_select

* update snapshot changed from rebasing and getting new EUI version

* use combo box clear and close buttons for clearing and closing

* jsdoc syntax fix
@nreese nreese deleted the EuiComboBox branch July 18, 2018 16:05
@elasticmachine
Copy link
Contributor

💔 Build Failed

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

Successfully merging this pull request may close these issues.

Minimum size for Dashboard container does not encompass the Input Control buttons
6 participants