-
Notifications
You must be signed in to change notification settings - Fork 371
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
Put longer type into th title argument in HTML show #2774
Conversation
The test failures are coming from the string comparisons of the |
@@ -195,10 +199,15 @@ function _show(io::IO, ::MIME"text/html", df::AbstractDataFrame; | |||
if eltypes | |||
write(io, "<tr>") | |||
write(io, "<th></th>") | |||
ct = batch_compacttype(Any[eltype(df[!, idx]) for idx in 1:mxcol]) | |||
# We put a longer string for the type into the title argument of the <th> element, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is OK
Looks very good. Thank you! @ronisbr - it would be good to have it in PrettyTables.jl also. CC @nalimilan |
This feature is awesome! I will add an option into PrettyTables.jl to create comments for each HTML cell. Thus, the packages can use it as they like. |
After a bit of whack-a-mole, I think I got all the tests fixed 🙂 |
@nalimilan - can you please have a quick look before I merge (there is a small code layout fix that I asked but it does not affect the solution). Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! That's especially useful to explain that T?
means Union{T, Missing}
.
@mortenpi - I have pushed a NEWS.md entry for your PR. Please let me know if it is OK. Then I will merge. Thank you! |
LGTM! |
Thank you! |
Adds a
title
argument to the types in the HTML output, so that we would get the full type (up to 256 characters) when hovering over the shortened type with a mouse: