Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 6ebfed1

Browse files
authored
Merge pull request #890 from appirio-tech/dev - promote to prod
Merging ratings graph fixes
2 parents 026c3b5 + b3a17f8 commit 6ebfed1

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

app/directives/challenge-links/challenge-links.directive.js

-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ import angular from 'angular'
1212
scope: {
1313
challenge: '=',
1414
view: '='
15-
},
16-
link: function(scope, element, attrs) {
17-
element.on('click', function() {
18-
window.location.href = $(this).attr('href')
19-
})
2015
}
2116
}
2217
})

app/directives/history-graph/history-graph.directive.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
245245
return y
246246
}
247247
}
248-
248+
249249
/* render react tooltip component */
250250
ReactDOM.unmountComponentAtNode(document.getElementById('chart-tooltip'))
251-
ReactDOM.render(<Tooltip popMethod='click'>
251+
ReactDOM.render(<Tooltip popMethod='hover'>
252252
<div className='tooltip-target'></div>
253253
<div className='tooltip-body'>
254254
<div className='tooltip-rating'></div>
@@ -259,7 +259,7 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
259259
</div>
260260
</Tooltip>
261261
, document.getElementById('chart-tooltip'))
262-
262+
263263
svg.selectAll('circle')
264264
.data(history)
265265
.enter()
@@ -270,6 +270,7 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
270270
.attr('cy', function(d) {
271271
return y(d.newRating)
272272
})
273+
.attr('r', 5.5)
273274
.attr('fill', function(d) {
274275
return ratingToColor($scope.colors, d.newRating)
275276
})
@@ -283,18 +284,18 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
283284
else
284285
location.href = $filter('challengeLinks')({id: d.challengeId, 'track': $state.params.track, 'subTrack': $state.params.subTrack}, 'detail')
285286
})
286-
287+
287288
/* update tooltip location on mouseover, feature currently not inbuilt in react tooltip component */
288289
d3.select('#chart-tooltip')
289-
.style('left', (d3.event.pageX-5) + 'px')
290+
.style('left', (d3.event.pageX-5) + 'px')
290291
.style('top', (d3.event.pageY-5) + 'px')
291292
d3.select('#chart-tooltip .tooltip-container')
292-
.style('left', '20px !important')
293+
.style('left', '20px !important')
293294
.style('top', '-20px !important')
294295
d3.select('#chart-tooltip .tooltip-container .tooltip-pointer')
295-
.style('left', '-5.5px !important')
296+
.style('left', '-5.5px !important')
296297
.style('bottom', '25px !important')
297-
298+
298299
d3.select('#chart-tooltip .challenge-name').text($scope.historyChallenge)
299300
d3.select('#chart-tooltip .challenge-date').text(moment(d.ratingDate).format('MMM DD, YYYY'))
300301
d3.select('#chart-tooltip .tooltip-rating').text($scope.historyRating)
@@ -307,7 +308,7 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
307308
$scope.$digest()
308309
})
309310

310-
/* hide tooltip when clicked anywhere outside */
311+
/* hide tooltip when clicked anywhere outside */
311312
d3.select('body').on('click', function(){
312313
if((d3.event.target.classList[0] != 'tooltip-target') && !$('#chart-tooltip .tooltip-container').hasClass('tooltip-hide') &&
313314
(d3.event.target.tagName.toLowerCase()!='circle') && !(d3.event.target.tagName.toLowerCase()=='rect' && d3.event.target.classList[0] == 'hover')) {

assets/css/directives/history-graph.scss

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
}
9292

9393
circle {
94-
r: 5.5px;
9594
stroke: $white;
9695
stroke-width: 1.5px;
9796
}

assets/css/directives/tc-banner.scss

+10-2
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,22 @@ $tco-color-dark: #ea690b;
155155
padding-top: 50px;
156156

157157
.title {
158-
font-size: 36px;
159-
margin-bottom: 5px;
160158
margin-top: 10px;
159+
@include sofia-pro-bold;
160+
color: $white;
161161
}
162162

163163
.subtitle {
164164
margin-top: 20px;
165165
width: 450px;
166+
font-size: 20px;
167+
@extend .title;
168+
@include sofia-pro-regular;
169+
}
170+
171+
.description {
172+
margin-top: 20px;
173+
margin-bottom: 5px;
166174
}
167175

168176
.cta {

0 commit comments

Comments
 (0)