enterprise icon indicating copy to clipboard operation
enterprise copied to clipboard

Datagrid: Add ability to have an icon on the datagrid header with a tooltip

Open pwpatton opened this issue 2 years ago • 13 comments

Is your feature request related to a problem or use case? Please describe. In landmark we have a new feature for fields called "mouse over text". When a customer defines this text we place an icon next to the fields label. When the user hovers over that icon we build the text (lazily) and display the tooltip. We'd like to be able to have this for datagrid headers as well. Here is an example of it on a form image

Describe the solution you'd like

  • We'd like to be able to place an icon on each header in a datagrid that has our "mouse over text" to work in the same manner. This "mouse over text" should only display when hovering over the icon.
  • Have a beforeOpen callback to be able to lazily build our mouse over text to display in a tooltip.
  • Have the ability to place a class on the header element so we can scope some necessary css changes.

image

A note on the mouse over text feature: it's NOT to be considered help text, and hence no content here is delivered, but just something the customer can configure for "important" fields where they want to have some "instructive" text.

Describe alternatives you've considered

Additional context This is being asked for from Koch And what application do you work on? Landmark

pwpatton avatar May 25 '22 13:05 pwpatton

Related issue is https://github.com/infor-design/enterprise/issues/4596

pwpatton avatar May 25 '22 13:05 pwpatton

Similar to https://github.com/infor-design/enterprise/issues/4596

tmcconechy avatar May 25 '22 13:05 tmcconechy

Question: What if there is a header tooltip already? Can that happen? I.E. how should we integrate this with the tooltips on header?

tmcconechy avatar May 25 '22 16:05 tmcconechy

@tmcconechy I was thinking when we did a mouse over on the icon in the table header we'd see this special "mouse over text". Mouse over anywhere else and see the normal table header tooltip. What do you think?

pwpatton avatar Jun 02 '22 18:06 pwpatton

Yeah i guess thats the only way but i think its bad from a usability standpoint perhaps to have two tooltips for the same small area. Anyway you dont have two tooltips just one or the other?

tmcconechy avatar Jun 02 '22 18:06 tmcconechy

With a callback function lmclient could build the tooltip where we can just combine the column title and the "mouse over text".

The info icon would just be an indicator of extra information?!

image

pwpatton avatar Jun 02 '22 20:06 pwpatton

Kinda like that! - but whats in your header tooltips? Anything or just the header when it is doing the .... thing?

tmcconechy avatar Jun 02 '22 20:06 tmcconechy

Just the header name when it's doing the ... thing. So it seems that we'd take over all tooltip handling in the case of the idea above when we do a beforeTooltip callback.

pwpatton avatar Jun 02 '22 20:06 pwpatton

Ok then i like the solution you suggested...

tmcconechy avatar Jun 02 '22 20:06 tmcconechy

Way i would do this is

  • setting for which icon to show
  • put it between the text and the sort icon (if there/sortable)
  • separate setting for additionalHeaderTooltip text that shows on hover of the icon or on an ellipsis column

tmcconechy avatar Jul 06 '22 16:07 tmcconechy

@tmcconechy @ericangeles which IDS version will this be scheduled for?

vonnyw avatar Jul 28 '22 22:07 vonnyw

4.66 in early August

tmcconechy avatar Jul 29 '22 17:07 tmcconechy

QA tested. When I changed the row height, the label "Product Name" in the tooltip was missing. https://main-enterprise.demo.design.infor.com/components/datagrid/example-header-icon-with-tooltip.html

https://user-images.githubusercontent.com/102151352/182290015-d3ee2b8f-4a8a-465c-bad3-1c1c51ca1e55.mov

glenlieorillo avatar Aug 02 '22 04:08 glenlieorillo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 27 '23 06:07 stale[bot]

This issue should have been closed. It works now on the linked PRs and is now supported

tmcconechy avatar Jul 27 '23 13:07 tmcconechy