Skip to content

Truncate long names in the discover index pattern selection - #15510

Merged
Bargs merged 1 commit into
elastic:masterfrom
Bargs:fixOverflow
Dec 15, 2017
Merged

Bargs merged 1 commit into
elastic:masterfrom
Bargs:fixOverflow

Conversation

@Bargs

@Bargs Bargs commented Dec 8, 2017

Copy link
Copy Markdown
Contributor

Fixes #15364

Hides overflow and adds ellipsis.

screen shot 2017-12-08 at 3 33 12 pm

@lukasolson lukasolson left a comment

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.

Instead of adding custom CSS here you could follow the same pattern that the filter editor uses and change the markup from this

      <ui-select-match>
          {{$select.selected.get('title')}}
      </ui-select-match>

to this

      <ui-select-match>
        <span
          class="uiSelectMatch--ellipsis"
          tooltip="{{$select.selected.get('title')}}"
        >
          {{$select.selected.get('title')}}
        </span>
      </ui-select-match>

This has the added benefit of adding the tooltip when it overflows the content so you can still see what you've got selected if you hover over it.

@Bargs

Bargs commented Dec 11, 2017

Copy link
Copy Markdown
Contributor Author

@lukasolson Great idea, updated.

<span
class="uiSelectMatch--ellipsis"
tooltip="{{$select.selected.get('title')}}"
tooltip-append-to-body="true"

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.

Had to append to body otherwise the left nav would overlap the tooltip.

@lukasolson lukasolson left a comment

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.

LGTM! Thanks for moving that CSS style.

@jimgoodwin jimgoodwin removed the v6.0.2 label Dec 13, 2017
@Bargs Bargs removed the v6.1.1 label Dec 15, 2017
@Bargs
Bargs merged commit 7f39cc8 into elastic:master Dec 15, 2017
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
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.

3 participants