Skip to content

Commit 2bf3e4d

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 6da2c95 + c8f61c8 commit 2bf3e4d

File tree

46 files changed

+54
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+54
-528
lines changed

.circleci/config.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,15 @@ workflows:
174174
filters:
175175
branches:
176176
only:
177-
- feature-m2m-with-stats
178177
- develop
178+
- feature-m2m-token
179179
# This is alternate dev env for parallel testing
180180
- "build-test":
181181
context : org-global
182182
filters:
183183
branches:
184184
only:
185+
- develop
185186
- nav-hot-fix
186187
- hot-fixes-leaderboard
187188
# This is beta env for production soft releases
@@ -190,7 +191,8 @@ workflows:
190191
filters:
191192
branches:
192193
only:
193-
- develop
194+
- develop
195+
- feature-contentful
194196
# Production builds are exectuted only on tagged commits to the
195197
# master branch.
196198
- "build-prod":

CONTRIBUTING.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,4 @@ Optional. The footer should contain any information about **Breaking Changes** a
6868
reference GitHub issues that this commit **Closes**.
6969

7070
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
71-
The rest of the commit message is then used for this.
72-
73-
### Generate Change long
74-
```
75-
npm run release:changelog
76-
```
71+
The rest of the commit message is then used for this.

__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap

-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ exports[`renders a full Profile correctly 1`] = `
199199
className=""
200200
handle="testHandle"
201201
inModal={false}
202-
meta={null}
203202
stats={
204203
Object {
205204
"COPILOT": Object {
@@ -700,7 +699,6 @@ exports[`renders an empty Profile correctly 1`] = `
700699
className=""
701700
handle="testHandle"
702701
inModal={false}
703-
meta={null}
704702
stats={
705703
Object {
706704
"COPILOT": null,

docs/deployment-env.md

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ workflows:
4848
- develop
4949
```
5050
4. Commit the changes
51-
5. Status of the deployment environments can be checked here https://cci-reporter.herokuapp.com/

src/shared/components/ProfilePage/Skill/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Skill = ({
3737
Skill.propTypes = {
3838
tagId: PT.string.isRequired,
3939
tagName: PT.string.isRequired,
40-
isVerified: PT.bool.isRequired,
40+
isVerified: PT.string.isRequired,
4141
};
4242

4343
export default Skill;

src/shared/components/ProfilePage/Stats/index.jsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
import _ from 'lodash';
66
import React from 'react';
77
import PT from 'prop-types';
8+
import { Link } from 'react-router-dom';
89
import ReactSVG from 'react-svg';
9-
import { Link, isomorphy } from 'topcoder-react-utils';
10+
import { isomorphy } from 'topcoder-react-utils';
1011
import { getRatingColor } from 'utils/tc';
1112
import Th from 'assets/images/th.svg';
1213
import LeftArrow from 'assets/images/arrow-prev.svg';
@@ -49,6 +50,7 @@ class ProfileStats extends React.Component {
4950

5051
render() {
5152
const {
53+
stats,
5254
statsDistribution,
5355
statsHistory,
5456
track,
@@ -58,11 +60,6 @@ class ProfileStats extends React.Component {
5860
handleParam,
5961
activeChallengesCount,
6062
} = this.props;
61-
let { stats } = this.props;
62-
if (_.isArray(stats)) {
63-
// eslint-disable-next-line prefer-destructuring
64-
stats = stats[0];
65-
}
6663

6764
const { activeGraph, showModal } = this.state;
6865

@@ -303,7 +300,7 @@ ProfileStats.defaultProps = {
303300
};
304301

305302
ProfileStats.propTypes = {
306-
stats: PT.arrayOf(PT.shape()).isRequired,
303+
stats: PT.shape().isRequired,
307304
handleParam: PT.string.isRequired,
308305
track: PT.string.isRequired,
309306
subTrack: PT.string.isRequired,

src/shared/components/ProfilePage/StatsCategory/index.jsx

+3-10
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ const isActiveSubtrack = (subtrack) => {
4343

4444
class StatsCategory extends React.Component {
4545
getActiveTracks() {
46-
let { stats } = this.props;
47-
if (_.isArray(stats)) {
48-
// eslint-disable-next-line prefer-destructuring
49-
stats = stats[0];
50-
}
46+
const { stats } = this.props;
5147
const activeTracks = [];
5248

5349
if (stats.COPILOT && stats.COPILOT.fulfillment) {
@@ -93,7 +89,6 @@ class StatsCategory extends React.Component {
9389
handle,
9490
className,
9591
inModal,
96-
meta,
9792
} = this.props;
9893

9994
const activeTracks = this.getActiveTracks();
@@ -118,7 +113,7 @@ class StatsCategory extends React.Component {
118113
<Link
119114
to={`/members/${handle}/details/?track=${track.name}&subTrack=${subtrack.name.replace(' ', '_')}`}
120115
key={subtrack.name}
121-
styleName={`subtrack ${index === 0 ? 'first' : ''} ${meta ? 'disablelink' : ''}`}
116+
styleName={`subtrack ${index === 0 ? 'first' : ''}`}
122117
>
123118
<div
124119
styleName="name"
@@ -184,15 +179,13 @@ class StatsCategory extends React.Component {
184179
StatsCategory.defaultProps = {
185180
className: '',
186181
inModal: false,
187-
meta: null,
188182
};
189183

190184
StatsCategory.propTypes = {
191185
handle: PT.string.isRequired,
192-
stats: PT.arrayOf(PT.shape()).isRequired,
186+
stats: PT.shape().isRequired,
193187
inModal: PT.bool,
194188
className: PT.string,
195-
meta: PT.shape(),
196189
};
197190

198191
export default StatsCategory;

src/shared/components/ProfilePage/StatsCategory/styles.scss

-4
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@
147147
}
148148
}
149149

150-
.disablelink {
151-
pointer-events: none;
152-
}
153-
154150
.icon {
155151
width: 80px;
156152
height: 80px;

src/shared/components/ProfilePage/index.jsx

+3-11
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ class ProfilePage extends React.Component {
6363
}
6464

6565
getActiveTracks() {
66-
const { copilot } = this.props;
67-
let { stats } = this.props;
68-
if (_.isArray(stats)) {
69-
// eslint-disable-next-line prefer-destructuring
70-
stats = stats[0];
71-
}
66+
const { copilot, stats } = this.props;
7267
const activeTracks = [];
7368

7469
if (copilot && stats && stats.COPILOT && stats.COPILOT.fulfillment) {
@@ -123,7 +118,6 @@ class ProfilePage extends React.Component {
123118
skills: propSkills,
124119
stats,
125120
lookupData,
126-
meta,
127121
} = this.props;
128122

129123
const {
@@ -263,7 +257,7 @@ class ProfilePage extends React.Component {
263257
{
264258
stats && (
265259
<div id="profile-activity">
266-
<StatsCategory handle={info.handle} stats={stats} meta={meta} />
260+
<StatsCategory handle={info.handle} stats={stats} />
267261
</div>
268262
)
269263
}
@@ -303,7 +297,6 @@ ProfilePage.defaultProps = {
303297
achievements: [],
304298
skills: null,
305299
stats: null,
306-
meta: null,
307300
};
308301

309302
ProfilePage.propTypes = {
@@ -313,9 +306,8 @@ ProfilePage.propTypes = {
313306
externalLinks: PT.arrayOf(PT.shape()),
314307
info: PT.shape().isRequired,
315308
skills: PT.shape(),
316-
stats: PT.arrayOf(PT.shape()),
309+
stats: PT.shape(),
317310
lookupData: PT.shape().isRequired,
318-
meta: PT.shape(),
319311
};
320312

321313
export default ProfilePage;

src/shared/components/tc-communities/Header/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function Header(props) {
6666
items: [{
6767
enforceA: true,
6868
icon: <IconNavProfile />,
69-
link: `${meta ? _.replace(BASE_URL, 'www', meta.subdomains[0]) : BASE_URL}/members/${normalizedProfile.handle}`,
69+
link: `${BASE_URL}/members/${normalizedProfile.handle}`,
7070
title: 'My Profile',
7171
}, {
7272
openNewTab: true,

src/shared/containers/Profile.jsx

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Connects the Redux store to the Profile display components.
33
*/
4-
import _ from 'lodash';
54
import React from 'react';
65
import PT from 'prop-types';
76
import { connect } from 'react-redux';
@@ -16,22 +15,20 @@ class ProfileContainer extends React.Component {
1615
const {
1716
handleParam,
1817
loadProfile,
19-
meta,
2018
} = this.props;
2119

22-
loadProfile(handleParam, _.join(_.get(meta, 'groupIds', [])));
20+
loadProfile(handleParam);
2321
}
2422

2523
componentWillReceiveProps(nextProps) {
2624
const {
2725
handleParam,
2826
profileForHandle,
2927
loadProfile,
30-
meta,
3128
} = nextProps;
3229

3330
if (handleParam !== profileForHandle) {
34-
loadProfile(handleParam, _.join(_.get(meta, 'groupIds', [])));
31+
loadProfile(handleParam);
3532
}
3633
}
3734

@@ -78,7 +75,6 @@ ProfileContainer.defaultProps = {
7875
profileForHandle: '',
7976
skills: null,
8077
stats: null,
81-
meta: null,
8278
};
8379

8480
ProfileContainer.propTypes = {
@@ -93,9 +89,8 @@ ProfileContainer.propTypes = {
9389
loadProfile: PT.func.isRequired,
9490
profileForHandle: PT.string,
9591
skills: PT.shape(),
96-
stats: PT.arrayOf(PT.shape()),
92+
stats: PT.shape(),
9793
lookupData: PT.shape().isRequired,
98-
meta: PT.shape(),
9994
};
10095

10196
const mapStateToProps = (state, ownProps) => ({
@@ -105,7 +100,6 @@ const mapStateToProps = (state, ownProps) => ({
105100
externalAccounts: state.profile.externalAccounts,
106101
externalLinks: state.profile.externalLinks,
107102
handleParam: ownProps.match.params.handle,
108-
meta: ownProps.meta,
109103
info: state.profile.info,
110104
loadingError: state.profile.loadingError,
111105
profileForHandle: state.profile.profileForHandle,
@@ -118,7 +112,7 @@ function mapDispatchToProps(dispatch) {
118112
const a = actions.profile;
119113
const lookupActions = actions.lookup;
120114
return {
121-
loadProfile: (handle, groupIds) => {
115+
loadProfile: (handle) => {
122116
dispatch(a.clearProfile());
123117
dispatch(a.loadProfile(handle));
124118
dispatch(a.getAchievementsInit());
@@ -133,7 +127,7 @@ function mapDispatchToProps(dispatch) {
133127
dispatch(a.getExternalLinksDone(handle));
134128
dispatch(a.getInfoDone(handle));
135129
dispatch(a.getSkillsDone(handle));
136-
dispatch(a.getStatsDone(handle, groupIds));
130+
dispatch(a.getStatsDone(handle));
137131
dispatch(lookupActions.getCountriesDone());
138132
},
139133
};

0 commit comments

Comments
 (0)