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

tooltip redesign #6188

Merged
merged 4 commits into from
Feb 11, 2016
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/ui/public/agg_response/geo_json/_tooltip.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<table>
<tbody>
<tr ng-repeat="detail in details" >
<td><b>{{detail.label}}</b></td>
<td>{{detail.value}}</td>
<td class="tooltip-label"><b>{{detail.label}}</b></td>
<td class="tooltip-value">{{detail.value}}</td>
</tr>
</tbody>
</table>
6 changes: 3 additions & 3 deletions src/ui/public/agg_response/hierarchical/_tooltip.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<table>
<thead>
<tr>
<tr class="tooltip-label">
<th>field</th>
<th>value</th>
<th>{{metricCol.label}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in rows track by $index">
<tr class="tooltip-value" ng-repeat="row in rows track by $index">
<td><span ng-bind-html="row.spacer"></span>{{row.field}}</td>
<td class="row-bucket">{{row.bucket}}</td>
<td>{{row.metric}}</td>
</tr>
</tbody>
</table>
</table>
6 changes: 3 additions & 3 deletions src/ui/public/agg_response/point_series/_tooltip.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<table>
<tbody>
<tr ng-repeat="detail in details" >
<td><b>{{detail.label}}</b></td>
<td>
<td class="tooltip-label"><b>{{detail.label}}</b></td>
<td class="tooltip-value">
{{detail.value}}
<span ng-if="detail.percent"> ({{detail.percent}})</span>
</td>
</tr>
</tbody>
</table>
</table>
4 changes: 2 additions & 2 deletions src/ui/public/styles/variables/bootstrap-mods.less
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@
//** Tooltip text color
@tooltip-color: @white;
//** Tooltip background color
@tooltip-bg: rgba(0,0,0,.9);
@tooltip-opacity: .9;
@tooltip-bg: rgba(0,0,0,.8);
@tooltip-opacity: .8;
//** Tooltip arrow color
@tooltip-arrow-color: @tooltip-bg;

Expand Down
20 changes: 2 additions & 18 deletions src/ui/public/vislib/styles/_tilemap.less
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@

.leaflet-popup-content {
margin: 0 !important;
line-height: 1.1 !important;
font-size: 12px;
line-height: 24px !important;
font-size: @font-size-base;
font-weight: normal;
word-wrap: break-word;
overflow: hidden;
Expand All @@ -115,22 +115,6 @@
word-break: break-all;
}
}

// if there is a header, give it a border that matches
// those in the body
thead tr {
border-bottom: 1px solid;
border-bottom-color: @tilemap-leaflet-popup-border;
}

// only apply to tr in the body, not the header
tbody tr {
border-top: 1px solid;
border-top-color: @tilemap-leaflet-popup-border;
&:first-child {
border-top: none;
}
}
}
}

Expand Down
32 changes: 15 additions & 17 deletions src/ui/public/vislib/styles/_tooltip.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@import (reference) "~ui/styles/variables";

@semi-bold: 600;

.vis-tooltip,
.vis-tooltip-sizing-clone {
visibility: hidden;
line-height: 1.1;
font-size: 12px;
font-size: @font-size-base;
font-weight: normal;
background: @tooltip-bg;
color: @tooltip-color;
Expand All @@ -24,6 +26,18 @@
margin: @tooltip-space @tooltip-space 0;
}

.tooltip-label {
font-family: @font-family-sans-serif;

th {
font-weight: @semi-bold;
}
}

.tooltip-value {
font-family: @font-family-sans-serif;
}

table {
td,th {
padding: @tooltip-space-tight;
Expand All @@ -32,22 +46,6 @@
word-break: break-all;
}
}

// if there is a header, give it a border that matches
// those in the body
thead tr {
border-bottom: 1px solid;
border-bottom-color: @tooltip-table-border;
}

// only apply to tr in the body, not the header
tbody tr {
border-top: 1px solid;
border-top-color: @tooltip-table-border;
&:first-child {
border-top: none;
}
}
}
}

Expand Down