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

Show long index pattern names in selector #11907

Merged
merged 1 commit into from
May 18, 2017

Conversation

lukasolson
Copy link
Member

Fixes #11870.

This PR simply adjusts the size of the index pattern selection choices to automatically scale based on the content rather than be a fixed width.

@lukasolson lukasolson self-assigned this May 18, 2017
@Bargs
Copy link
Contributor

Bargs commented May 18, 2017

This would be an improvement over the current situation, but it's not really a cure all. Very long index names will still get cut off (see screenshot below). That's probably less contrived than it sounds if we start allowing comma delimited index patterns. More importantly, we're using uiSelect in more than one place now and this only solves the issue in Discover. In other areas it may be less ridiculous to have longer values.

I wouldn't be against merging this as a quick fix if a more universal solution is harder than it seems, but I don't think we should close the issue until we have a solution that works everywhere.

screen shot 2017-05-18 at 4 06 05 pm

Copy link
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.

LGTM. I agree with Matt's concerns about the use of this component elsewhere. I think the best solution might be to replace ui-select with our own React component. This would give us control over both the visual design and the behavior (e.g. how to handle long field values). We would then have the ability to evolve this component over time to meet new needs.

@lukasolson
Copy link
Member Author

This change doesn't preclude making a larger fix as discussed in the other issues, it simply provides an extremely quick fix that addresses probably 95% of the problem discussed in the issue. It also fixes the problem without additionally requiring a hover pop-up which seems worse than just displaying the actual value, unless absolutely necessary. But that's just my opinion. 😄

@lukasolson lukasolson merged commit 8b3a2d5 into elastic:master May 18, 2017
lukasolson added a commit that referenced this pull request May 18, 2017
lukasolson added a commit that referenced this pull request May 18, 2017
@lukasolson
Copy link
Member Author

Backported to 5.x (5.5.0) in 5020e03.
Backported to 5.4 (5.4.1) in 9751d33.

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.

Discover tab: displaying long index names in the index pattern select control
3 participants