Skip to content

Commit c84b912

Browse files
Merge pull request #5317 from topcoder-platform/develop
Release 2021/01/26 (v1.7.5)
2 parents dc33796 + 32b14e3 commit c84b912

File tree

23 files changed

+433
-218
lines changed

23 files changed

+433
-218
lines changed

__tests__/shared/components/GUIKit/Datepicker/__snapshots__/index.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Default render 1`] = `
44
<div
5-
className="src-shared-components-GUIKit-Datepicker-___style__container___Sl58X"
5+
className="src-shared-components-GUIKit-Datepicker-___style__container___Sl58X src-shared-components-GUIKit-Datepicker-___style__lgSize___3T8M1"
66
>
77
<withStyles(SingleDatePicker)
88
anchorDirection="left"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"supertest": "^3.1.0",
144144
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
145145
"tc-ui": "^1.0.12",
146-
"topcoder-react-lib": "1.1.5",
146+
"topcoder-react-lib": "1.1.6",
147147
"topcoder-react-ui-kit": "2.0.1",
148148
"topcoder-react-utils": "0.7.8",
149149
"turndown": "^4.0.2",
Lines changed: 9 additions & 0 deletions
Loading
197 Bytes
Loading

src/shared/components/Contentful/Article/themes/default.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@
430430

431431
.site-header-background {
432432
width: 100%;
433+
height: calc(100vw * (9 / 16));
434+
max-height: 565px;
433435
}
434436
}
435437

src/shared/components/Contentful/SearchPageFilter/FilterAuthor/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export class FilterAuthorInner extends Component {
5858
isShowPopup,
5959
} = this.state;
6060

61+
// sort by author name
62+
options.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
63+
6164
return (
6265
<div ref={this.setWrapperRef} className={`${theme.container} ${className}`}>
6366
<span className={theme.title}>Author</span>

src/shared/components/Contentful/TracksFilter/TracksAuthor/index.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import PT from 'prop-types';
66
import React, { Component } from 'react';
77
import { themr } from 'react-css-super-themr';
88

9-
import IconArrow from 'assets/images/tc-edu/icon-arrow-up-big.svg';
9+
import iconDown from 'assets/images/dropdown-arrow.png';
1010
import defaultTheme from './themes/default.scss';
1111

1212

@@ -58,9 +58,12 @@ export class TracksAuthorInner extends Component {
5858
isShowPopup,
5959
} = this.state;
6060

61+
// sort by author name
62+
options.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
63+
6164
return (
6265
<div ref={this.setWrapperRef} className={`${theme.container} ${className}`}>
63-
<span className={theme.title}>Author</span>
66+
<span className={theme.title}>Authors</span>
6467
<button
6568
type="button"
6669
className={theme.header}
@@ -69,7 +72,7 @@ export class TracksAuthorInner extends Component {
6972
}}
7073
>
7174
<span>{selected}</span>
72-
<IconArrow className={theme['icon-arrow']} />
75+
<img width="15" height="9" className={theme['icon-arrow']} src={iconDown} alt="dropdown-arraow-icon" />
7376
</button>
7477
{isShowPopup && (
7578
<div className={theme.popup}>

src/shared/components/Contentful/TracksFilter/TracksAuthor/themes/default.scss

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ $text-black: #2a2a2a;
88
display: flex;
99
flex-direction: row;
1010
color: $text-black;
11-
background-color: #f4f4f4;
1211
border-radius: 6px;
1312
width: 100%;
1413
border: 1px solid #aaa;
1514
position: relative;
1615
padding: 0 15px;
1716
max-width: 220px;
18-
height: 38px;
17+
height: 40px;
1918
align-items: center;
2019
}
2120

@@ -26,7 +25,7 @@ $text-black: #2a2a2a;
2625
padding: 0 7px;
2726
left: 8px;
2827
top: -7px;
29-
background: #f4f4f4;
28+
background: #fff;
3029
}
3130

3231
.header {
@@ -42,18 +41,15 @@ $text-black: #2a2a2a;
4241
@include min-ellipsis;
4342

4443
font-size: 14px;
44+
color: #2a2a2a !important;
4545
}
4646
}
4747

4848
.icon-arrow {
49-
-moz-transform: scale(-1, -1);
50-
-o-transform: scale(-1, -1);
51-
-webkit-transform: scale(-1, -1);
52-
transform: scale(-1, -1);
53-
54-
polygon {
55-
fill: #aaa;
56-
}
49+
-moz-transform: scale(1, -1);
50+
-o-transform: scale(1, -1);
51+
-webkit-transform: scale(1, -1);
52+
transform: scale(1, -1);
5753
}
5854

5955
.popup {

src/shared/components/Contentful/TracksFilter/TracksDate/index.jsx

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ import PT from 'prop-types';
55
import moment from 'moment';
66
import React from 'react';
77
import { themr } from 'react-css-super-themr';
8-
import DatePicker from 'components/challenge-listing/Filters/DatePicker';
9-
import CalendarWeek from 'react-dates/lib/components/CalendarWeek';
10-
import IconCalendar from 'assets/images/tc-edu/icon-calendar.svg';
8+
import Datepicker from 'components/GUIKit/Datepicker';
119
import defaultTheme from './themes/default.scss';
1210

13-
// eslint-disable-next-line no-unused-expressions, react/forbid-foreign-prop-types
14-
CalendarWeek && CalendarWeek.propTypes && delete CalendarWeek.propTypes.children; // fixing the bug in react-dates, more detail in here https://github.com/airbnb/react-dates/issues/1121
15-
1611

1712
export function TracksDateInner(props) {
1813
const {
@@ -26,23 +21,20 @@ export function TracksDateInner(props) {
2621

2722
return (
2823
<div className={`${theme.container} ${className}`}>
29-
<span className={theme.title}>Date</span>
30-
<IconCalendar />
31-
<DatePicker
32-
displayFormat="MMM D, YYYY"
33-
date={startDate}
34-
numberOfMonths={1}
35-
id="date-picker-start-date"
36-
onDateChange={(date) => { onSelectStartDate(date); }}
24+
<Datepicker
25+
label="Date Start"
26+
value={startDate}
27+
onChange={(date) => { onSelectStartDate(date); }}
28+
size="xs"
29+
isOutsideRange={day => moment().isSameOrBefore(day)}
3730
/>
38-
<span className={theme.separator}>-</span>
39-
<IconCalendar />
40-
<DatePicker
41-
displayFormat="MMM D, YYYY"
42-
date={endDate}
43-
numberOfMonths={1}
44-
id="date-picker-end-date"
45-
onDateChange={(date) => { onSelectEndDate(date); }}
31+
<div className={theme.separator} />
32+
<Datepicker
33+
label="Date End"
34+
value={endDate}
35+
onChange={(date) => { onSelectEndDate(date); }}
36+
size="xs"
37+
isOutsideRange={day => moment().isSameOrBefore(day)}
4638
/>
4739
</div>
4840
);
@@ -52,14 +44,13 @@ TracksDateInner.defaultProps = {
5244
className: '',
5345
startDate: null,
5446
endDate: null,
55-
onSelectStartDate: () => {},
56-
onSelectEndDate: () => {},
47+
onSelectStartDate: () => { },
48+
onSelectEndDate: () => { },
5749
};
5850

5951
TracksDateInner.propTypes = {
6052
theme: PT.shape({
6153
container: PT.string.isRequired,
62-
title: PT.string.isRequired,
6354
separator: PT.string.isRequired,
6455
}).isRequired,
6556
className: PT.string,

src/shared/components/Contentful/TracksFilter/TracksDate/themes/default.scss

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,23 @@ $text-black: #2a2a2a;
1313
@include roboto-regular;
1414

1515
display: flex;
16+
flex: 0 0 270px;
1617
flex-direction: row;
1718
color: $text-black;
18-
background-color: #f4f4f4;
19-
border-radius: 6px;
20-
border: 1px solid #aaa;
2119
position: relative;
22-
padding: 0 15px;
2320
min-width: 245px;
2421
align-items: center;
2522
font-size: 14px;
26-
height: 38px;
27-
28-
:global {
29-
.SingleDatePicker {
30-
width: 105px;
31-
margin-left: 12px;
32-
}
33-
34-
input {
35-
height: 21px !important;
36-
margin: 0 !important;
37-
padding: 0 !important;
38-
border: none !important;
39-
box-shadow: none !important;
40-
background-color: #f4f4f4 !important;
41-
color: #2a2a2a !important;
42-
font-size: 16px !important;
43-
}
44-
45-
@include xs-to-sm {
46-
.SingleDatePicker {
47-
width: 105px;
48-
margin-left: 6px;
49-
}
50-
}
51-
}
52-
}
53-
54-
.title {
55-
position: absolute;
56-
color: #aaa;
57-
font-size: 12px;
58-
padding: 0 7px;
59-
left: 8px;
60-
top: -7px;
61-
background: #f4f4f4;
6223
}
6324

6425
.separator {
65-
margin-left: 0;
66-
margin-right: 12px;
26+
margin: 0 6px;
27+
width: 6px;
28+
height: 1px;
29+
background-color: #aaa;
30+
31+
@include xs-to-sm {
32+
width: 30px;
33+
background-color: #fff;
34+
}
6735
}

0 commit comments

Comments
 (0)