wave icon indicating copy to clipboard operation
wave copied to clipboard

Column wise tooltip for table

Open shamilh2o opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe

Need to give a description about the values in a particular column when hover on top of the column name.

Describe the solution you'd like

I would like to have a feature to show a tooltip for each column name instead of having a single tooltip for the entire table. Something like shown below, image

Describe alternatives you've considered

Tried to use the tooltip which already has for the entire table to convey the message. But that is not efficient when it come to the application.

Additional context

Discussion https://github.com/h2oai/wave/discussions/1784

shamilh2o avatar Jan 11 '23 12:01 shamilh2o

Hi, I'm trying to work on this issue as a first time contributor. To my understanding, we want to be able to add an argument 'tooltip' when creating a column such as:

  page['example'] = ui.form_card(box='1 1 3 3', items=[
      ui.table(
          name='table',
          columns=[
              ui.table_column(name='name', label='Name'),
              ui.table_column(name='value', label='Value', tooltip="tooltip for column name value"),
          ], 
          rows=[
              ui.table_row(name='row1', cells=['item0', 0]),
              ui.table_row(name='row2', cells=['item1', 1]),
              ui.table_row(name='row3', cells=['item2', 2]),
          ],
          tooltip="tooltip for entire table"
      )
  ])

which should create a table like this: Screenshot from 2023-03-31 16-17-29

Initially, I tried to edit an additional tooltip property into the table_column in ui.py and the interface TableColumn in the table.tsx so that the user can specify an argument; then change how the header is rendered in table.tsx; however I discovered that types.py is generated and I cannot modify h2o_wave.types.TableColumn. How should I approach this issue? Thanks in advance

yy30537 avatar Mar 31 '23 14:03 yy30537

Hey @yy30537, super sorry for the late reply, but Github didn't send me the notification.

As you correctly pointed out, types.py etc. are generated. You can generate them (along with bunch of other stuff) by running make generate in the root project. See our contributing guide to learn more.

mturoci avatar Jun 26 '23 13:06 mturoci

Hey I have worked on around 7-8 company based project, but never countribute to open source this is my first time can you assign me this task.

Gingaaa avatar Aug 20 '23 19:08 Gingaaa

Go ahead @Gingaaa. No assignment necessary :)

mturoci avatar Aug 21 '23 06:08 mturoci

Hey! @mturoci I would like to work on this issue if nobody is working yet.

vaiishnavii avatar May 22 '24 19:05 vaiishnavii

Go ahead @vaiishnavii. No need to ask upfront :)

mturoci avatar May 23 '24 06:05 mturoci