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

Add header_tooltips parameter to Tabulator #7241

Merged
merged 6 commits into from
Sep 9, 2024
Merged

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Sep 9, 2024

Fixes #4138

First, by adding the header_tooltip parameter. Secondly, by not overwriting an users column configuration.

import pandas as pd
import panel as pn

pn.extension("tabulator")
df = pd.DataFrame({"int": [1, 2, 3], "header": [True, False, True]})
tabulator = pn.widgets.Tabulator(df, header_tooltips={"header": "Test"}).servable()
tabulator = pn.widgets.Tabulator(df, configuration={"columns": [{"field": "header", "headerTooltip": True}]}).servable()

image

To do:

  • Add unit test for not overwriting users column configuration
  • Add UI test for header tooltip
  • Update notebook

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.24%. Comparing base (2283d14) to head (5c9be17).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
panel/tests/ui/widgets/test_tabulator.py 66.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7241      +/-   ##
==========================================
+ Coverage   82.22%   82.24%   +0.01%     
==========================================
  Files         337      337              
  Lines       50228    50251      +23     
==========================================
+ Hits        41302    41327      +25     
+ Misses       8926     8924       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit 0453e9c into main Sep 9, 2024
16 checks passed
@philippjfr philippjfr deleted the tooltip_tabulator branch September 9, 2024 12:24
expect(header).to_have_count(1)
header.hover()

page.wait_for_timeout(200)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this actually needed, expect should wait.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for the hover part not the expect part. The mouse is moved to the header with hover.

hoxbro added a commit that referenced this pull request Sep 12, 2024
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

Successfully merging this pull request may close these issues.

Tabulator add support for column header tooltip
2 participants