Skip to content

Commit 47a0aba

Browse files
committed
[Frontend] TOI sass and markup sanding
Fixes #933 Fixes #1193 Color tweaks; Cleanups, commented code removal, etc.; tightened up tabular padding and font sizes;
1 parent 0ed0a48 commit 47a0aba

File tree

8 files changed

+71
-50
lines changed

8 files changed

+71
-50
lines changed

platform/commonUI/general/res/sass/_constants.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ $treeContextTriggerW: 20px;
7575
/*************** Tabular */
7676
$tabularHeaderH: 22px;
7777
$tabularTdPadLR: $itemPadLR;
78-
$tabularTdPadTB: 3px;
78+
$tabularTdPadTB: 2px;
7979
/*************** Imagery */
8080
$imageMainControlBarH: 25px;
8181
$imageThumbsD: 120px;

platform/commonUI/general/res/sass/controls/_time-of-interest.scss

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262

6363
.l-toi {
64-
// Holds clock icon an unpin button
64+
// Holds clock icon and unpin button
6565
font-size: $toiW;
6666
height: $toiW;
6767
width: $toiW;
@@ -70,34 +70,41 @@
7070
@extend .icon-clock;
7171
&:hover {
7272
&:before {
73+
color: $toiColorBgAlert;
7374
content: $glyph-icon-x-in-circle;
7475
}
7576
}
7677
}
7778
}
7879

7980
.l-toi-val {
80-
$tbP: 1px;
81-
background-color: $toiColorBg;
82-
border-radius: $controlCr;
83-
box-sizing: content-box;
84-
display: inline-block;
85-
color: $toiColorFg;
86-
font-size: 0.7rem;
87-
font-weight: 400;
88-
height: $toiW;
89-
right: $toiW + $interiorMarginSm;
90-
top: 50%;
91-
@include transform(translateY(-50%));
92-
line-height: $toiW;
93-
padding: $tbP $p;
94-
white-space: nowrap;
81+
display: none; // Hide by default; see .show-val below
9582
}
9683

97-
&.val-to-right {
84+
&.show-val {
9885
.l-toi-val {
99-
right: auto;
100-
left: $toiW + $interiorMarginSm;
86+
$tbP: 1px;
87+
background-color: $toiColorBg;
88+
border-radius: $controlCr;
89+
box-sizing: content-box;
90+
color: $toiColorFg;
91+
display: inline-block;
92+
font-size: 0.7rem;
93+
font-weight: 400;
94+
height: $toiW;
95+
right: $toiW + $interiorMarginSm;
96+
top: 50%;
97+
@include transform(translateY(-50%));
98+
line-height: $toiW;
99+
padding: $tbP $p;
100+
white-space: nowrap;
101+
}
102+
103+
&.val-to-right {
104+
.l-toi-val {
105+
right: auto;
106+
left: $toiW + $interiorMarginSm;
107+
}
101108
}
102109
}
103110
}
@@ -110,24 +117,38 @@ table {
110117
&.l-toi.pinned {
111118
border-top: 1px dashed $toiColorBg;
112119
td, .td {
113-
&:first-child:before {
114-
@extend .icon-clock;
115-
@include transform(translate(-50%, -50%));
116-
color: $toiColorBg;
117-
cursor: pointer;
118-
display: block;
119-
position: absolute;
120-
left: 50%;
121-
bottom: auto;
122-
text-shadow: 0 1px 15px black;
123-
top: 0;
124-
z-index: 2;
120+
&:first-child {
121+
&:before,
122+
&:after {
123+
@include transform(translate(-50%, -50%));
124+
display: block;
125+
position: absolute;
126+
left: 50%;
127+
bottom: auto;
128+
top: 0;
129+
130+
}
131+
&:before {
132+
@extend .icon-clock;
133+
color: $toiColorBg;
134+
cursor: pointer;
135+
z-index: 3;
136+
}
137+
&:after {
138+
border-radius: 100%;
139+
content: '';
140+
background: $toiColorBlocker;
141+
height: $toiW + $interiorMargin;
142+
width: $toiW + $interiorMargin;
143+
z-index: 2;
144+
}
125145
}
126146
}
127147

128148
&:hover {
129149
td, .td {
130150
&:first-child:before {
151+
color: $toiColorBgAlert;
131152
content: $glyph-icon-x-in-circle !important;
132153
}
133154
}

platform/commonUI/general/res/sass/lists/_tabular.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ table {
5151

5252
tbody, .tbody {
5353
display: table-row-group;
54-
/* tr, .tr {
55-
&:hover {
56-
background: rgba($colorTabBodyFg, 0.1);
57-
}
58-
}*/
5954
}
6055
tr, .tr {
6156
border-top: 1px solid $colorTabBorder;
@@ -72,11 +67,12 @@ table {
7267
}
7368
th, .th, td, .td {
7469
display: table-cell;
70+
font-size: 0.7rem;
7571
}
7672
th, .th {
7773
border-left: 1px solid $colorTabHeaderBorder;
7874
color: $colorTabHeaderFg;
79-
padding: $tabularTdPadLR $tabularTdPadLR;
75+
padding: $tabularTdPadTB $tabularTdPadLR;
8076
white-space: nowrap;
8177
vertical-align: middle; // This is crucial to hiding f**king 4px height injected by browser by default
8278
&:first-child {

platform/commonUI/themes/espresso/res/sass/_constants.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ $colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
105105

106106
// Time of Interest
107107
$toiColorBg: #6b93c6;
108+
$toiColorBlocker: $colorBodyBg; // Color of blocker element beneath the TOI icon
108109
$toiColorFg: #000;
110+
$toiColorBgAlert: #cf644a; // $colorFormInvalid;
109111
$toiW: 12px; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
110112

111113
// Status colors, mainly used for messaging and item ancillary symbols

platform/commonUI/themes/snow/res/sass/_constants.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ $colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
105105

106106
// Time of Interest
107107
$toiColorBg: #6b93c6;
108+
$toiColorBlocker: $colorBodyBg; // Color of blocker element beneath the TOI icon
108109
$toiColorFg: #fff;
110+
$toiColorBgAlert: #a7292a; // $colorFormInvalid;
109111
$toiW: 12px; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
110112

111113
// Status colors, mainly used for messaging and item ancillary symbols

platform/features/conductor-v2/conductor/res/templates/time-conductor.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,14 @@
9898
<div class="l-data-visualization-holder l-row-elem flex-elem">
9999
<a class="l-page-button s-icon-button icon-pointer-left"></a>
100100
<div class="l-data-visualization">
101-
<!-- Note:
102-
- val-to-right should be applied when l-toi-holder left < 160px
103-
-->
104-
<div class="l-toi-holder"
105-
ng-class="{ 'pinned': true, 'val-to-right': false }"
106-
ng-click="this.pinned = false"
101+
<!-- TOI element. val-to-right should be true when 'left' is < 150px -->
102+
<div class="l-toi-holder show-val"
103+
ng-class="{ 'pinned': false, 'val-to-right': false }"
107104
style="left: 70%">
108105
<div class="l-toi">
109-
<a class="t-button-unpin icon-button" ng-click="unpin()"></a>
106+
<a class="t-button-unpin icon-button"
107+
title="Unset Time of Interest"
108+
ng-click="dummyUnpin()"></a>
110109
<span class="l-toi-val">21:31:30</span>
111110
</div>
112111
</div>

platform/features/plot/res/templates/plot.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@
7575
</div>
7676
</div>
7777

78-
<!-- new wrapper inserted here -->
7978
<div class="gl-plot-wrapper-display-area-and-x-axis">
80-
<!-- TOI element -->
79+
<!-- TOI element. val-to-right should be true when 'left' is < 150px -->
8180
<div class="l-toi-holder show-val"
82-
ng-class="{ pinned: true, 'val-to-right': true }"
81+
ng-class="{ pinned: false, 'val-to-right': true }"
8382
style="left: 0%">
84-
<!-- Need text val at bottom, plus vertical line -->
8583
<span class="l-toi">
86-
<a class="t-button-unpin icon-button" ng-click="unpin()"></a>
84+
<a class="t-button-unpin icon-button"
85+
title="Unset Time of Interest"
86+
ng-click="dummyUnpin()"></a>
8787
<span class="l-toi-val">21:31:30</span>
8888
</span>
8989
</div>

platform/features/table/res/templates/mct-table.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
<tbody>
5252
<tr ng-repeat="visibleRow in visibleRows track by visibleRow.rowIndex"
5353
ng-class="{ 'l-toi pinned': false }"
54+
ng-click="dummyUnpin()"
5455
ng-style="{
5556
top: visibleRow.offsetY + 'px',
5657
}">

0 commit comments

Comments
 (0)