Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 2 additions & 31 deletions src/datajoint/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def repr_html(query_expression):
rel = query_expression.proj(*heading.non_blobs)
# Object fields use codecs - not specially handled in simplified model
object_fields = []
info = heading.table_status
tuples = rel.to_arrays(limit=config["display.limit"] + 1)
has_more = len(tuples) > config["display.limit"]
tuples = tuples[0 : config["display.limit"]]
Expand Down Expand Up @@ -155,22 +154,6 @@ def get_html_display_value(tup, name, idx):
background: #f3f1ff;
color: #000000;
}
/* Tooltip container */
.djtooltip {
}
/* Tooltip text */
.djtooltip .djtooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
/* Position the tooltip text - see examples below! */
position: absolute;
z-index: 1;
}
#primary {
font-weight: bold;
color: black;
Expand All @@ -180,11 +163,6 @@ def get_html_display_value(tup, name, idx):
color: white;
}

/* Show the tooltip text when you mouse over the tooltip container */
.djtooltip:hover .djtooltiptext {
visibility: visible;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
.Table th{
Expand All @@ -201,10 +179,6 @@ def get_html_display_value(tup, name, idx):
background: #3d3d3d;
color: #e0e0e0;
}
.djtooltip .djtooltiptext {
background-color: #555555;
color: #ffffff;
}
#primary {
color: #bd93f9;
}
Expand All @@ -214,10 +188,7 @@ def get_html_display_value(tup, name, idx):
}
</style>
"""
head_template = """<div class="djtooltip">
<p id="{primary}">{column}</p>
<span class="djtooltiptext">{comment}</span>
</div>"""
head_template = """<span id="{primary}" title="{comment}">{column}</span>"""
return """
{css}
{title}
Expand All @@ -230,7 +201,7 @@ def get_html_display_value(tup, name, idx):
{count}</div>
""".format(
css=css,
title="" if info is None else "<b>%s</b>" % info["comment"],
title="", # Table comment not shown in preview; available via describe()
head="</th><th>".join(
head_template.format(
column=c,
Expand Down
Loading