Skip to content

Commit e43631a

Browse files
authored
Merge pull request #2357 from topcoder-platform/revert-2356-develop
Revert merge
2 parents ab34e60 + acec650 commit e43631a

File tree

18 files changed

+43
-87
lines changed

18 files changed

+43
-87
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ workflows:
181181
filters:
182182
branches:
183183
only:
184-
- hot-fixes
185-
- legacy-tco
184+
- legacy-tco
186185
# This is beta env for production soft releases
187186
- "build-prod-beta":
188187
context : org-global

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"slick-carousel": "^1.8.1",
108108
"supertest": "^3.1.0",
109109
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
110-
"topcoder-react-lib": "^0.7.14",
110+
"topcoder-react-lib": "^0.7.11",
111111
"topcoder-react-ui-kit": "^0.5.10",
112112
"topcoder-react-utils": "0.7.8",
113113
"turndown": "^4.0.2",

src/shared/components/Contentful/Banner/themes/tco19.scss

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,22 @@ $contentWrapperPadding: 0;
7777
}
7878

7979
p {
80-
font-size: 15px;
80+
font-size: 20px;
8181
margin-bottom: 1em;
8282
line-height: 25px;
83-
84-
strong {
85-
font-weight: bold;
86-
}
87-
88-
em {
89-
font-style: italic;
90-
}
9183
}
9284

9385
ul {
9486
list-style: disc;
9587
margin-bottom: 1em;
9688
margin-left: 20px;
89+
90+
li {
91+
p {
92+
font-size: 16px;
93+
line-height: 27px;
94+
}
95+
}
9796
}
9897

9998
input {

src/shared/components/Contentful/ContentBlock/themes/TCO19.scss

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,13 @@
110110
td {
111111
@include roboto-regular;
112112

113-
font-size: 15px;
114-
line-height: 25px;
113+
font-size: 20px;
114+
line-height: 70px;
115115
text-align: left;
116116
color: $tc-gray-80;
117117
border-top: 1px solid #ededf2;
118118
border-bottom: 1px solid #ededf2;
119-
padding: 10px 0;
120-
min-height: 51px;
121-
122-
&:first-child {
123-
padding-left: 10px;
124-
}
125-
126-
&:last-child {
127-
padding-right: 10px;
128-
}
119+
padding: 0 10px;
129120
}
130121

131122
ul,

src/shared/components/Looker/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ export default function Looker(props) {
7171
cols.map((c) => {
7272
const name = c.headerName;
7373
const { styles } = c;
74-
return name ? (
74+
return (
7575
<th key={name} style={styles}>{ name }</th>
76-
) : null;
76+
);
7777
})
7878

7979
}
@@ -82,7 +82,7 @@ export default function Looker(props) {
8282

8383
const bodyRow = (record, cols, i) => (
8484
<tr key={Object.values(record)}>
85-
{ (countRows && (limit <= 0 || i < limit)) ? <td style={{ borderTop: '1px solid #D5D5D5' }}> {i + 1}. </td> : ' ' }
85+
{ (countRows && (limit <= 0 || i < limit)) ? <td> {i + 1}. </td> : ' ' }
8686
{
8787
cols.map((c) => {
8888
const prop = c.property;
@@ -96,11 +96,11 @@ export default function Looker(props) {
9696
value = record[prop].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
9797
}
9898
}
99-
return value ? (
99+
return (
100100
<td key={record[prop]} style={styles} title={value}>
101101
{value}
102102
</td>
103-
) : null;
103+
);
104104
})
105105
}
106106
</tr>

src/shared/components/ProfilePage/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class ProfilePage extends React.Component {
133133
? _.get(info, 'competitionCountryCode') : _.get(info, 'homeCountryCode');
134134

135135
const result = _.find(lookupData.countries,
136-
c => countryCode && c.countryCode === countryCode.toUpperCase());
136+
c => c.countryCode === countryCode.toUpperCase());
137137
country = _.isEmpty(result) ? '' : result.country;
138138
}
139139

src/shared/components/Settings/Account/MyAccount/index.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/* eslint-disable no-undef */
88
import React from 'react';
99
import PT from 'prop-types';
10-
import { omit, get } from 'lodash';
10+
import { omit } from 'lodash';
1111
import ConsentComponent from 'components/Settings/ConsentComponent';
1212
import { Modal, PrimaryButton } from 'topcoder-react-ui-kit';
1313
import Personalization from 'components/Settings/Preferences/Personalization';
@@ -57,6 +57,7 @@ export default class MyAccount extends ConsentComponent {
5757
reNewPassword: '',
5858
isMobileView: false,
5959
screenSM: 767,
60+
ssoUser: false,
6061
isSent: false,
6162
isOpen: false,
6263
};
@@ -174,8 +175,12 @@ export default class MyAccount extends ConsentComponent {
174175
}
175176

176177
onChangeEmail() {
177-
const { profileState } = this.props;
178-
if (get(profileState, 'credential.hasPassword')) {
178+
const { profile } = this.props;
179+
if (profile.withSSO !== null && profile.withSSO !== undefined && profile.withSSO) {
180+
this.setState({
181+
ssoUser: true,
182+
});
183+
} else {
179184
const newState = { ...this.state };
180185
newState.btnChangeEmailVisible = false;
181186
newState.btnVerifiEmailVisible = true;
@@ -378,6 +383,7 @@ export default class MyAccount extends ConsentComponent {
378383
showRePasswordTips,
379384
rePasswordValid,
380385
isValidEmail,
386+
ssoUser,
381387
isOpen,
382388
} = this.state;
383389

@@ -473,7 +479,7 @@ export default class MyAccount extends ConsentComponent {
473479
</div>
474480
</div>
475481
{
476-
get(profileState, 'credential.hasPassword', false) === false && (
482+
ssoUser && (
477483
<div styleName="error-message">
478484
Since you joined Topcoder using your &lt;SSO Service&gt; account,
479485
any email updates will need to be handled by logging in to
@@ -567,7 +573,7 @@ export default class MyAccount extends ConsentComponent {
567573
</div>
568574
</div>
569575
{
570-
get(profileState, 'credential.hasPassword', false) === false && (
576+
ssoUser && (
571577
<div styleName="error-message">
572578
Since you joined Topcoder using your &lt;SSO Service&gt; account,
573579
any email updates will need to be handled by logging in to

src/shared/components/Settings/Preferences/Email/index.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ const newsletters = [
1717
// desc: 'News summary from all tracks and programs',
1818
// },
1919
{
20-
id: 'Design Newsletter',
20+
id: 'TOPCODER_NL_DESIGN',
2121
name: 'Design Newsletter',
2222
desc: 'Website, mobile and product design; UI and UX',
2323
},
2424
{
25-
id: 'Dev Newsletter',
25+
id: 'TOPCODER_NL_DEV',
2626
name: 'Development Newsletter',
2727
desc: 'Software architecture, component assembly, application development, and bug hunting',
2828
},
2929
{
30-
id: 'Data Science Newsletter',
30+
id: 'TOPCODER_NL_DATA',
3131
name: 'Data Science Newsletter',
3232
desc: 'Algorithm and data structures, statistical analysis',
3333
},
@@ -107,11 +107,8 @@ export default class EmailPreferences extends ConsentComponent {
107107

108108
onChange(id, checked) {
109109
document.querySelectorAll(`#pre-onoffswitch-${id}`).forEach((el) => { el.checked = checked; }); // eslint-disable-line no-param-reassign
110-
let { emailPreferences } = this.state;
111-
emailPreferences = {
112-
...emailPreferences,
113-
[id]: checked,
114-
};
110+
const { emailPreferences } = this.state;
111+
emailPreferences[id] = checked;
115112
this.setState({
116113
emailPreferences,
117114
}, () => this.saveEmailPreferences());

src/shared/components/Settings/Profile/BasicInfo/index.jsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ export default class BasicInfo extends ConsentComponent {
100100
let invalid = false;
101101
let errorMessage = '';
102102
let dateError = '';
103-
let zipError = '';
104103
let birthDateInvalid = false;
105-
let zipInvalid = false;
106104
const invalidFields = [];
107105

108106
if (!_.trim(newBasicInfo.firstName).length) {
@@ -125,13 +123,6 @@ export default class BasicInfo extends ConsentComponent {
125123
errorMessage += ' cannot be empty';
126124
}
127125

128-
_.forEach(newBasicInfo.addresses, (address) => {
129-
if (!(/^[0-9-]*$/.test(address.zip))) {
130-
zipError = 'You must enter a valid zip code';
131-
zipInvalid = true;
132-
}
133-
});
134-
135126
if (_.trim(newBasicInfo.birthDate).length > 0) {
136127
if (!moment().isAfter(newBasicInfo.birthDate)) {
137128
dateError = 'You must enter a valid date for Birth Date';
@@ -146,13 +137,6 @@ export default class BasicInfo extends ConsentComponent {
146137
invalid = birthDateInvalid;
147138
}
148139

149-
if (errorMessage.length > 0) {
150-
errorMessage = `${errorMessage}. ${zipError}`;
151-
} else if (zipError.length > 0) {
152-
errorMessage = zipError;
153-
invalid = zipInvalid;
154-
}
155-
156140
this.setState({ errorMessage, formInvalid: invalid });
157141
return invalid;
158142
}

src/shared/components/Settings/Profile/Hobby/index.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ export default class Hobby extends ConsentComponent {
341341
<div styleName="field row-1">
342342
<label htmlFor="hobby">
343343
Hobby
344-
<span styleName="text-required">* Required</span>
345344
<input type="hidden" />
346345
</label>
347346
<input disabled={!canModifyTrait} id="hobby" name="hobby" type="text" placeholder="Hobby" onChange={this.onUpdateInput} value={newHobby.hobby} maxLength="128" required />
@@ -352,7 +351,6 @@ export default class Hobby extends ConsentComponent {
352351
<label styleName="description-label" htmlFor="description">
353352
<span>
354353
Description
355-
<span styleName="text-required">* Required</span>
356354
</span>
357355
{' '}
358356
<span styleName="description-counts">

src/shared/components/Settings/Profile/Hobby/styles.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,6 @@ textarea {
180180
line-height: 15px;
181181
font-weight: 500;
182182
color: $tc-gray-80;
183-
184-
.text-required {
185-
font-size: 10px;
186-
color: $tc-red-110;
187-
margin-left: 5px;
188-
}
189183
}
190184

191185
&.col-1 {

src/shared/components/Settings/Profile/Skills/index.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,6 @@ export default class Skills extends ConsentComponent {
590590
<div styleName="field">
591591
<label htmlFor="skills">
592592
Skill
593-
<span styleName="text-required">* Required</span>
594593
<input type="hidden" />
595594
</label>
596595
<Select

src/shared/components/Settings/Profile/Skills/styles.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@
165165
line-height: 15px;
166166
color: $tc-gray-80;
167167
margin-bottom: 6px;
168-
169-
.text-required {
170-
font-size: 10px;
171-
color: $tc-red-110;
172-
margin-left: 5px;
173-
}
174168
}
175169

176170
.col-1,

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,7 @@ Toggle navigation
252252
<div className={isMobileOpen ? theme.menuWrapOpen : theme.menuWrap}>
253253
{
254254
menuItems[0] && menuItems[0].navigationMenu ? (
255-
<Menu
256-
id={menuItems[0].navigationMenu}
257-
baseUrl={baseUrl}
258-
spaceName={menuItems[0].spaceName}
259-
environment={menuItems[0].environment}
260-
/>
255+
<Menu id={menuItems[0].navigationMenu} baseUrl={baseUrl} />
261256
) : (
262257
<ul className={theme.menu}>
263258
{_.map(menuItems, menuIterator)}

src/shared/routes/Communities/TCO03/Routes.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function TCO03({ base }) {
2525
<ContentfulRoute
2626
baseUrl={base}
2727
error404={<Error404 />}
28-
id="2MKnrhssyBHnKH2wuV9Ate"
28+
id="4mKZxfgAi6Us6dRS4Hy2Ab"
2929
/>
3030
<Route
3131
component={Error404}

src/shared/routes/Communities/TCO07/Routes.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function TCO07({ base }) {
2525
<ContentfulRoute
2626
baseUrl={base}
2727
error404={<Error404 />}
28-
id="52NfYmZnxLnJXKpIQXwnzC"
28+
id="2XWcxVALvInOlAOfROErKS"
2929
/>
3030
<Route
3131
component={Error404}

src/shared/routes/Topcoder/Routes.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default function Topcoder() {
7171
<Route
7272
component={Profile}
7373
exact
74-
path="/members/:handle([\w\-\[\].{} ]{2,15})"
74+
path="/members/:handle([\w\-\[\].{}]{2,15})"
7575
/>
7676
<Route
7777
component={() => <Settings base="/settings" />}
@@ -80,7 +80,7 @@ export default function Topcoder() {
8080
<Route
8181
component={ProfileStats}
8282
exact
83-
path="/members/:handle([\w\-\[\].{} ]{2,15})/details"
83+
path="/members/:handle([\w\-\[\].{}]{2,15})/details"
8484
/>
8585
<Error404 />
8686
</Switch>

0 commit comments

Comments
 (0)