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

Tooltips in EuiBasicTable headers #20663

Closed
sorenlouv opened this issue Jul 11, 2018 · 8 comments
Closed

Tooltips in EuiBasicTable headers #20663

sorenlouv opened this issue Jul 11, 2018 · 8 comments
Assignees

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Jul 11, 2018

With KUI Tables it was possible to add tooltips to the header cells. This is useful since some columns need to be explained to the user. In APM we have a column called "Impact" with a tooltip saying: Impact shows the most used and slowest endpoints in your service.
screen shot 2018-06-29 at 17 09 11

Implementation
Option A) EuiBasicTable currently only support strings as name. By allowing allowing custom elements like, it would be possible to customize the header in a very flexible way:

{
  field: 'impact',
  name: (
    <div>Impact <EuiToolTip content="Help text"/></div>
  ),
  sortable: true,
  dataType: 'number'
}

Option B) Another option is to keep the name field limited to strings, but introduce a tooltip field:

{
  field: 'impact',
  name: 'Impact',
  tooltip: 'Impact shows the most used and slowest endpoints in your service.',
  sortable: true,
  dataType: 'number'
}

The advantage of A is that it is very flexible and allows for many use cases that EUI doesn't have to specifically implement. The disadvantage is that it can reduce the consistency of tables across Kibana.

The advantage of B is that it will make it very easy to add tooltips, and it enforces the consistency of Kibana. The disadvantage is that is not very flexible.

Personally I'm learning more towards B. it seems like a generic feature that many would benefit from having in a standardized way.

@sorenlouv sorenlouv added the Team:APM All issues that need APM UI Team support label Jul 11, 2018
@elastic elastic deleted a comment from elasticmachine Jul 11, 2018
@chandlerprall
Copy link
Contributor

@cchaos you've mentioned before that maybe we should build in specific support for table header tooltips. Any thoughts here?

@cchaos
Copy link
Contributor

cchaos commented Jul 11, 2018

I've talked about needing to add title attributes to headers in case they truncate, but I think this issue is referring to be able to pass in a node type with the table header data instead of only accepting a string value.

I know the final EuiTableHeaderCell accepts it's children as a node type, so it's EuiBasicTable that needs to be able to accept a node in the name field.

@sorenlouv
Copy link
Member Author

I think this issue is referring to be able to pass in a node type with the table header data instead of only accepting a string value.

Yes, either that or ability to specify a string that will be displayed as a tooltip. Do you have any preference between the two?

@sorenlouv
Copy link
Member Author

sorenlouv commented Jul 11, 2018

Wow. I just realized now that I created this in kibana instead of eui. Brainfart! I'll move it over...

@sorenlouv
Copy link
Member Author

sorenlouv commented Jul 11, 2018

Moved to elastic/eui#1002

@cchaos
Copy link
Contributor

cchaos commented Jul 11, 2018

Allowing nodes is the most flexible, as you mentioned. I would vote for that solution.

@cchaos
Copy link
Contributor

cchaos commented Jul 11, 2018

Oops, page didn't fully refresh. I'll move over to the EUI issue.

@sorenlouv
Copy link
Member Author

@alvarolobato Did you reopen this on purpose, or is it Zube doing funny things?

@chrissuen chrissuen reopened this Jul 20, 2018
@axw axw closed this as completed Jul 20, 2018
@alvarolobato alvarolobato removed Team:APM All issues that need APM UI Team support [zube]: Done labels Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants