File tree Expand file tree Collapse file tree 3 files changed +62
-1
lines changed Expand file tree Collapse file tree 3 files changed +62
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,13 @@ <h2>
135
135
{ { #filters} }
136
136
< input type = "checkbox" name = "{{ key }}" id = "{{ key }}" { { #checked} } checked = "checked" { { / checked} } >
137
137
< label for = "{{ key }}" > { { message } } </ label >
138
+ { { #needs_explanation} }
139
+ < div class = "tooltip" >
140
+ < span class = "questionbox" > ?</ span >
141
+ < span class = "tooltiptext" > For < strong > JavaScript</ strong > , files with at least one function where all functions are uncovered.
142
+ < br /> For < strong > C/C++/other languages</ strong > , files which have no covered lines.</ span >
143
+ </ div >
144
+ { { / needs_explanation} }
138
145
{ { / filters} }
139
146
140
147
< select name = "last_push" id = "last_push" >
Original file line number Diff line number Diff line change @@ -394,3 +394,56 @@ $samp_size: 20px;
394
394
float : right ;
395
395
}
396
396
}
397
+
398
+ // Tooltip container for explanation (issue #97 enhancement)
399
+ #menu .tooltip {
400
+ position : relative ;
401
+ display : inline-block ;
402
+
403
+ // Question mark container
404
+ .questionbox {
405
+ text-align : center ;
406
+ border-bottom : 1px dotted black ;
407
+ cursor : default ;
408
+ }
409
+
410
+ // Show the tooltip text when you mouse over the tooltip container
411
+ & :hover .tooltiptext {
412
+ visibility : visible ;
413
+ opacity : 1 ;
414
+ }
415
+
416
+ .tooltiptext {
417
+ visibility : hidden ;
418
+ line-height : 120% ;
419
+ background-color : $default_color ;
420
+ color : white ;
421
+ text-align : left ;
422
+ padding : 1vh 1vw ;
423
+ border-radius : 6px ;
424
+ box-shadow : 1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
425
+
426
+ // Position the tooltip
427
+ position : absolute ;
428
+ z-index : 1 ;
429
+ width : 30vw ;
430
+ top : 100% ;
431
+ left : 50% ;
432
+ margin-left : -16vw ; // Use half of the width including left horizontal padding size i.e 30vw/2 + 1vw
433
+
434
+ & ::after {
435
+ content : " " ;
436
+ position : absolute ;
437
+ bottom : 100% ; /* At the top of the tooltip */
438
+ left : 50% ;
439
+ margin-left : -5px ;
440
+ border-width : 5px ;
441
+ border-style : solid ;
442
+ border-color : transparent transparent $default_color transparent ;
443
+ }
444
+
445
+ // Transition animation
446
+ opacity : 0 ;
447
+ transition : opacity 1s ;
448
+ }
449
+ }
Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ export function zeroCoverageMenu(route) {
55
55
return {
56
56
key,
57
57
message : filter . name ,
58
- checked : isEnabled ( key )
58
+ checked : isEnabled ( key ) ,
59
+ needs_explanation : key === "completely_uncovered"
59
60
} ;
60
61
} ) ,
61
62
last_pushes : Object . entries ( ZERO_COVERAGE_PUSHES ) . map (
You can’t perform that action at this time.
0 commit comments