Skip to content

Use ui-select for index pattern selector#10144

Merged
lukasolson merged 8 commits intoelastic:masterfrom
lukasolson:index-pattern-selector
Mar 31, 2017
Merged

Use ui-select for index pattern selector#10144
lukasolson merged 8 commits intoelastic:masterfrom
lukasolson:index-pattern-selector

Conversation

@lukasolson
Copy link
Copy Markdown
Contributor

@lukasolson lukasolson commented Feb 1, 2017

Closes #7091.

This PR uses the ui-select component for the index pattern selector. This addresses the problem when there is a long list of index patterns that pushes the field list all the way down and makes it simpler to select a new index pattern by allowing the user to quickly filter to the desired pattern.

feb-01-2017 17-01-53

@lukasolson lukasolson added the WIP Work in progress label Feb 1, 2017
@lukasolson lukasolson self-assigned this Feb 1, 2017
@tbragin
Copy link
Copy Markdown
Contributor

tbragin commented Feb 21, 2017

@lukasolson I like this. Is there any work remaining on this? It's marked as "in progress".
@Bargs @weltenwort Thoughts?

@cjcenizal Any reason we couldn't use the same control for selecting metrics in Visualize, which is another big pain point for users with 1000s of fields in an index? #2130

@tbragin tbragin added the Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. label Feb 21, 2017
@weltenwort
Copy link
Copy Markdown
Member

I'm all in favor of auto-completion. There might be some additional aspects to consider though:

  • Does it decrease accessibility compared to a normal drop-down?
  • Can the design be adapted to match the previous style or the kui framework style?

Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

This is BOMB! Much better UI and UX. How many index patterns can be displayed at one time?

Re @weltenwort's questions, this probably does decrease accessibility somewhat, but we already don't have a solid accessibility baseline to work from. So I think we can address this as part of our accessibility initiative. In terms of style, I'm OK with the way the looks for now.

Before

image

After

image

<div class="col-md-2 sidebar-container collapsible-sidebar">
<disc-field-chooser
columns="state.columns"
refresh="refreshFieldList"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, why was this removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It wasn't being used anywhere.

@alexfrancoeur
Copy link
Copy Markdown

@lukasolson can we expect this to be merged for 5.4? also, how re-usable is this component? Is it something @thomasneirynck or @ppisljar could possibly use for #2130?

@xycloud
Copy link
Copy Markdown

xycloud commented Mar 22, 2017

did this feature will be integrated in 5.3?

@ppisljar
Copy link
Copy Markdown
Contributor

@alexfrancoeur should be an low hanging fruit once this is merged

@thomasneirynck
Copy link
Copy Markdown
Contributor

@ppisljar I actually experimented with this ui-select a little earlier yesterday. Tap me for details.

@alexfrancoeur
Copy link
Copy Markdown

@xycloud this feature will unfortunately not make 5.3, but we are trying to get it in as soon as possible!

@alexfrancoeur
Copy link
Copy Markdown

@lukasolson I'm not sure how much control we have over the UI at the moment but the recommended UI/UX from design can be found here. Let's sync when you're back to discuss our options

image

@alexfrancoeur alexfrancoeur mentioned this pull request Mar 27, 2017
@cjcenizal
Copy link
Copy Markdown
Contributor

@lukasolson @alexfrancoeur Please feel free to involve me in this conversation, so I can help answer questions around implementation.

@alexfrancoeur
Copy link
Copy Markdown

@cjcenizal makes sense. I believe @lukasolson has a component in mind already for re-use. Please sync with him on the current component and see if we can make any modifications in the short term that are closer to @snide's design.

@lukasolson
Copy link
Copy Markdown
Contributor Author

I just need to get a corresponding PR to remove some code duplication from X-Pack as a result of moving this component into core Kibana, then get the build passing, then this should be good to go. Hoping to get it done early today.

@lukasolson
Copy link
Copy Markdown
Contributor Author

jenkins test it

@lukasolson lukasolson added review and removed WIP Work in progress labels Mar 29, 2017
@lukasolson lukasolson requested a review from Bargs March 29, 2017 23:55
@lukasolson lukasolson requested a review from ppisljar March 29, 2017 23:55
@lukasolson
Copy link
Copy Markdown
Contributor Author

@Bargs and @ppisljar could you take a quick look? Thanks!

@alexfrancoeur
Copy link
Copy Markdown

alexfrancoeur commented Mar 30, 2017

@lukasolson LGTM. I'd be interested in seeing how this behaves with a large number of index patterns. I don't have any environment where that's the case though.

screen shot 2017-03-30 at 1 28 11 pm

screen shot 2017-03-30 at 1 28 17 pm

Copy link
Copy Markdown
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

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

❤️❤️❤️ This is fantastic

Left one idea inline, and I have one other minor nit: can we increase the max height of the select box? While the search is perfect when you know what you're looking for, the small size of the box will hurt the scan-ability of the list when browsing.

{{$select.selected}}
</ui-select-match>
<ui-select-choices repeat="id in indexPatternList | filter:$select.search | orderBy">
<div ng-bind-html="id"></div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tried enabling the highlighting feature and I kinda dig it, what do you think?

screen shot 2017-03-30 at 6 07 19 pm

I just changed this line to: <div ng-bind-html="id | highlight: $select.search"></div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

yesss @Bargs I dig it!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Bargs I'm not quite sure I understand your comment about increasing the max-height. Do you mean of the select input, or the options list, or what? Also, I've added the highlighting, good call. :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean the options list is too small on my giant screen. I wanna see more options at once! For instance I probably shouldn't need to scroll in the screenshot below:

screen shot 2017-03-30 at 5 49 19 pm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Premature merge?? :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Bargs Ahh, I see what you're saying. Do you think we should increase the max height for all ui-select components or just this one for now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also, sorry about the premature merge, I forgot about this last item and got a couple of other LGTMs so I got trigger happy.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Haha no worries. I think maybe just this one should be taller, since it might be dependent on where the select box shows up on the page? I'm not sure, I guess I'd have to see how it looks in other areas where it might be used.

Copy link
Copy Markdown
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasolson
Copy link
Copy Markdown
Contributor Author

jenkins test it

@lukasolson lukasolson merged commit d15f52c into elastic:master Mar 31, 2017
lukasolson added a commit that referenced this pull request Mar 31, 2017
* Replace index pattern selector with ui-select

* Show index patterns in alphabetical order

* Add highlighting to select
@lukasolson
Copy link
Copy Markdown
Contributor Author

Backported to 5.x (5.4) in 5620116.

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

Labels

review Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v5.4.0 v6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants