Tradeshift / tradeshift-ui

The Tradeshift UI Library & Framework
https://ui.tradeshift.com
Other
33 stars 45 forks source link

[Table] text-overflowed cells should have a tooltip to show the full text #543

Open Chris-Xie opened 6 years ago

Chris-Xie commented 6 years ago

Choose the section that applies to you and use the template to help us figure out how we can help you.


Bug report

Tradeshift UI version affected

v9.2.0

Expected Behavior

It would be nice to have a tooltip (can be easily implemented with a title attribute) showing the full text when you mouse over that cell that have text clipped.

Actual Behavior

Steps to reproduce

Screenshots (optional)

screen shot 2018-02-23 at 10 09 51

Feature request

Description of feature

Example use cases and/or Prototype links

Designs and/or Prototype screenshots

wiredearp commented 6 years ago

Good idea - even if it is unfortunately very expensive to detect, whether or not the cell actually has overflow (ellipsis is present). With some luck, we already read the involved properties offsetWidth and scrollWidth somewhere in the code and then this calculation can be made "for free". If not, perhaps we can simply perform the calculation once the mouse is detected to hover above the cell for a given time; although in that case we cannot use a simple title attribute, since it will at that point be too late to trigger that (one can imagine). Anyways, thanks for the request!