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

[Discover] Field list should wrap long field names instead of truncating #69814

Closed
wylieconlon opened this issue Jun 24, 2020 · 2 comments · Fixed by #71312
Closed

[Discover] Field list should wrap long field names instead of truncating #69814

wylieconlon opened this issue Jun 24, 2020 · 2 comments · Fixed by #71312
Assignees
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@wylieconlon
Copy link
Contributor

There are other issues about making the design of the field list more similar in Discover and Lens, and this is one of the elements that has bothered me the most. The field list in Discover is truncated, making it hard to read the field names:

Screenshot 2020-06-24 11 28 47

Compared to Lens, which breaks onto multiple lines on the dots:

Screenshot 2020-06-24 11 29 22

The way this works in Lens is that we've implemented a custom function to insert special characters into the title, which will tell browsers to wrap on dots in particular:

function wrapOnDot(str?: string) {
  // u200B is a non-width white-space character, which allows
  // the browser to efficiently word-wrap right after the dot
  // without us having to draw a lot of extra DOM elements, etc
  return str ? str.replace(/\./g, '.\u200B') : '';
}

Related issues: #68206

cc @kertal

@wylieconlon wylieconlon added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Jun 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@kertal
Copy link
Member

kertal commented Jun 24, 2020

cc @andreadelrio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants